From 89d0db3a93f991b9ebf5cfa0f34d236da7028938 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:55:15 -0300 Subject: [PATCH] fix(Scripts/Karazhan): Fix Aran's chase distance and Blink conditions (#17296) * Revert "chore(Worldserver/Config): Clean up and reorganize config file (#17272)" This reverts commit c709e2e7d3ba426178c2eebce30f6d30da71ff7c. * fix(Scripts/Karazhan): Fix Aran's chase distance and Blink conditions * Revert "Revert "chore(Worldserver/Config): Clean up and reorganize config file (#17272)"" This reverts commit 7075437947203943872aa7606c07c82ae4c8c93c. * Update rev_1695004374973517300.sql --- .../pending_db_world/rev_1695004374973517300.sql | 4 ++++ .../EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1695004374973517300.sql diff --git a/data/sql/updates/pending_db_world/rev_1695004374973517300.sql b/data/sql/updates/pending_db_world/rev_1695004374973517300.sql new file mode 100644 index 000000000..d0c26d213 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695004374973517300.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 29967); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 29967, 0, 0, 31, 0, 3, 17176, 0, 0, 0, 0, '', 'Shade of Aran Blink (29967) can only target Shade of Aran Teleport Center (17176)'); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index ec824e59b..b96bd58d7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -147,6 +147,18 @@ struct boss_shade_of_aran : public BossAI }); } + void AttackStart(Unit* who) override + { + if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE) + { + if (me->Attack(who, false)) + { + me->GetMotionMaster()->MoveChase(who, 45.0f, 0); + me->AddThreat(who, 0.0f); + } + } + } + void KilledUnit(Unit* /*victim*/) override { Talk(SAY_KILL);