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.
This commit is contained in:
treeston
2016-03-26 00:21:21 +01:00
committed by Aokromes
parent 2adc27a1f0
commit 32e4388a8c

View File

@@ -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))