From e0a2ccf49cfad58947ff5670dc51f95f79acea63 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Wed, 31 May 2023 23:22:41 -0400 Subject: [PATCH] Re-add hack to fix 35303 --- .../grasscutter/game/entity/EntityAvatar.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java b/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java index 876a25fd4..eaaa233ec 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java @@ -7,6 +7,7 @@ import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.inventory.*; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.*; +import emu.grasscutter.game.quest.enums.QuestContent; import emu.grasscutter.game.world.*; import emu.grasscutter.net.proto.AbilityControlBlockOuterClass.AbilityControlBlock; import emu.grasscutter.net.proto.AbilityEmbryoOuterClass.AbilityEmbryo; @@ -389,4 +390,20 @@ public class EntityAvatar extends GameEntity { // Set position and rotation. super.move(event.getDestination(), rotation); } + + @Override + public void onAbilityValueUpdate() { + super.onAbilityValueUpdate(); + + // TODO: Replace with a proper implementation/call. + // Check if the condition for 35303 is met. + if (this.getGlobalAbilityValues().containsKey("_ABILITY_UziExplode_Count")) { + var count = this.getGlobalAbilityValues().get("_ABILITY_UziExplode_Count"); + if (count == 2f) { + this.getGlobalAbilityValues().remove("_ABILITY_UziExplode_Count"); + this.getPlayer().getQuestManager() + .queueEvent(QuestContent.QUEST_CONTENT_SKILL, 10006); + } + } + } }