From d25ba64b4c781b63808adb874c74ac3826bf8452 Mon Sep 17 00:00:00 2001 From: treeston Date: Sat, 26 Mar 2016 00:21:21 +0100 Subject: Scripts/Karazhan: Hackfix the Opera event script to make Wizard of Oz actually completable. Doing it in script instead of removing the flags from DB because I'm pretty sure that the DB flags are correct and there's some RP event missing before she becomes attackable. (cherry picked from commit dc39de01416cfd9a7c0416ed38964b753098ca8e) --- src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index d7ed345f19f..88e88146411 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -674,6 +674,12 @@ public: void Initialize() { + // Hello, developer from the future! It's me again! + // This time, you're fixing Karazhan scripts. Awesome. These are a mess of hacks. An amalgamation of hacks, so to speak. Maybe even a Patchwerk thereof. + // Anyway, I digress. + // @todo This line below is obviously a hack. Duh. I'm just coming in here to hackfix the encounter to actually be completable. + // It needs a rewrite. Badly. Please, take good care of it. + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); CycloneTimer = 30000; ChainLightningTimer = 10000; } @@ -701,8 +707,6 @@ public: void EnterCombat(Unit* /*who*/) override { Talk(SAY_CRONE_AGGRO); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } void JustDied(Unit* /*killer*/) override @@ -716,9 +720,6 @@ public: if (!UpdateVictim()) return; - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (CycloneTimer <= diff) { if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0, 9)), float(urand(0, 9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) -- cgit v1.2.3