Scripts/Misc: Code cleanup
Remove some NULL checks not needed anymore after 3744c14184 .
Fix an invalid Creature to TempSummon cast.
This commit is contained in:
+3
-15
@@ -207,12 +207,9 @@ public:
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 5:
|
||||
if (instance)
|
||||
{
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
|
||||
instance->SetData(TYPE_RING_OF_LAW, DONE);
|
||||
TC_LOG_DEBUG("scripts", "npc_grimstone: event reached end and set complete.");
|
||||
}
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
|
||||
instance->SetData(TYPE_RING_OF_LAW, DONE);
|
||||
TC_LOG_DEBUG("scripts", "npc_grimstone: event reached end and set complete.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -224,9 +221,6 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (MobDeath_Timer)
|
||||
{
|
||||
if (MobDeath_Timer <= diff)
|
||||
@@ -1269,9 +1263,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 waypointId) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
@@ -1295,9 +1286,6 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (BreakKeg_Timer)
|
||||
{
|
||||
if (BreakKeg_Timer <= diff)
|
||||
|
||||
+6
-11
@@ -170,13 +170,10 @@ public:
|
||||
// was set before event start, so set again
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
else
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
if (instance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
else
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -192,14 +189,12 @@ public:
|
||||
if (me->IsAlive())
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
me->SetLootRecipient(NULL);
|
||||
if (instance)
|
||||
instance->SetData64(DATA_EVENSTARTER, 0);
|
||||
instance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_GHOSTKILL, 1);
|
||||
instance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
+1
-2
@@ -64,8 +64,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_LORD_VALTHALAK, DONE);
|
||||
instance->SetData(DATA_LORD_VALTHALAK, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
+34
-43
@@ -79,23 +79,20 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
|
||||
events.Reset();
|
||||
// Apply auras on spawn and reset
|
||||
// DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible
|
||||
me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH);
|
||||
me->RemoveAura(SPELL_EMBERSEER_GROWING);
|
||||
me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER);
|
||||
events.ScheduleEvent(EVENT_RESPAWN, 5000);
|
||||
// Hack for missing trigger spell
|
||||
events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
|
||||
events.Reset();
|
||||
// Apply auras on spawn and reset
|
||||
// DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible
|
||||
me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH);
|
||||
me->RemoveAura(SPELL_EMBERSEER_GROWING);
|
||||
me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER);
|
||||
events.ScheduleEvent(EVENT_RESPAWN, 5000);
|
||||
// Hack for missing trigger spell
|
||||
events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000);
|
||||
|
||||
// Open doors on reset
|
||||
if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS)
|
||||
OpenDoors(false); // Opens 2 entrance doors
|
||||
}
|
||||
// Open doors on reset
|
||||
if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS)
|
||||
OpenDoors(false); // Opens 2 entrance doors
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
|
||||
@@ -132,15 +129,12 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
// Activate all the runes
|
||||
UpdateRunes(GO_STATE_READY);
|
||||
// Opens all 3 doors
|
||||
OpenDoors(true);
|
||||
// Complete encounter
|
||||
instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE);
|
||||
}
|
||||
// Activate all the runes
|
||||
UpdateRunes(GO_STATE_READY);
|
||||
// Opens all 3 doors
|
||||
OpenDoors(true);
|
||||
// Complete encounter
|
||||
instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE
|
||||
@@ -185,24 +179,21 @@ public:
|
||||
|
||||
void UpdateRunes(GOState state)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
// update all runes
|
||||
if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1)))
|
||||
rune1->SetGoState(state);
|
||||
if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2)))
|
||||
rune2->SetGoState(state);
|
||||
if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3)))
|
||||
rune3->SetGoState(state);
|
||||
if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4)))
|
||||
rune4->SetGoState(state);
|
||||
if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5)))
|
||||
rune5->SetGoState(state);
|
||||
if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6)))
|
||||
rune6->SetGoState(state);
|
||||
if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7)))
|
||||
rune7->SetGoState(state);
|
||||
}
|
||||
// update all runes
|
||||
if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1)))
|
||||
rune1->SetGoState(state);
|
||||
if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2)))
|
||||
rune2->SetGoState(state);
|
||||
if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3)))
|
||||
rune3->SetGoState(state);
|
||||
if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4)))
|
||||
rune4->SetGoState(state);
|
||||
if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5)))
|
||||
rune5->SetGoState(state);
|
||||
if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6)))
|
||||
rune6->SetGoState(state);
|
||||
if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7)))
|
||||
rune7->SetGoState(state);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
+1
-2
@@ -444,8 +444,7 @@ public:
|
||||
{
|
||||
if (canDespawn && DespawnTimer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(BOSS_NEFARIAN, FAIL);
|
||||
instance->SetBossState(BOSS_NEFARIAN, FAIL);
|
||||
|
||||
std::list<Creature*> constructList;
|
||||
me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f);
|
||||
|
||||
+2
-4
@@ -75,8 +75,7 @@ public:
|
||||
_Reset();
|
||||
|
||||
secondPhase = false;
|
||||
if (instance)
|
||||
instance->SetData(DATA_EGG_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_EGG_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
@@ -84,8 +83,7 @@ public:
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EGG_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_EGG_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void DoChangePhase()
|
||||
|
||||
+1
-2
@@ -161,8 +161,7 @@ class boss_majordomo : public CreatureScript
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
break;
|
||||
case EVENT_OUTRO_2:
|
||||
if (instance)
|
||||
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
|
||||
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
|
||||
break;
|
||||
case EVENT_OUTRO_3:
|
||||
Talk(SAY_ARRIVAL2_MAJ);
|
||||
|
||||
@@ -147,9 +147,8 @@ class boss_ragnaros : public CreatureScript
|
||||
break;
|
||||
case EVENT_INTRO_4:
|
||||
Talk(SAY_ARRIVAL5_RAG);
|
||||
if (instance)
|
||||
if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
|
||||
me->Kill(executus);
|
||||
if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
|
||||
me->Kill(executus);
|
||||
break;
|
||||
case EVENT_INTRO_5:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -163,29 +162,26 @@ class boss_ragnaros : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
if (instance)
|
||||
if (_isBanished && ((_emergeTimer <= diff) || (instance->GetData(DATA_RAGNAROS_ADDS)) > 8))
|
||||
{
|
||||
if (_isBanished && ((_emergeTimer <= diff) || (instance->GetData(DATA_RAGNAROS_ADDS)) > 8))
|
||||
{
|
||||
//Become unbanished again
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->setFaction(14);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(target);
|
||||
instance->SetData(DATA_RAGNAROS_ADDS, 0);
|
||||
//Become unbanished again
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->setFaction(14);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(target);
|
||||
instance->SetData(DATA_RAGNAROS_ADDS, 0);
|
||||
|
||||
//DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support
|
||||
_isBanished = false;
|
||||
}
|
||||
else if (_isBanished)
|
||||
{
|
||||
_emergeTimer -= diff;
|
||||
//Do nothing while banished
|
||||
return;
|
||||
}
|
||||
//DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support
|
||||
_isBanished = false;
|
||||
}
|
||||
else if (_isBanished)
|
||||
{
|
||||
_emergeTimer -= diff;
|
||||
//Do nothing while banished
|
||||
return;
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
@@ -324,8 +320,7 @@ class npc_son_of_flame : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_RAGNAROS_ADDS, 1);
|
||||
instance->SetData(DATA_RAGNAROS_ADDS, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
|
||||
@@ -127,12 +127,11 @@ public:
|
||||
++uiHealth;
|
||||
DoCastAOE(SPELL_SMITE_STOMP, false);
|
||||
SetCombatMovement(false);
|
||||
if (instance)
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_SMITE_CHEST)))
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ());
|
||||
}
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_SMITE_CHEST)))
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ());
|
||||
}
|
||||
}
|
||||
|
||||
if (uiPhase)
|
||||
|
||||
@@ -186,20 +186,15 @@ public:
|
||||
|
||||
if (bBool)
|
||||
{
|
||||
if (instance)
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
}else
|
||||
if (instance)
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
}
|
||||
|
||||
void SetInFace(bool bBool)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (bBool)
|
||||
{
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
@@ -211,9 +206,6 @@ public:
|
||||
|
||||
void RestoreAll()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
|
||||
@@ -318,9 +310,6 @@ public:
|
||||
NextStep(2000, true);
|
||||
break;
|
||||
case 2:
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (uiValue)
|
||||
{
|
||||
case 1:
|
||||
@@ -441,9 +430,8 @@ public:
|
||||
SetInFace(true);
|
||||
Talk(SAY_BLASTMASTER_5);
|
||||
Summon(1);
|
||||
if (instance)
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, true, go);
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, true, go);
|
||||
NextStep(3000, true);
|
||||
break;
|
||||
case 7:
|
||||
@@ -488,9 +476,8 @@ public:
|
||||
case 16:
|
||||
Talk(SAY_BLASTMASTER_14);
|
||||
SetInFace(false);
|
||||
if (instance)
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, true, go);
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, true, go);
|
||||
NextStep(2000, true);
|
||||
break;
|
||||
case 17:
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
ResetTimer = 0;
|
||||
Midnight = 0;
|
||||
}
|
||||
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
|
||||
@@ -138,14 +138,12 @@ public:
|
||||
if (me->IsAlive())
|
||||
SpawnAdds();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MOROES, NOT_STARTED);
|
||||
instance->SetData(TYPE_MOROES, NOT_STARTED);
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MOROES, IN_PROGRESS);
|
||||
instance->SetData(TYPE_MOROES, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
}
|
||||
@@ -168,14 +166,12 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MOROES, DONE);
|
||||
instance->SetData(TYPE_MOROES, DONE);
|
||||
|
||||
DeSpawnAdds();
|
||||
|
||||
//remove aura from spell Garrote when Moroes dies
|
||||
if (instance)
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE);
|
||||
}
|
||||
|
||||
void SpawnAdds()
|
||||
@@ -349,15 +345,11 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MOROES, NOT_STARTED);
|
||||
instance->SetData(TYPE_MOROES, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AcquireGUID()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Creature* Moroes = Unit::GetCreature(*me, instance->GetData64(DATA_MOROES)))
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (uint64 GUID = CAST_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
|
||||
|
||||
@@ -131,13 +131,10 @@ public:
|
||||
me->SetWalk(false);
|
||||
me->setActive(true);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(TYPE_NIGHTBANE) == DONE || instance->GetData(TYPE_NIGHTBANE) == IN_PROGRESS)
|
||||
me->DisappearAndDie();
|
||||
else
|
||||
instance->SetData(TYPE_NIGHTBANE, NOT_STARTED);
|
||||
}
|
||||
if (instance->GetData(TYPE_NIGHTBANE) == DONE || instance->GetData(TYPE_NIGHTBANE) == IN_PROGRESS)
|
||||
me->DisappearAndDie();
|
||||
else
|
||||
instance->SetData(TYPE_NIGHTBANE, NOT_STARTED);
|
||||
|
||||
HandleTerraceDoors(true);
|
||||
|
||||
@@ -153,17 +150,13 @@ public:
|
||||
|
||||
void HandleTerraceDoors(bool open)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||
}
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NIGHTBANE, IN_PROGRESS);
|
||||
instance->SetData(TYPE_NIGHTBANE, IN_PROGRESS);
|
||||
|
||||
HandleTerraceDoors(false);
|
||||
Talk(YELL_AGGRO);
|
||||
@@ -177,8 +170,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NIGHTBANE, DONE);
|
||||
instance->SetData(TYPE_NIGHTBANE, DONE);
|
||||
|
||||
HandleTerraceDoors(true);
|
||||
}
|
||||
|
||||
@@ -239,8 +239,7 @@ public:
|
||||
SunderArmorTimer = urand(5000, 10000);
|
||||
phase = 1;
|
||||
|
||||
if (instance)
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -260,16 +259,14 @@ public:
|
||||
for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
|
||||
positions.push_back(&InfernalPoints[i]);
|
||||
|
||||
if (instance)
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
|
||||
}
|
||||
|
||||
void InfernalCleanup()
|
||||
|
||||
@@ -147,12 +147,9 @@ public:
|
||||
Drinking = false;
|
||||
DrinkInturrupted = false;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
// Not in progress
|
||||
instance->SetData(TYPE_ARAN, NOT_STARTED);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
// Not in progress
|
||||
instance->SetData(TYPE_ARAN, NOT_STARTED);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -164,22 +161,16 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_ARAN, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
instance->SetData(TYPE_ARAN, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_ARAN, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
}
|
||||
instance->SetData(TYPE_ARAN, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
}
|
||||
|
||||
void FlameWreathEffect()
|
||||
@@ -226,11 +217,8 @@ public:
|
||||
{
|
||||
if (CloseDoorTimer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
CloseDoorTimer = 0;
|
||||
}
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
CloseDoorTimer = 0;
|
||||
} else CloseDoorTimer -= diff;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,25 +96,17 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
{
|
||||
ERROR_INST_DATA(me);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN);
|
||||
if (TerestianGUID)
|
||||
{
|
||||
uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN);
|
||||
if (TerestianGUID)
|
||||
{
|
||||
Unit* Terestian = Unit::GetUnit(*me, TerestianGUID);
|
||||
if (Terestian && Terestian->IsAlive())
|
||||
DoCast(Terestian, SPELL_BROKEN_PACT, true);
|
||||
}
|
||||
} else ERROR_INST_DATA(me);
|
||||
Unit* Terestian = Unit::GetUnit(*me, TerestianGUID);
|
||||
if (Terestian && Terestian->IsAlive())
|
||||
DoCast(Terestian, SPELL_BROKEN_PACT, true);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -307,8 +299,7 @@ public:
|
||||
SummonedPortals = false;
|
||||
Berserk = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_TERESTIAN, NOT_STARTED);
|
||||
instance->SetData(TYPE_TERESTIAN, NOT_STARTED);
|
||||
|
||||
me->RemoveAurasDueToSpell(SPELL_BROKEN_PACT);
|
||||
|
||||
@@ -363,8 +354,7 @@ public:
|
||||
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_TERESTIAN, DONE);
|
||||
instance->SetData(TYPE_TERESTIAN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -167,8 +167,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DOROTHEE_DEATH);
|
||||
|
||||
if (instance)
|
||||
SummonCroneIfReady(instance, me);
|
||||
SummonCroneIfReady(instance, me);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
@@ -366,8 +365,7 @@ public:
|
||||
{
|
||||
Talk(SAY_STRAWMAN_DEATH);
|
||||
|
||||
if (instance)
|
||||
SummonCroneIfReady(instance, me);
|
||||
SummonCroneIfReady(instance, me);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -472,8 +470,7 @@ public:
|
||||
{
|
||||
Talk(SAY_TINHEAD_DEATH);
|
||||
|
||||
if (instance)
|
||||
SummonCroneIfReady(instance, me);
|
||||
SummonCroneIfReady(instance, me);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -580,8 +577,7 @@ public:
|
||||
{
|
||||
Talk(SAY_ROAR_DEATH);
|
||||
|
||||
if (instance)
|
||||
SummonCroneIfReady(instance, me);
|
||||
SummonCroneIfReady(instance, me);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -675,15 +671,12 @@ public:
|
||||
{
|
||||
Talk(SAY_CRONE_DEATH);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -865,15 +858,12 @@ public:
|
||||
{
|
||||
DoPlaySoundToSet(me, SOUND_WOLF_DEATH);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -1112,14 +1102,11 @@ public:
|
||||
{
|
||||
Talk(SAY_JULIANNE_DEATH02);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -1267,15 +1254,12 @@ public:
|
||||
{
|
||||
Talk(SAY_ROMULO_DEATH);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
|
||||
@@ -158,15 +158,11 @@ public:
|
||||
|
||||
PerformanceReady = false;
|
||||
|
||||
if (instance)
|
||||
m_uiEventId = instance->GetData(DATA_OPERA_PERFORMANCE);
|
||||
m_uiEventId = instance->GetData(DATA_OPERA_PERFORMANCE);
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
instance->SetData(TYPE_OPERA, IN_PROGRESS);
|
||||
|
||||
//resets count for this event, in case earlier failed
|
||||
@@ -180,9 +176,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 waypointId) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -150,17 +150,13 @@ public:
|
||||
|
||||
Phase = 0;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
instance->SetData(DATA_KAELTHAS_EVENT, DONE);
|
||||
|
||||
// Enable the Translocation Orb Exit
|
||||
@@ -176,9 +172,6 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -371,8 +364,7 @@ public:
|
||||
Talk(SAY_GRAVITY_LAPSE);
|
||||
FirstGravityLapse = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KAELTHAS_STATUES, 1);
|
||||
instance->SetData(DATA_KAELTHAS_STATUES, 1);
|
||||
}
|
||||
else
|
||||
Talk(SAY_RECAST_GRAVITY);
|
||||
|
||||
@@ -153,8 +153,7 @@ public:
|
||||
//this mean she at some point evaded
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_DELRISSA_EVENT, FAIL);
|
||||
instance->SetData(DATA_DELRISSA_EVENT, FAIL);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
@@ -173,8 +172,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void InitializeLackeys()
|
||||
@@ -241,9 +239,6 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (instance->GetData(DATA_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY)
|
||||
instance->SetData(DATA_DELRISSA_EVENT, DONE);
|
||||
else
|
||||
@@ -393,36 +388,30 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (instance)
|
||||
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i]))
|
||||
{
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i]))
|
||||
if (!pAdd->GetVictim() && pAdd != me)
|
||||
{
|
||||
if (!pAdd->GetVictim() && pAdd != me)
|
||||
{
|
||||
who->SetInCombatWith(pAdd);
|
||||
pAdd->AddThreat(who, 0.0f);
|
||||
}
|
||||
who->SetInCombatWith(pAdd);
|
||||
pAdd->AddThreat(who, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
|
||||
if (Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
|
||||
{
|
||||
if (pDelrissa->IsAlive() && !pDelrissa->GetVictim())
|
||||
{
|
||||
if (pDelrissa->IsAlive() && !pDelrissa->GetVictim())
|
||||
{
|
||||
who->SetInCombatWith(pDelrissa);
|
||||
pDelrissa->AddThreat(who, 0.0f);
|
||||
}
|
||||
who->SetInCombatWith(pDelrissa);
|
||||
pDelrissa->AddThreat(who, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA));
|
||||
uint32 uiLackeyDeathCount = instance->GetData(DATA_DELRISSA_DEATH_COUNT);
|
||||
|
||||
@@ -452,18 +441,12 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Creature* Delrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
|
||||
Delrissa->AI()->KilledUnit(victim);
|
||||
}
|
||||
|
||||
void AcquireGUIDs()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Creature* Delrissa = (Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA))))
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
|
||||
|
||||
@@ -77,16 +77,13 @@ public:
|
||||
|
||||
Crystals.clear();
|
||||
//GUIDs per instance is static, so we only need to load them once.
|
||||
if (instance)
|
||||
uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE);
|
||||
for (uint8 i = 0; i < size; ++i)
|
||||
{
|
||||
uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE);
|
||||
for (uint8 i = 0; i < size; ++i)
|
||||
{
|
||||
instance->SetData64(DATA_FEL_CRYSTAL, i);
|
||||
uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL);
|
||||
TC_LOG_DEBUG("scripts", "Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
|
||||
Crystals.push_back(guid);
|
||||
}
|
||||
instance->SetData64(DATA_FEL_CRYSTAL, i);
|
||||
uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL);
|
||||
TC_LOG_DEBUG("scripts", "Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
|
||||
Crystals.push_back(guid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,25 +104,22 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
//for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
|
||||
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
|
||||
{
|
||||
//for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
|
||||
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
|
||||
//Unit* unit = Unit::GetUnit(*me, FelCrystals[i]);
|
||||
if (Creature* creature = Unit::GetCreature(*me, *itr))
|
||||
{
|
||||
//Unit* unit = Unit::GetUnit(*me, FelCrystals[i]);
|
||||
if (Creature* creature = Unit::GetCreature(*me, *itr))
|
||||
{
|
||||
if (!creature->IsAlive())
|
||||
creature->Respawn(); // Let the core handle setting death state, etc.
|
||||
if (!creature->IsAlive())
|
||||
creature->Respawn(); // Let the core handle setting death state, etc.
|
||||
|
||||
// Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here.
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
// Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here.
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Inst data for encounter
|
||||
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
|
||||
} else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
|
||||
// Set Inst data for encounter
|
||||
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
|
||||
|
||||
DrainLifeTimer = urand(3000, 7000);
|
||||
DrainManaTimer = DrainLifeTimer + 5000;
|
||||
@@ -200,8 +194,7 @@ public:
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (instance)
|
||||
instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -235,9 +228,6 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
instance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete!
|
||||
ShatterRemainingCrystals();
|
||||
}
|
||||
|
||||
@@ -103,8 +103,7 @@ public:
|
||||
IntervalHealthAmount = 1;
|
||||
Enraged = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -115,16 +114,14 @@ public:
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (instance)
|
||||
instance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
instance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
|
||||
@@ -435,8 +435,7 @@ public:
|
||||
}
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
//if (instance)
|
||||
// instance->SetData(DATA_HORSEMAN_EVENT, NOT_STARTED);
|
||||
//instance->SetData(DATA_HORSEMAN_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void FlyMode()
|
||||
@@ -472,8 +471,7 @@ public:
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
if (instance)
|
||||
instance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject
|
||||
instance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject
|
||||
break;
|
||||
case 19:
|
||||
me->SetDisableGravity(false);
|
||||
@@ -495,8 +493,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
@@ -570,8 +567,7 @@ public:
|
||||
flame->CastSpell(flame, SPELL_BODY_FLAME, false);
|
||||
if (Creature* wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
CAST_AI(npc_wisp_invis::npc_wisp_invisAI, wisp->AI())->SetType(4);
|
||||
if (instance)
|
||||
instance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
||||
instance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
|
||||
@@ -83,9 +83,6 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
//Any other Actions to do with vorrel? setStandState?
|
||||
if (Creature* vorrel = Creature::GetCreature(*me, instance->GetData64(DATA_VORREL)))
|
||||
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
|
||||
|
||||
+11
-23
@@ -94,9 +94,8 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
if (instance)
|
||||
if (me->IsAlive())
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
|
||||
if (me->IsAlive())
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
|
||||
|
||||
_bHasDied = false;
|
||||
_bHeal = false;
|
||||
@@ -105,11 +104,8 @@ public:
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED)
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL);
|
||||
}
|
||||
if (instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED)
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -130,9 +126,6 @@ public:
|
||||
if (damage < me->GetHealth() || _bHasDied || _bFakeDeath)
|
||||
return;
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
//On first death, fake death and open door, as well as initiate whitemane if exist
|
||||
if (Unit* Whitemane = Unit::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
|
||||
{
|
||||
@@ -170,8 +163,7 @@ public:
|
||||
Talk(SAY_MO_RESSURECTED);
|
||||
_bFakeDeath = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL);
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,9 +253,8 @@ public:
|
||||
_bCanResurrectCheck = false;
|
||||
_bCanResurrect = false;
|
||||
|
||||
if (instance)
|
||||
if (me->IsAlive())
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
|
||||
if (me->IsAlive())
|
||||
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
@@ -334,14 +325,11 @@ public:
|
||||
if (!HealthAbovePct(75))
|
||||
target = me;
|
||||
|
||||
if (instance)
|
||||
if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE)))
|
||||
{
|
||||
if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE)))
|
||||
{
|
||||
// checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death"
|
||||
if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
|
||||
target = mograine;
|
||||
}
|
||||
// checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death"
|
||||
if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
|
||||
target = mograine;
|
||||
}
|
||||
|
||||
if (target)
|
||||
|
||||
@@ -135,8 +135,7 @@ public:
|
||||
else
|
||||
Talk(SAY_POST1_DOOR_AD);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_FREE_NPC, DONE);
|
||||
instance->SetData(TYPE_FREE_NPC, DONE);
|
||||
break;
|
||||
case 13:
|
||||
if (me->GetEntry() != NPC_ASH)
|
||||
@@ -196,8 +195,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_FENRUS, instance->GetData(TYPE_FENRUS) + 1);
|
||||
instance->SetData(TYPE_FENRUS, instance->GetData(TYPE_FENRUS) + 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ public:
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
{
|
||||
if (instance)//can't use entercombat(), boss' dmg aura sets near players in combat, before entering the room's door
|
||||
instance->SetData(TYPE_BARON, IN_PROGRESS);
|
||||
//can't use entercombat(), boss' dmg aura sets near players in combat, before entering the room's door
|
||||
instance->SetData(TYPE_BARON, IN_PROGRESS);
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
@@ -110,11 +110,10 @@ public:
|
||||
summoned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_BARON, DONE);
|
||||
}
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
instance->SetData(TYPE_BARON, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -71,11 +71,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_BARONESS, IN_PROGRESS);
|
||||
}
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
instance->SetData(TYPE_BARONESS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -72,8 +72,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_PALLID, IN_PROGRESS);
|
||||
instance->SetData(TYPE_PALLID, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -73,8 +73,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NERUB, IN_PROGRESS);
|
||||
instance->SetData(TYPE_NERUB, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void RaiseUndeadScarab(Unit* victim)
|
||||
|
||||
@@ -78,26 +78,23 @@ public:
|
||||
HolyLight_Timer = 20000;
|
||||
DivineShield_Timer = 20000;
|
||||
|
||||
if (instance)
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case SH_AELMAR:
|
||||
instance->SetData(TYPE_SH_AELMAR, 0);
|
||||
break;
|
||||
case SH_CATHELA:
|
||||
instance->SetData(TYPE_SH_CATHELA, 0);
|
||||
break;
|
||||
case SH_GREGOR:
|
||||
instance->SetData(TYPE_SH_GREGOR, 0);
|
||||
break;
|
||||
case SH_NEMAS:
|
||||
instance->SetData(TYPE_SH_NEMAS, 0);
|
||||
break;
|
||||
case SH_VICAR:
|
||||
instance->SetData(TYPE_SH_VICAR, 0);
|
||||
break;
|
||||
}
|
||||
case SH_AELMAR:
|
||||
instance->SetData(TYPE_SH_AELMAR, 0);
|
||||
break;
|
||||
case SH_CATHELA:
|
||||
instance->SetData(TYPE_SH_CATHELA, 0);
|
||||
break;
|
||||
case SH_GREGOR:
|
||||
instance->SetData(TYPE_SH_GREGOR, 0);
|
||||
break;
|
||||
case SH_NEMAS:
|
||||
instance->SetData(TYPE_SH_NEMAS, 0);
|
||||
break;
|
||||
case SH_VICAR:
|
||||
instance->SetData(TYPE_SH_VICAR, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +104,6 @@ public:
|
||||
|
||||
void JustDied(Unit* killer) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case SH_AELMAR:
|
||||
|
||||
@@ -78,8 +78,7 @@ public:
|
||||
mob->AI()->AttackStart(me->SelectNearestTarget(100.0f));
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_RAMSTEIN, DONE);
|
||||
instance->SetData(TYPE_RAMSTEIN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -464,8 +464,7 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
SathGUID = instance->GetData64(DATA_SATHROVARR);
|
||||
SathGUID = instance->GetData64(DATA_SATHROVARR);
|
||||
|
||||
RevitalizeTimer = 5000;
|
||||
HeroicStrikeTimer = 3000;
|
||||
@@ -605,11 +604,8 @@ public:
|
||||
{
|
||||
me->SetFullHealth();//dunno why it does not resets health at evade..
|
||||
me->setActive(true);
|
||||
if (instance)
|
||||
{
|
||||
KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON);
|
||||
instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
|
||||
}
|
||||
KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON);
|
||||
instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
|
||||
if (KalecGUID)
|
||||
{
|
||||
if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID))
|
||||
@@ -674,8 +670,7 @@ public:
|
||||
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true;
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_KALECGOS, DONE);
|
||||
instance->SetBossState(DATA_KALECGOS, DONE);
|
||||
}
|
||||
|
||||
void TeleportAllPlayersBack()
|
||||
|
||||
@@ -265,9 +265,6 @@ public:
|
||||
|
||||
GameObject* GetOrb(int32 index)
|
||||
{
|
||||
if (!instance)
|
||||
return NULL;
|
||||
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
@@ -424,9 +421,8 @@ public:
|
||||
{
|
||||
phase = PHASE_DECEIVERS;
|
||||
|
||||
if (instance)
|
||||
if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs();
|
||||
if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs();
|
||||
deceiverDeathCount = 0;
|
||||
bSummonedDeceivers = false;
|
||||
bKiljaedenDeath = false;
|
||||
@@ -927,9 +923,6 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
++(CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->deceiverDeathCount);
|
||||
}
|
||||
|
||||
@@ -405,9 +405,8 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
if (Player* Target = ObjectAccessor::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID)))
|
||||
summoned->AI()->AttackStart(Target);
|
||||
if (Player* Target = ObjectAccessor::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID)))
|
||||
summoned->AI()->AttackStart(Target);
|
||||
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
|
||||
@@ -86,8 +86,7 @@ class boss_archaedas : public CreatureScript
|
||||
bGuardiansAwake = false;
|
||||
bVaultWalkersAwake = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(0, 5); // respawn any dead minions
|
||||
instance->SetData(0, 5); // respawn any dead minions
|
||||
me->setFaction(35);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
@@ -132,8 +131,6 @@ class boss_archaedas : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 uiDiff) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
// we're still doing awaken animation
|
||||
if (bWakingUp && iAwakenTimer >= 0)
|
||||
{
|
||||
@@ -196,11 +193,8 @@ class boss_archaedas : public CreatureScript
|
||||
|
||||
void JustDied (Unit* /*killer*/)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_ANCIENT_DOOR, DONE); // open the vault door
|
||||
instance->SetData(DATA_MINIONS, SPECIAL); // deactivate his minions
|
||||
}
|
||||
instance->SetData(DATA_ANCIENT_DOOR, DONE); // open the vault door
|
||||
instance->SetData(DATA_MINIONS, SPECIAL); // deactivate his minions
|
||||
}
|
||||
};
|
||||
|
||||
@@ -361,8 +355,7 @@ class npc_stonekeepers : public CreatureScript
|
||||
void JustDied(Unit* /*attacker*/) OVERRIDE
|
||||
{
|
||||
DoCast (me, SPELL_SELF_DESTRUCT, true);
|
||||
if (instance)
|
||||
instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper
|
||||
instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -116,8 +116,7 @@ class boss_akilzon : public CreatureScript
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
//DoZoneInCombat();
|
||||
if (instance)
|
||||
instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
|
||||
@@ -111,8 +111,7 @@ class boss_halazzi : public CreatureScript
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED);
|
||||
|
||||
LynxGUID = 0;
|
||||
TransformCount = 0;
|
||||
@@ -127,8 +126,7 @@ class boss_halazzi : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS);
|
||||
|
||||
me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO);
|
||||
@@ -333,8 +331,7 @@ class boss_halazzi : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HALAZZIEVENT, DONE);
|
||||
instance->SetData(DATA_HALAZZIEVENT, DONE);
|
||||
|
||||
me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(me, SOUND_DEATH);
|
||||
|
||||
@@ -278,8 +278,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HEXLORDEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_HEXLORDEVENT, NOT_STARTED);
|
||||
|
||||
SpiritBolts_Timer = 20000;
|
||||
DrainPower_Timer = 60000;
|
||||
@@ -296,8 +295,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HEXLORDEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_HEXLORDEVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
@@ -333,8 +331,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_HEXLORDEVENT, DONE);
|
||||
instance->SetData(DATA_HEXLORDEVENT, DONE);
|
||||
|
||||
me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(me, SOUND_YELL_DEATH);
|
||||
|
||||
@@ -143,8 +143,7 @@ class boss_janalai : public CreatureScript
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_JANALAIEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_JANALAIEVENT, NOT_STARTED);
|
||||
|
||||
FireBreathTimer = 8000;
|
||||
BombTimer = 30000;
|
||||
@@ -169,8 +168,7 @@ class boss_janalai : public CreatureScript
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_JANALAIEVENT, DONE);
|
||||
instance->SetData(DATA_JANALAIEVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -180,8 +178,7 @@ class boss_janalai : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
// DoZoneInCombat();
|
||||
|
||||
@@ -148,8 +148,7 @@ class boss_nalorakk : public CreatureScript
|
||||
(*me).GetMotionMaster()->MovePoint(0, NalorakkWay[7][0], NalorakkWay[7][1], NalorakkWay[7][2]);
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED);
|
||||
|
||||
Surge_Timer = urand(15000, 20000);
|
||||
BrutalSwipe_Timer = urand(7000, 12000);
|
||||
@@ -275,8 +274,7 @@ class boss_nalorakk : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS);
|
||||
|
||||
me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(me, SOUND_YELL_AGGRO);
|
||||
@@ -285,8 +283,7 @@ class boss_nalorakk : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_NALORAKKEVENT, DONE);
|
||||
instance->SetData(DATA_NALORAKKEVENT, DONE);
|
||||
|
||||
me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(me, SOUND_YELL_DEATH);
|
||||
|
||||
@@ -169,8 +169,7 @@ class boss_zuljin : public CreatureScript
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZULJINEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_ZULJINEVENT, NOT_STARTED);
|
||||
|
||||
Phase = 0;
|
||||
|
||||
@@ -206,8 +205,7 @@ class boss_zuljin : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZULJINEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_ZULJINEVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
|
||||
@@ -226,8 +224,7 @@ class boss_zuljin : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZULJINEVENT, DONE);
|
||||
instance->SetData(DATA_ZULJINEVENT, DONE);
|
||||
|
||||
Talk(YELL_DEATH);
|
||||
Summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE);
|
||||
|
||||
@@ -74,33 +74,30 @@ class npc_forest_frog : public CreatureScript
|
||||
|
||||
void DoSpawnRandom()
|
||||
{
|
||||
if (instance)
|
||||
uint32 cEntry = 0;
|
||||
switch (rand()%10)
|
||||
{
|
||||
uint32 cEntry = 0;
|
||||
switch (rand()%10)
|
||||
{
|
||||
case 0: cEntry = 24397; break; //Mannuth
|
||||
case 1: cEntry = 24403; break; //Deez
|
||||
case 2: cEntry = 24404; break; //Galathryn
|
||||
case 3: cEntry = 24405; break; //Adarrah
|
||||
case 4: cEntry = 24406; break; //Fudgerick
|
||||
case 5: cEntry = 24407; break; //Darwen
|
||||
case 6: cEntry = 24445; break; //Mitzi
|
||||
case 7: cEntry = 24448; break; //Christian
|
||||
case 8: cEntry = 24453; break; //Brennan
|
||||
case 9: cEntry = 24455; break; //Hollee
|
||||
}
|
||||
|
||||
if (!instance->GetData(TYPE_RAND_VENDOR_1))
|
||||
if (rand()%10 == 1) cEntry = 24408; //Gunter
|
||||
if (!instance->GetData(TYPE_RAND_VENDOR_2))
|
||||
if (rand()%10 == 1) cEntry = 24409; //Kyren
|
||||
|
||||
if (cEntry) me->UpdateEntry(cEntry);
|
||||
|
||||
if (cEntry == 24408) instance->SetData(TYPE_RAND_VENDOR_1, DONE);
|
||||
if (cEntry == 24409) instance->SetData(TYPE_RAND_VENDOR_2, DONE);
|
||||
case 0: cEntry = 24397; break; //Mannuth
|
||||
case 1: cEntry = 24403; break; //Deez
|
||||
case 2: cEntry = 24404; break; //Galathryn
|
||||
case 3: cEntry = 24405; break; //Adarrah
|
||||
case 4: cEntry = 24406; break; //Fudgerick
|
||||
case 5: cEntry = 24407; break; //Darwen
|
||||
case 6: cEntry = 24445; break; //Mitzi
|
||||
case 7: cEntry = 24448; break; //Christian
|
||||
case 8: cEntry = 24453; break; //Brennan
|
||||
case 9: cEntry = 24455; break; //Hollee
|
||||
}
|
||||
|
||||
if (!instance->GetData(TYPE_RAND_VENDOR_1))
|
||||
if (rand()%10 == 1) cEntry = 24408; //Gunter
|
||||
if (!instance->GetData(TYPE_RAND_VENDOR_2))
|
||||
if (rand()%10 == 1) cEntry = 24409; //Kyren
|
||||
|
||||
if (cEntry) me->UpdateEntry(cEntry);
|
||||
|
||||
if (cEntry == 24408) instance->SetData(TYPE_RAND_VENDOR_1, DONE);
|
||||
if (cEntry == 24409) instance->SetData(TYPE_RAND_VENDOR_2, DONE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
|
||||
@@ -320,8 +317,7 @@ class npc_harrison_jones : public CreatureScript
|
||||
me->SetTarget(0);
|
||||
me->SetByteValue(UNIT_FIELD_BYTES_1, 0, UNIT_STAND_STATE_DEAD);
|
||||
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
if (instance)
|
||||
instance->SetData(DATA_GONGEVENT, DONE);
|
||||
instance->SetData(DATA_GONGEVENT, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,9 +327,6 @@ class npc_harrison_jones : public CreatureScript
|
||||
{
|
||||
if (_gongTimer <= diff)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (_gongEvent)
|
||||
{
|
||||
case GONG_EVENT_1:
|
||||
|
||||
@@ -101,25 +101,19 @@ class boss_arlokk : public CreatureScript
|
||||
me->RemoveAllAuras();
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_DAGGER));
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(WEAPON_DAGGER));
|
||||
if (instance)
|
||||
{
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
me->SetWalk(false);
|
||||
me->GetMotionMaster()->MovePoint(0, PosMoveOnSpawn[0]);
|
||||
}
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
me->SetWalk(false);
|
||||
me->GetMotionMaster()->MovePoint(0, PosMoveOnSpawn[0]);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
me->RemoveAllAuras();
|
||||
if (instance)
|
||||
{
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
instance->SetBossState(DATA_ARLOKK, DONE);
|
||||
}
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
instance->SetBossState(DATA_ARLOKK, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -127,8 +121,7 @@ class boss_arlokk : public CreatureScript
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(7000, 9000), 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_GOUGE, urand(12000, 15000), 0, PHASE_ONE);
|
||||
if (instance)
|
||||
events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6000, 0, PHASE_ALL);
|
||||
events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6000, 0, PHASE_ALL);
|
||||
events.ScheduleEvent(EVENT_MARK_OF_ARLOKK, urand(9000, 11000), 0, PHASE_ALL);
|
||||
events.ScheduleEvent(EVENT_TRANSFORM, urand(15000, 20000), 0, PHASE_ONE);
|
||||
Talk(SAY_AGGRO);
|
||||
@@ -161,14 +154,11 @@ class boss_arlokk : public CreatureScript
|
||||
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (GameObject* object = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD)))
|
||||
object->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* object = me->GetMap()->GetGameObject(instance->GetData64(GO_GONG_OF_BETHEKK)))
|
||||
object->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
instance->SetBossState(DATA_ARLOKK, NOT_STARTED);
|
||||
}
|
||||
if (GameObject* object = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD)))
|
||||
object->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* object = me->GetMap()->GetGameObject(instance->GetData64(GO_GONG_OF_BETHEKK)))
|
||||
object->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
instance->SetBossState(DATA_ARLOKK, NOT_STARTED);
|
||||
me->DespawnOrUnsummon(4000);
|
||||
}
|
||||
|
||||
@@ -254,8 +244,7 @@ class boss_arlokk : public CreatureScript
|
||||
case EVENT_VANISH:
|
||||
DoCast(me, SPELL_SUPER_INVIS);
|
||||
me->SetWalk(false);
|
||||
if (instance)
|
||||
me->GetMotionMaster()->MovePoint(0, frand(-11551.0f, -11508.0f), frand(-1638.0f, -1617.0f), me->GetPositionZ());
|
||||
me->GetMotionMaster()->MovePoint(0, frand(-11551.0f, -11508.0f), frand(-1638.0f, -1617.0f), me->GetPositionZ());
|
||||
events.ScheduleEvent(EVENT_VANISH_2, 9000, 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_VANISH_2:
|
||||
|
||||
@@ -267,14 +267,11 @@ class npc_batrider : public CreatureScript
|
||||
//Check_Timer
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetBossState(DATA_JEKLIK) == DONE)
|
||||
{
|
||||
if (instance->GetBossState(DATA_JEKLIK) == DONE)
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
return;
|
||||
}
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
return;
|
||||
}
|
||||
|
||||
Check_Timer = 1000;
|
||||
|
||||
@@ -217,12 +217,9 @@ class npc_healing_ward : public CreatureScript
|
||||
//Heal_Timer
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO));
|
||||
if (pJindo)
|
||||
DoCast(pJindo, SPELL_HEAL);
|
||||
}
|
||||
Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO));
|
||||
if (pJindo)
|
||||
DoCast(pJindo, SPELL_HEAL);
|
||||
Heal_Timer = 3000;
|
||||
} else Heal_Timer -= diff;
|
||||
|
||||
|
||||
@@ -112,8 +112,7 @@ class boss_thekal : public CreatureScript
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_THEKAL, NOT_STARTED);
|
||||
instance->SetBossState(DATA_THEKAL, NOT_STARTED);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -165,32 +164,29 @@ class boss_thekal : public CreatureScript
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!WasDead)
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->SetFullHealth();
|
||||
instance->SetData(DATA_LORKHAN, DONE);
|
||||
}
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->SetFullHealth();
|
||||
instance->SetData(DATA_LORKHAN, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->setFaction(14);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->SetFullHealth();
|
||||
instance->SetBossState(DATA_ZATH, DONE);
|
||||
}
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->setFaction(14);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->SetFullHealth();
|
||||
instance->SetBossState(DATA_ZATH, DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,8 +236,7 @@ class boss_thekal : public CreatureScript
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
me->AttackStop();
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_THEKAL, SPECIAL);
|
||||
instance->SetBossState(DATA_THEKAL, SPECIAL);
|
||||
WasDead=true;
|
||||
}
|
||||
}
|
||||
@@ -287,8 +282,7 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
|
||||
FakeDeath = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_LORKHAN, NOT_STARTED);
|
||||
instance->SetBossState(DATA_LORKHAN, NOT_STARTED);
|
||||
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -320,25 +314,22 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
//Casting Greaterheal to Thekal or Zath if they are in meele range.
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
|
||||
if (!pThekal || !pZath)
|
||||
return;
|
||||
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
|
||||
if (!pThekal || !pZath)
|
||||
return;
|
||||
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
if (me->IsWithinMeleeRange(pThekal))
|
||||
DoCast(pThekal, SPELL_GREATERHEAL);
|
||||
break;
|
||||
case 1:
|
||||
if (me->IsWithinMeleeRange(pZath))
|
||||
DoCast(pZath, SPELL_GREATERHEAL);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
if (me->IsWithinMeleeRange(pThekal))
|
||||
DoCast(pThekal, SPELL_GREATERHEAL);
|
||||
break;
|
||||
case 1:
|
||||
if (me->IsWithinMeleeRange(pZath))
|
||||
DoCast(pZath, SPELL_GREATERHEAL);
|
||||
break;
|
||||
}
|
||||
|
||||
GreaterHeal_Timer = 15000+rand()%5000;
|
||||
@@ -354,30 +345,27 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!FakeDeath && Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pThekal->setFaction(14);
|
||||
pThekal->SetFullHealth();
|
||||
}
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pThekal->setFaction(14);
|
||||
pThekal->SetFullHealth();
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->setFaction(14);
|
||||
pZath->SetFullHealth();
|
||||
}
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->setFaction(14);
|
||||
pZath->SetFullHealth();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,8 +382,7 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
me->setFaction(35);
|
||||
me->AttackStop();
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_LORKHAN, SPECIAL);
|
||||
instance->SetBossState(DATA_LORKHAN, SPECIAL);
|
||||
|
||||
FakeDeath = true;
|
||||
}
|
||||
@@ -449,8 +436,7 @@ class npc_zealot_zath : public CreatureScript
|
||||
|
||||
FakeDeath = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_ZATH, NOT_STARTED);
|
||||
instance->SetBossState(DATA_ZATH, NOT_STARTED);
|
||||
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -507,30 +493,27 @@ class npc_zealot_zath : public CreatureScript
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!FakeDeath && Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->SetFullHealth();
|
||||
}
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->SetFullHealth();
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pThekal->setFaction(14);
|
||||
pThekal->SetFullHealth();
|
||||
}
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pThekal->setFaction(14);
|
||||
pThekal->SetFullHealth();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,8 +530,7 @@ class npc_zealot_zath : public CreatureScript
|
||||
me->setFaction(35);
|
||||
me->AttackStop();
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_ZATH, SPECIAL);
|
||||
instance->SetBossState(DATA_ZATH, SPECIAL);
|
||||
|
||||
FakeDeath = true;
|
||||
}
|
||||
|
||||
@@ -182,8 +182,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (me->IsSummon()) //we are not a normal spawn.
|
||||
if (instance)
|
||||
instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1);
|
||||
instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -48,20 +48,17 @@ public:
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
netTimer = urand(2000, 4000);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_GELIHAST, NOT_STARTED);
|
||||
instance->SetData(TYPE_GELIHAST, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_GELIHAST, IN_PROGRESS);
|
||||
instance->SetData(TYPE_GELIHAST, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_GELIHAST, DONE);
|
||||
instance->SetData(TYPE_GELIHAST, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -55,22 +55,19 @@ public:
|
||||
{
|
||||
mindBlastTimer = urand(2000, 5000);
|
||||
sleepTimer = urand(9000, 12000);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_KELRIS, NOT_STARTED);
|
||||
instance->SetData(TYPE_KELRIS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_KELRIS, IN_PROGRESS);
|
||||
instance->SetData(TYPE_KELRIS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_KELRIS, DONE);
|
||||
instance->SetData(TYPE_KELRIS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -116,19 +116,16 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f);
|
||||
AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f);
|
||||
AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f);
|
||||
AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f);
|
||||
AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f);
|
||||
AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f);
|
||||
AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f);
|
||||
AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f);
|
||||
AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f);
|
||||
AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f);
|
||||
AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f);
|
||||
AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f);
|
||||
AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f);
|
||||
AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f);
|
||||
AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,10 +184,8 @@ public:
|
||||
{
|
||||
npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
AnetheronGUID = 0;
|
||||
instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
|
||||
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
|
||||
}
|
||||
|
||||
uint32 ImmolationTimer;
|
||||
|
||||
@@ -102,8 +102,7 @@ public:
|
||||
{
|
||||
CheckTimer = 1000;
|
||||
|
||||
if (instance)
|
||||
ArchimondeGUID = instance->GetData64(DATA_ARCHIMONDE);
|
||||
ArchimondeGUID = instance->GetData64(DATA_ARCHIMONDE);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
@@ -275,8 +274,7 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED);
|
||||
|
||||
DoomfireSpiritGUID = 0;
|
||||
damageTaken = 0;
|
||||
@@ -308,8 +306,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
@@ -350,8 +347,7 @@ public:
|
||||
hyjal_trashAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, DONE);
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, DONE);
|
||||
}
|
||||
|
||||
bool CanUseFingerOfDeath()
|
||||
@@ -471,19 +467,16 @@ public:
|
||||
{
|
||||
if (!me->IsInCombat())
|
||||
{
|
||||
if (instance)
|
||||
// Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
|
||||
if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35)))
|
||||
{
|
||||
// Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
|
||||
if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35)))
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->setFaction(35);
|
||||
}
|
||||
else if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35)))
|
||||
{
|
||||
me->setFaction(1720);
|
||||
me->SetVisible(true);
|
||||
}
|
||||
me->SetVisible(false);
|
||||
me->setFaction(35);
|
||||
}
|
||||
else if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35)))
|
||||
{
|
||||
me->setFaction(1720);
|
||||
me->SetVisible(true);
|
||||
}
|
||||
|
||||
if (DrainNordrassilTimer <= diff)
|
||||
|
||||
@@ -121,19 +121,16 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f);
|
||||
AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f);
|
||||
AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f);
|
||||
AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f);
|
||||
AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f);
|
||||
AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f);
|
||||
AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f);
|
||||
AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f);
|
||||
AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f);
|
||||
AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f);
|
||||
AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f);
|
||||
AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f);
|
||||
AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f);
|
||||
AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f);
|
||||
AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,10 +190,8 @@ public:
|
||||
{
|
||||
npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature)
|
||||
{
|
||||
AzgalorGUID = 0;
|
||||
instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
AzgalorGUID = instance->GetData64(DATA_AZGALOR);
|
||||
AzgalorGUID = instance->GetData64(DATA_AZGALOR);
|
||||
}
|
||||
|
||||
uint32 CrippleTimer;
|
||||
|
||||
@@ -117,19 +117,16 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f);
|
||||
AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f);
|
||||
AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f);
|
||||
AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f);
|
||||
AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f);
|
||||
AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f);
|
||||
AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f);
|
||||
AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f);
|
||||
AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f);
|
||||
AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f);
|
||||
AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f);
|
||||
AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f);
|
||||
AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f);
|
||||
AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f);
|
||||
AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-13
@@ -112,19 +112,16 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f);
|
||||
AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f);
|
||||
AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f);
|
||||
AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f);
|
||||
AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f);
|
||||
AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f);
|
||||
AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f);
|
||||
AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f);
|
||||
AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f);
|
||||
AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f);
|
||||
AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f);
|
||||
AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f);
|
||||
AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f);
|
||||
AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f);
|
||||
AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -397,17 +397,14 @@ void hyjalAI::Reset()
|
||||
memset(Spells, 0, sizeof(Spell) * HYJAL_AI_MAX_SPELLS);
|
||||
|
||||
//Reset Instance Data for trash count
|
||||
if (instance)
|
||||
if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL))
|
||||
{
|
||||
if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL))
|
||||
{
|
||||
//Reset World States
|
||||
instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
|
||||
instance->SetData(DATA_RESET_TRASH_COUNT, 0);
|
||||
}
|
||||
} else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
|
||||
//Reset World States
|
||||
instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
|
||||
instance->SetData(DATA_RESET_TRASH_COUNT, 0);
|
||||
}
|
||||
|
||||
//Visibility
|
||||
DoHide = true;
|
||||
@@ -517,11 +514,8 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
CAST_AI(hyjal_trashAI, creature->AI())->IsEvent = true;
|
||||
break;
|
||||
}
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE)
|
||||
creature->SetDisableReputationGain(true);//no repu for solo farming
|
||||
}
|
||||
if (instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE)
|
||||
creature->SetDisableReputationGain(true);//no repu for solo farming
|
||||
// Check if Creature is a boss.
|
||||
if (creature->isWorldBoss())
|
||||
{
|
||||
@@ -538,11 +532,6 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
|
||||
if (rand()%4 == 0)
|
||||
Talk(RALLY);
|
||||
|
||||
if (!instance)
|
||||
{
|
||||
TC_LOG_ERROR("scripts", ERROR_INST_DATA);
|
||||
return;
|
||||
}
|
||||
InfernalCount = 0;//reset infernal count every new wave
|
||||
|
||||
EnemyCount = instance->GetData(DATA_TRASH);
|
||||
@@ -612,41 +601,34 @@ void hyjalAI::StartEvent(Player* player)
|
||||
|
||||
uint32 hyjalAI::GetInstanceData(uint32 Event)
|
||||
{
|
||||
if (instance)
|
||||
return instance->GetData(Event);
|
||||
else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
|
||||
|
||||
return 0;
|
||||
return instance->GetData(Event);
|
||||
}
|
||||
|
||||
void hyjalAI::Retreat()
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_RETREAT, SPECIAL);
|
||||
instance->SetData(TYPE_RETREAT, SPECIAL);
|
||||
|
||||
if (Faction == 0)
|
||||
if (Faction == 0)
|
||||
{
|
||||
instance->SetData(DATA_ALLIANCE_RETREAT, 1);
|
||||
AddWaypoint(0, JainaWPs[0][0], JainaWPs[0][1], JainaWPs[0][2]);
|
||||
AddWaypoint(1, JainaWPs[1][0], JainaWPs[1][1], JainaWPs[1][2]);
|
||||
Start(false, false);
|
||||
SetDespawnAtEnd(false);//move to center of alliance base
|
||||
}
|
||||
if (Faction == 1)
|
||||
{
|
||||
instance->SetData(DATA_HORDE_RETREAT, 1);
|
||||
Creature* JainaDummy = me->SummonCreature(JAINA, JainaDummySpawn[0][0], JainaDummySpawn[0][1], JainaDummySpawn[0][2], JainaDummySpawn[0][3], TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
if (JainaDummy)
|
||||
{
|
||||
instance->SetData(DATA_ALLIANCE_RETREAT, 1);
|
||||
AddWaypoint(0, JainaWPs[0][0], JainaWPs[0][1], JainaWPs[0][2]);
|
||||
AddWaypoint(1, JainaWPs[1][0], JainaWPs[1][1], JainaWPs[1][2]);
|
||||
Start(false, false);
|
||||
SetDespawnAtEnd(false);//move to center of alliance base
|
||||
}
|
||||
if (Faction == 1)
|
||||
{
|
||||
instance->SetData(DATA_HORDE_RETREAT, 1);
|
||||
Creature* JainaDummy = me->SummonCreature(JAINA, JainaDummySpawn[0][0], JainaDummySpawn[0][1], JainaDummySpawn[0][2], JainaDummySpawn[0][3], TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
if (JainaDummy)
|
||||
{
|
||||
JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
CAST_AI(hyjalAI, JainaDummy->AI())->IsDummy = true;
|
||||
DummyGuid = JainaDummy->GetGUID();
|
||||
}
|
||||
AddWaypoint(0, JainaDummySpawn[1][0], JainaDummySpawn[1][1], JainaDummySpawn[1][2]);
|
||||
Start(false, false);
|
||||
SetDespawnAtEnd(false);//move to center of alliance base
|
||||
JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
CAST_AI(hyjalAI, JainaDummy->AI())->IsDummy = true;
|
||||
DummyGuid = JainaDummy->GetGUID();
|
||||
}
|
||||
AddWaypoint(0, JainaDummySpawn[1][0], JainaDummySpawn[1][1], JainaDummySpawn[1][2]);
|
||||
Start(false, false);
|
||||
SetDespawnAtEnd(false);//move to center of alliance base
|
||||
}
|
||||
SpawnVeins();
|
||||
Overrun = true;
|
||||
@@ -681,8 +663,6 @@ void hyjalAI::SpawnVeins()
|
||||
|
||||
void hyjalAI::DeSpawnVeins()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
if (Faction == 1)
|
||||
{
|
||||
Creature* unit=Unit::GetCreature((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
@@ -841,8 +821,7 @@ void hyjalAI::UpdateAI(uint32 diff)
|
||||
CheckTimer = 0;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
BossGUID[i] = 0;
|
||||
if (instance)
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -899,18 +878,16 @@ void hyjalAI::JustDied(Unit* /*killer*/)
|
||||
RespawnTimer = 120000;
|
||||
Talk(DEATH);
|
||||
Summons.DespawnAll();//despawn all wave's summons
|
||||
if (instance)
|
||||
{//reset encounter if boss is despawned (ex: thrall is killed, boss despawns, event stucks at inprogress)
|
||||
if (instance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die
|
||||
}
|
||||
//reset encounter if boss is despawned (ex: thrall is killed, boss despawns, event stucks at inprogress)
|
||||
if (instance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die
|
||||
}
|
||||
|
||||
void hyjalAI::HideNearPos(float x, float y)
|
||||
|
||||
@@ -195,8 +195,7 @@ void hyjal_trashAI::DamageTaken(Unit* done_by, uint32 &damage)
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER || done_by->IsPet())
|
||||
{
|
||||
damageTaken += damage;
|
||||
if (instance)
|
||||
instance->SetData(DATA_RAIDDAMAGE, damage);//store raid's damage
|
||||
instance->SetData(DATA_RAIDDAMAGE, damage);//store raid's damage
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,9 +398,6 @@ void hyjal_trashAI::UpdateAI(uint32 /*diff*/)
|
||||
|
||||
void hyjal_trashAI::JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (IsEvent && !me->isWorldBoss())
|
||||
instance->SetData(DATA_TRASH, 0);//signal trash is dead
|
||||
|
||||
@@ -488,16 +484,13 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(me->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
|
||||
CanMove = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT))
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
|
||||
if (target && target->IsAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
} else if (instance->GetData(DATA_ALLIANCE_RETREAT) && instance->GetData(DATA_HORDE_RETREAT)){
|
||||
//do overrun
|
||||
}
|
||||
Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL));
|
||||
if (target && target->IsAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
} else if (instance->GetData(DATA_ALLIANCE_RETREAT) && instance->GetData(DATA_HORDE_RETREAT)){
|
||||
//do overrun
|
||||
}
|
||||
} else spawnTimer -= diff;
|
||||
}
|
||||
@@ -510,12 +503,9 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, HordeWPs[7][0]+irand(-3, 3), HordeWPs[7][1]+irand(-3, 3), HordeWPs[7][2]);//HordeWPs[7] infront of thrall
|
||||
Start(true, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
AddWaypoint(0, HordeWPs[7][0]+irand(-3, 3), HordeWPs[7][1]+irand(-3, 3), HordeWPs[7][2]);//HordeWPs[7] infront of thrall
|
||||
Start(true, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,21 +596,18 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -709,21 +696,18 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -834,21 +818,18 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(true, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(true, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(true, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(true, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -930,21 +911,18 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1029,22 +1007,18 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1119,22 +1093,18 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else//use alliance WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1221,20 +1191,17 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (!useFlyPath)
|
||||
{
|
||||
if (!useFlyPath)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, FrostWyrmWPs[i][0], FrostWyrmWPs[i][1], FrostWyrmWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else{//fly path FlyPathWPs
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, FrostWyrmWPs[i][0], FrostWyrmWPs[i][1], FrostWyrmWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else{//fly path FlyPathWPs
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1334,20 +1301,17 @@ public:
|
||||
if (!go)
|
||||
{
|
||||
go = true;
|
||||
if (instance)
|
||||
if (!useFlyPath)
|
||||
{
|
||||
if (!useFlyPath)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, GargoyleWPs[i][0]+irand(-10, 10), GargoyleWPs[i][1]+irand(-10, 10), GargoyleWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else{//fly path FlyPathWPs
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, GargoyleWPs[i][0]+irand(-10, 10), GargoyleWPs[i][1]+irand(-10, 10), GargoyleWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}else{//fly path FlyPathWPs
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]);
|
||||
Start(false, true);
|
||||
SetDespawnAtEnd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-6
@@ -81,16 +81,14 @@ public:
|
||||
uiTimeStopTimer = 21300;
|
||||
uiWoundingStrikeTimer = 5300;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -132,8 +130,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EPOCH_EVENT, DONE);
|
||||
instance->SetData(DATA_EPOCH_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
|
||||
+3
-6
@@ -53,15 +53,13 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (instance)
|
||||
instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
@@ -76,8 +74,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(DATA_INFINITE_EVENT, DONE);
|
||||
instance->SetData(DATA_INFINITE_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -102,15 +102,13 @@ public:
|
||||
uiSleepTimer = urand(15000, 20000);
|
||||
uiOutroTimer = 1000;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
|
||||
@@ -154,8 +152,7 @@ public:
|
||||
{
|
||||
EnterEvadeMode();
|
||||
me->DisappearAndDie();
|
||||
if (instance)
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, FAIL);
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, FAIL);
|
||||
}
|
||||
|
||||
if (uiCarrionSwarmTimer < diff)
|
||||
@@ -228,13 +225,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, DONE);
|
||||
DoCastAOE(SPELL_MAL_GANIS_KILL_CREDIT);
|
||||
// give achievement credit and LFG rewards to players. criteria use spell 58630 which doesn't exist, but it was created in spell_dbc
|
||||
DoCastAOE(SPELL_KILL_CREDIT);
|
||||
}
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, DONE);
|
||||
DoCastAOE(SPELL_MAL_GANIS_KILL_CREDIT);
|
||||
// give achievement credit and LFG rewards to players. criteria use spell 58630 which doesn't exist, but it was created in spell_dbc
|
||||
DoCastAOE(SPELL_KILL_CREDIT);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
|
||||
@@ -59,8 +59,7 @@ public:
|
||||
boss_meathookAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
Talk(SAY_SPAWN);
|
||||
Talk(SAY_SPAWN);
|
||||
}
|
||||
|
||||
uint32 uiChainTimer;
|
||||
@@ -75,16 +74,14 @@ public:
|
||||
uiDiseaseTimer = urand(2000, 4000); //approx 3s
|
||||
uiFrenzyTimer = urand(21000, 26000); //made it up
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -119,8 +116,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, DONE);
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
|
||||
+4
-8
@@ -64,8 +64,7 @@ public:
|
||||
boss_salrammAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
Talk(SAY_SPAWN);
|
||||
Talk(SAY_SPAWN);
|
||||
}
|
||||
|
||||
uint32 uiCurseFleshTimer;
|
||||
@@ -84,16 +83,14 @@ public:
|
||||
uiStealFleshTimer = 12345;
|
||||
uiSummonGhoulsTimer = urand(19000, 24000); //on a video approx 24s after aggro
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -142,8 +139,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_SALRAMM_EVENT, DONE);
|
||||
instance->SetData(DATA_SALRAMM_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
|
||||
+68
-89
@@ -399,22 +399,20 @@ public:
|
||||
malganisGUID = 0;
|
||||
infiniteGUID = 0;
|
||||
|
||||
if (instance) {
|
||||
instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED);
|
||||
switch (instance->GetData(DATA_ARTHAS_EVENT))
|
||||
{
|
||||
case NOT_STARTED:
|
||||
bStepping = true;
|
||||
step = 0;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
bossEvent = DATA_MEATHOOK_EVENT;
|
||||
gossipStep = 0;
|
||||
break;
|
||||
}
|
||||
phaseTimer = 1000;
|
||||
exorcismTimer = 7300;
|
||||
wave = 0;
|
||||
instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED);
|
||||
switch (instance->GetData(DATA_ARTHAS_EVENT))
|
||||
{
|
||||
case NOT_STARTED:
|
||||
bStepping = true;
|
||||
step = 0;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
bossEvent = DATA_MEATHOOK_EVENT;
|
||||
gossipStep = 0;
|
||||
break;
|
||||
}
|
||||
phaseTimer = 1000;
|
||||
exorcismTimer = 7300;
|
||||
wave = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -424,8 +422,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARTHAS_EVENT, FAIL);
|
||||
instance->SetData(DATA_ARTHAS_EVENT, FAIL);
|
||||
}
|
||||
|
||||
void SpawnTimeRift(uint32 timeRiftID, uint64* guidVector)
|
||||
@@ -559,9 +556,8 @@ public:
|
||||
Talk(SAY_PHASE403);
|
||||
break;
|
||||
case 36:
|
||||
if (instance)
|
||||
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_SHKAF_GATE)))
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_SHKAF_GATE)))
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case 45:
|
||||
SetRun(true);
|
||||
@@ -888,8 +884,7 @@ public:
|
||||
Talk(SAY_PHASE209);
|
||||
|
||||
bossEvent = DATA_MEATHOOK_EVENT;
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
|
||||
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
SetDespawnAtFar(false);
|
||||
@@ -961,25 +956,22 @@ public:
|
||||
break;
|
||||
case 50: //Wait Boss death
|
||||
case 60:
|
||||
if (instance)
|
||||
if (instance->GetData(bossEvent) == DONE)
|
||||
{
|
||||
if (instance->GetData(bossEvent) == DONE)
|
||||
JumpToNextStep(1000);
|
||||
if (bossEvent == DATA_MEATHOOK_EVENT)
|
||||
bossEvent = DATA_SALRAMM_EVENT;
|
||||
else if (bossEvent == DATA_SALRAMM_EVENT)
|
||||
{
|
||||
JumpToNextStep(1000);
|
||||
if (bossEvent == DATA_MEATHOOK_EVENT)
|
||||
bossEvent = DATA_SALRAMM_EVENT;
|
||||
else if (bossEvent == DATA_SALRAMM_EVENT)
|
||||
{
|
||||
SetHoldState(false);
|
||||
bStepping = false;
|
||||
bossEvent = DATA_EPOCH_EVENT;
|
||||
}
|
||||
SetHoldState(false);
|
||||
bStepping = false;
|
||||
bossEvent = DATA_EPOCH_EVENT;
|
||||
}
|
||||
else if (instance->GetData(bossEvent) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
phaseTimer = 10000;
|
||||
}
|
||||
else if (instance->GetData(bossEvent) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
phaseTimer = 10000;
|
||||
break;
|
||||
//After Gossip 2 (waypoint 22)
|
||||
case 61:
|
||||
@@ -1096,53 +1088,47 @@ public:
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 80:
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
{
|
||||
SpawnTimeRift(17, &epochGUID);
|
||||
if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
|
||||
epoch->AI()->Talk(SAY_PHASE314);
|
||||
me->SetTarget(epochGUID);
|
||||
}
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
{
|
||||
SpawnTimeRift(17, &epochGUID);
|
||||
if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
|
||||
epoch->AI()->Talk(SAY_PHASE314);
|
||||
me->SetTarget(epochGUID);
|
||||
}
|
||||
JumpToNextStep(18000);
|
||||
break;
|
||||
case 81:
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
Talk(SAY_PHASE315);
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
Talk(SAY_PHASE315);
|
||||
JumpToNextStep(6000);
|
||||
break;
|
||||
case 82:
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
{
|
||||
if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
|
||||
{
|
||||
if (Creature* epoch = Unit::GetCreature(*me, epochGUID))
|
||||
{
|
||||
//Make Epoch attackable
|
||||
epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
epoch->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
//Make Epoch attackable
|
||||
epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
epoch->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
}
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 83:
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) == DONE)
|
||||
{
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) == DONE)
|
||||
{
|
||||
gossipStep = 3;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
bStepping = false;
|
||||
bossEvent = DATA_MAL_GANIS_EVENT;
|
||||
JumpToNextStep(15000);
|
||||
}
|
||||
else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
phaseTimer = 10000;
|
||||
gossipStep = 3;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
bStepping = false;
|
||||
bossEvent = DATA_MAL_GANIS_EVENT;
|
||||
JumpToNextStep(15000);
|
||||
}
|
||||
else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
phaseTimer = 10000;
|
||||
break;
|
||||
//After Gossip 4
|
||||
case 84:
|
||||
@@ -1158,9 +1144,8 @@ public:
|
||||
malganisGUID = malganis->GetGUID();
|
||||
malganis->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
if (instance)
|
||||
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1)))
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1)))
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
SetHoldState(false);
|
||||
bStepping = false;
|
||||
JumpToNextStep(0);
|
||||
@@ -1180,18 +1165,15 @@ public:
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 88:
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_MAL_GANIS_EVENT) == DONE)
|
||||
{
|
||||
if (instance->GetData(DATA_MAL_GANIS_EVENT) == DONE)
|
||||
{
|
||||
SetHoldState(false);
|
||||
JumpToNextStep(1000);
|
||||
}
|
||||
else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
phaseTimer = 10000;
|
||||
SetHoldState(false);
|
||||
JumpToNextStep(1000);
|
||||
}
|
||||
else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
phaseTimer = 10000;
|
||||
break;
|
||||
//After waypoint 56
|
||||
case 89:
|
||||
@@ -1201,11 +1183,8 @@ public:
|
||||
JumpToNextStep(7000);
|
||||
break;
|
||||
case 90:
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
|
||||
me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
|
||||
}
|
||||
instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
|
||||
me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
|
||||
Talk(SAY_PHASE504);
|
||||
bStepping = false;
|
||||
break;
|
||||
|
||||
@@ -291,9 +291,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 waypointId) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 8:
|
||||
@@ -526,8 +523,7 @@ public:
|
||||
}
|
||||
void JustDied(Unit* slayer) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_THRALL_EVENT, FAIL);
|
||||
instance->SetData(TYPE_THRALL_EVENT, FAIL);
|
||||
|
||||
// Don't do a yell if he kills self (if player goes too far or at the end).
|
||||
if (slayer == me)
|
||||
|
||||
@@ -90,11 +90,8 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_RIFT, DONE);
|
||||
instance->SetData(TYPE_MEDIVH, DONE); // FIXME: later should be removed
|
||||
}
|
||||
instance->SetData(TYPE_RIFT, DONE);
|
||||
instance->SetData(TYPE_MEDIVH, DONE); // FIXME: later should be removed
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) OVERRIDE
|
||||
|
||||
@@ -98,8 +98,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -81,8 +81,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
@@ -97,9 +97,6 @@ public:
|
||||
Life50 = true;
|
||||
Life25 = true;
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
DoCast(me, SPELL_CHANNEL, true);
|
||||
else if (me->HasAura(SPELL_CHANNEL))
|
||||
@@ -109,11 +106,7 @@ public:
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS || instance->GetData(TYPE_MEDIVH) == DONE)
|
||||
@@ -175,9 +168,6 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (SpellCorrupt_Timer)
|
||||
{
|
||||
if (SpellCorrupt_Timer <= diff)
|
||||
@@ -291,9 +281,6 @@ public:
|
||||
TimeRiftWave_Timer = 15000;
|
||||
mRiftWaveCount = 0;
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
mPortalCount = instance->GetData(DATA_PORTAL_COUNT);
|
||||
|
||||
if (mPortalCount < 6)
|
||||
@@ -349,9 +336,6 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (TimeRiftWave_Timer <= diff)
|
||||
{
|
||||
DoSelectSummon();
|
||||
|
||||
@@ -145,12 +145,9 @@ public:
|
||||
SummonWhelpCount = 0;
|
||||
IsMoving = false;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_ONYXIA, NOT_STARTED);
|
||||
instance->SetData(DATA_ONYXIA_PHASE, Phase);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
instance->SetBossState(DATA_ONYXIA, NOT_STARTED);
|
||||
instance->SetData(DATA_ONYXIA_PHASE, Phase);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -163,17 +160,13 @@ public:
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand (2000, 5000));
|
||||
events.ScheduleEvent(EVENT_WING_BUFFET, urand (10000, 20000));
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_ONYXIA, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
instance->SetBossState(DATA_ONYXIA, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_ONYXIA, DONE);
|
||||
instance->SetBossState(DATA_ONYXIA, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
@@ -246,8 +239,7 @@ public:
|
||||
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25);
|
||||
me->SetSpeed(MOVE_FLIGHT, 1.0f);
|
||||
Talk(SAY_PHASE_2_TRANS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ONYXIA_PHASE, Phase);
|
||||
instance->SetData(DATA_ONYXIA_PHASE, Phase);
|
||||
events.ScheduleEvent(EVENT_WHELP_SPAWN, 5000);
|
||||
events.ScheduleEvent(EVENT_LAIR_GUARD, 15000);
|
||||
break;
|
||||
@@ -280,10 +272,7 @@ public:
|
||||
(Spell->Id >= 22267 && Spell->Id <= 22268)) &&
|
||||
(target->GetTypeId() == TYPEID_PLAYER))
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_SHE_DEEP_BREATH_MORE, FAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,8 +372,7 @@ public:
|
||||
if (HealthBelowPct(40))
|
||||
{
|
||||
Phase = PHASE_END;
|
||||
if (instance)
|
||||
instance->SetData(DATA_ONYXIA_PHASE, PHASE_END);
|
||||
instance->SetData(DATA_ONYXIA_PHASE, PHASE_END);
|
||||
Talk(SAY_PHASE_3_TRANS);
|
||||
|
||||
SetCombatMovement(true);
|
||||
|
||||
@@ -341,9 +341,6 @@ public:
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (data < 7)
|
||||
{
|
||||
me->SummonCreature(NPC_WITHERED_BATTLE_BOAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
@@ -397,8 +394,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_WAVE, me->GetEntry());
|
||||
instance->SetData(DATA_WAVE, me->GetEntry());
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
|
||||
@@ -136,26 +136,23 @@ class boss_ossirian : public CreatureScript
|
||||
DoCast(me, SPELL_SUPREME);
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_WEATHER, (4+4+4));
|
||||
data << uint32(WEATHER_STATE_HEAVY_SANDSTORM) << float(1) << uint8(0);
|
||||
map->SendToPlayers(&data);
|
||||
|
||||
for (uint8 i = 0; i < NUM_TORNADOS; ++i)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_WEATHER, (4+4+4));
|
||||
data << uint32(WEATHER_STATE_HEAVY_SANDSTORM) << float(1) << uint8(0);
|
||||
map->SendToPlayers(&data);
|
||||
|
||||
for (uint8 i = 0; i < NUM_TORNADOS; ++i)
|
||||
{
|
||||
Position Point;
|
||||
me->GetRandomPoint(RoomCenter, RoomRadius, Point);
|
||||
if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point))
|
||||
Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true);
|
||||
}
|
||||
|
||||
SpawnNextCrystal();
|
||||
Position Point;
|
||||
me->GetRandomPoint(RoomCenter, RoomRadius, Point);
|
||||
if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point))
|
||||
Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true);
|
||||
}
|
||||
|
||||
SpawnNextCrystal();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
|
||||
@@ -83,14 +83,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
@@ -174,14 +170,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_VEM_DEATH, 0);
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
instance->SetData(DATA_VEM_DEATH, 0);
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -267,13 +259,9 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
@@ -306,22 +294,19 @@ public:
|
||||
//Casting Heal to other twins or herself.
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
if (Creature* kri = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KRI)))
|
||||
DoCast(kri, SPELL_HEAL);
|
||||
break;
|
||||
case 1:
|
||||
if (Creature* vem = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VEM)))
|
||||
DoCast(vem, SPELL_HEAL);
|
||||
break;
|
||||
case 2:
|
||||
DoCast(me, SPELL_HEAL);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
if (Creature* kri = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KRI)))
|
||||
DoCast(kri, SPELL_HEAL);
|
||||
break;
|
||||
case 1:
|
||||
if (Creature* vem = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VEM)))
|
||||
DoCast(vem, SPELL_HEAL);
|
||||
break;
|
||||
case 2:
|
||||
DoCast(me, SPELL_HEAL);
|
||||
break;
|
||||
}
|
||||
|
||||
Heal_Timer = 15000+rand()%15000;
|
||||
@@ -332,13 +317,10 @@ public:
|
||||
{
|
||||
if (!VemDead)
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_VEMISDEAD))
|
||||
{
|
||||
if (instance->GetData(DATA_VEMISDEAD))
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
VemDead = true;
|
||||
}
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
VemDead = true;
|
||||
}
|
||||
}
|
||||
Check_Timer = 2000;
|
||||
|
||||
@@ -161,8 +161,6 @@ public:
|
||||
eye_of_cthunAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
if (!instance)
|
||||
TC_LOG_ERROR("scripts", "No Instance eye_of_cthunAI");
|
||||
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
@@ -206,8 +204,7 @@ public:
|
||||
me->SetVisible(true);
|
||||
|
||||
//Reset Phase
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
|
||||
//to avoid having a following void zone
|
||||
Creature* pPortal= me->FindNearestCreature(NPC_CTHUN_PORTAL, 10);
|
||||
@@ -218,8 +215,7 @@ public:
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoZoneInCombat();
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM);
|
||||
}
|
||||
|
||||
void SpawnEyeTentacle(float x, float y)
|
||||
@@ -236,10 +232,6 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//No instance
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE);
|
||||
if (currentPhase == PHASE_EYE_GREEN_BEAM || currentPhase == PHASE_EYE_RED_BEAM)
|
||||
{
|
||||
@@ -404,10 +396,6 @@ public:
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
|
||||
{
|
||||
//No instance
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (instance->GetData(DATA_CTHUN_PHASE))
|
||||
{
|
||||
case PHASE_EYE_GREEN_BEAM:
|
||||
@@ -469,8 +457,6 @@ public:
|
||||
SetCombatMovement(false);
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
if (!instance)
|
||||
TC_LOG_ERROR("scripts", "No Instance eye_of_cthunAI");
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -528,8 +514,7 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetVisible(false);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -615,10 +600,6 @@ public:
|
||||
|
||||
me->SetTarget(0);
|
||||
|
||||
//No instance
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE);
|
||||
if (currentPhase == PHASE_CTHUN_STOMACH || currentPhase == PHASE_CTHUN_WEAK)
|
||||
{
|
||||
@@ -861,16 +842,11 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_DONE);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_DONE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
|
||||
{
|
||||
//No instance
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (instance->GetData(DATA_CTHUN_PHASE))
|
||||
{
|
||||
case PHASE_CTHUN_STOMACH:
|
||||
|
||||
@@ -103,10 +103,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
|
||||
Creature* GetOtherBoss()
|
||||
{
|
||||
if (instance)
|
||||
return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
|
||||
else
|
||||
return NULL;
|
||||
return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
|
||||
@@ -210,9 +207,6 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
|
||||
void TeleportToMyBrother()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
Teleport_Timer = TELEPORTTIME;
|
||||
|
||||
if (IAmVeklor())
|
||||
|
||||
@@ -263,8 +263,6 @@ class npc_glob_of_viscidus : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
InstanceScript* Instance = me->GetInstanceScript();
|
||||
if (!Instance)
|
||||
return;
|
||||
|
||||
if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetData64(DATA_VISCIDUS)))
|
||||
{
|
||||
@@ -289,14 +287,15 @@ class npc_glob_of_viscidus : public CreatureScript
|
||||
if (id == ROOM_CENTER)
|
||||
{
|
||||
DoCast(me, SPELL_REJOIN_VISCIDUS);
|
||||
((TempSummon*)me)->UnSummon();
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
summon->UnSummon();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_glob_of_viscidusAI(creature);
|
||||
return GetInstanceAI<npc_glob_of_viscidusAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -152,9 +152,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 waypointId) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
@@ -194,13 +191,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*slayer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_NARALEX_EVENT, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART1, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART2, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART3, FAIL);
|
||||
}
|
||||
instance->SetData(TYPE_NARALEX_EVENT, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART1, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART2, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART3, FAIL);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
@@ -213,8 +207,6 @@ public:
|
||||
if (currentEvent != TYPE_NARALEX_PART3)
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
if (eventTimer <= diff)
|
||||
{
|
||||
eventTimer = 0;
|
||||
|
||||
@@ -78,8 +78,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZUM_RAH, DONE);
|
||||
instance->SetData(DATA_ZUM_RAH, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
|
||||
@@ -148,12 +148,9 @@ public:
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID))
|
||||
AttackStart(target);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
switchFactionIfAlive(instance, ENTRY_RAVEN);
|
||||
switchFactionIfAlive(instance, ENTRY_ORO);
|
||||
switchFactionIfAlive(instance, ENTRY_MURTA);
|
||||
}
|
||||
switchFactionIfAlive(instance, ENTRY_RAVEN);
|
||||
switchFactionIfAlive(instance, ENTRY_ORO);
|
||||
switchFactionIfAlive(instance, ENTRY_MURTA);
|
||||
}
|
||||
postGossipStep++;
|
||||
}
|
||||
@@ -316,8 +313,7 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
/*if (instance)
|
||||
instance->SetData(0, NOT_STARTED);*/
|
||||
/*instance->SetData(0, NOT_STARTED);*/
|
||||
}
|
||||
|
||||
void AttackStart(Unit* victim) OVERRIDE
|
||||
@@ -327,8 +323,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
/*if (instance)
|
||||
instance->SetData(0, DONE);*/
|
||||
/*instance->SetData(0, DONE);*/
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -358,22 +353,19 @@ public:
|
||||
|
||||
void MovementInform(uint32 /*type*/, uint32 /*id*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN)
|
||||
{
|
||||
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN)
|
||||
{
|
||||
instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR);
|
||||
Talk(SAY_WEEGLI_OHNO);
|
||||
me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0);
|
||||
}
|
||||
else
|
||||
if (destroyingDoor)
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_END_DOOR));
|
||||
/// @todo leave the area...
|
||||
me->DespawnOrUnsummon();
|
||||
};
|
||||
instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR);
|
||||
Talk(SAY_WEEGLI_OHNO);
|
||||
me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0);
|
||||
}
|
||||
else
|
||||
if (destroyingDoor)
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_END_DOOR));
|
||||
/// @todo leave the area...
|
||||
me->DespawnOrUnsummon();
|
||||
};
|
||||
}
|
||||
|
||||
void DoAction(int32 /*param*/) OVERRIDE
|
||||
|
||||
@@ -149,11 +149,8 @@ public:
|
||||
uiShadowBoltVolleyTimer = 5*IN_MILLISECONDS;
|
||||
uiShiverTimer = 15*IN_MILLISECONDS;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
}
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
|
||||
// Visible for all players in insanity
|
||||
me->SetPhaseMask((1|16|32|64|128|256), true);
|
||||
@@ -172,11 +169,8 @@ public:
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
}
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
@@ -295,8 +289,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, DONE);
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
ResetPlayersPhaseMask();
|
||||
|
||||
@@ -101,15 +101,12 @@ public:
|
||||
bCanDown = false;
|
||||
volunteerWork = true;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (!bFirstTime)
|
||||
instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, FAIL);
|
||||
if (!bFirstTime)
|
||||
instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, FAIL);
|
||||
|
||||
instance->SetData64(DATA_PL_JEDOGA_TARGET, 0);
|
||||
instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0);
|
||||
instance->SetData(DATA_JEDOGA_RESET_INITIANDS, 0);
|
||||
}
|
||||
instance->SetData64(DATA_PL_JEDOGA_TARGET, 0);
|
||||
instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0);
|
||||
instance->SetData(DATA_JEDOGA_RESET_INITIANDS, 0);
|
||||
MoveUp();
|
||||
|
||||
bFirstTime = false;
|
||||
@@ -144,8 +141,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(TEXT_DEATH);
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, DONE);
|
||||
instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, DONE);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) OVERRIDE
|
||||
@@ -197,9 +193,6 @@ public:
|
||||
|
||||
void MoveDown()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
bOpFerokFail = false;
|
||||
|
||||
instance->SetData(DATA_JEDOGA_TRIGGER_SWITCH, 0);
|
||||
@@ -233,9 +226,6 @@ public:
|
||||
|
||||
void MoveUp()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -255,9 +245,6 @@ public:
|
||||
|
||||
void OpferRufen()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
uint64 opfer = instance->GetData64(DATA_ADD_JEDOGA_INITIAND);
|
||||
|
||||
if (opfer)
|
||||
@@ -281,9 +268,6 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (instance->GetBossState(DATA_JEDOGA_SHADOWSEEKER) != IN_PROGRESS && instance->GetData(DATA_ALL_INITIAND_DEAD))
|
||||
MoveDown();
|
||||
|
||||
@@ -361,9 +345,6 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
bWalking = false;
|
||||
bCheckTimer = 2*IN_MILLISECONDS;
|
||||
|
||||
@@ -549,9 +530,6 @@ public:
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (!bRemoved && me->GetPositionX() > 440.0f)
|
||||
{
|
||||
if (instance->GetBossState(DATA_PRINCE_TALDARAM) == DONE)
|
||||
|
||||
@@ -130,11 +130,8 @@ public:
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_ANUBARAK, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
instance->SetBossState(DATA_ANUBARAK, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
Creature* DoSummonImpaleTarget(Unit* target)
|
||||
@@ -158,14 +155,12 @@ public:
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
DelayTimer = 0;
|
||||
if (instance)
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
void DelayEventStart()
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_ANUBARAK, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_ANUBARAK, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -335,8 +330,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
Summons.DespawnAll();
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_ANUBARAK, DONE);
|
||||
instance->SetBossState(DATA_ANUBARAK, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
|
||||
@@ -102,14 +102,12 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_HADRONOX, DONE);
|
||||
instance->SetBossState(DATA_HADRONOX, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_HADRONOX, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_HADRONOX, IN_PROGRESS);
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
|
||||
+3
-6
@@ -104,8 +104,7 @@ public:
|
||||
uiMindFlayTimer = 15*IN_MILLISECONDS;
|
||||
uiCurseFatigueTimer = 12*IN_MILLISECONDS;
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, NOT_STARTED);
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -114,8 +113,7 @@ public:
|
||||
Summon();
|
||||
uiSummonTimer = 15*IN_MILLISECONDS;
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void Summon()
|
||||
@@ -175,8 +173,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, DONE);
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
|
||||
@@ -340,40 +340,37 @@ public:
|
||||
|
||||
void CallDragon(uint32 dataId)
|
||||
{
|
||||
if (instance)
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(dataId)))
|
||||
{
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(dataId)))
|
||||
if (temp->IsAlive() && !temp->GetVictim())
|
||||
{
|
||||
if (temp->IsAlive() && !temp->GetVictim())
|
||||
temp->SetWalk(false);
|
||||
|
||||
if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
uint8 textId = 0;
|
||||
|
||||
switch (temp->GetEntry())
|
||||
{
|
||||
temp->SetWalk(false);
|
||||
|
||||
if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
uint8 textId = 0;
|
||||
|
||||
switch (temp->GetEntry())
|
||||
{
|
||||
case NPC_TENEBRON:
|
||||
textId = SAY_SARTHARION_CALL_TENEBRON;
|
||||
temp->AddAura(SPELL_POWER_OF_TENEBRON, temp);
|
||||
temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, TenebronPositions[1]);
|
||||
break;
|
||||
case NPC_SHADRON:
|
||||
textId = SAY_SARTHARION_CALL_SHADRON;
|
||||
temp->AddAura(SPELL_POWER_OF_SHADRON, temp);
|
||||
temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, ShadronPositions[1]);
|
||||
break;
|
||||
case NPC_VESPERON:
|
||||
textId = SAY_SARTHARION_CALL_VESPERON;
|
||||
temp->AddAura(SPELL_POWER_OF_VESPERON, temp);
|
||||
temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, VesperonPositions[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
Talk(textId);
|
||||
case NPC_TENEBRON:
|
||||
textId = SAY_SARTHARION_CALL_TENEBRON;
|
||||
temp->AddAura(SPELL_POWER_OF_TENEBRON, temp);
|
||||
temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, TenebronPositions[1]);
|
||||
break;
|
||||
case NPC_SHADRON:
|
||||
textId = SAY_SARTHARION_CALL_SHADRON;
|
||||
temp->AddAura(SPELL_POWER_OF_SHADRON, temp);
|
||||
temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, ShadronPositions[1]);
|
||||
break;
|
||||
case NPC_VESPERON:
|
||||
textId = SAY_SARTHARION_CALL_VESPERON;
|
||||
temp->AddAura(SPELL_POWER_OF_VESPERON, temp);
|
||||
temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, VesperonPositions[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
Talk(textId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-14
@@ -350,22 +350,19 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
Talk(SAY_DEATH);
|
||||
me->RemoveAurasDueToSpell(spellId);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(spellId);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(spellId);
|
||||
|
||||
// not if solo mini-boss fight
|
||||
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
return;
|
||||
// not if solo mini-boss fight
|
||||
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
return;
|
||||
|
||||
// Twilight Revenge to main boss
|
||||
if (Unit* sartharion = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SARTHARION)))
|
||||
if (sartharion->IsAlive())
|
||||
{
|
||||
sartharion->RemoveAurasDueToSpell(spellId);
|
||||
DoCast(sartharion, SPELL_TWILIGHT_REVENGE, true);
|
||||
}
|
||||
}
|
||||
// Twilight Revenge to main boss
|
||||
if (Unit* sartharion = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SARTHARION)))
|
||||
if (sartharion->IsAlive())
|
||||
{
|
||||
sartharion->RemoveAurasDueToSpell(spellId);
|
||||
DoCast(sartharion, SPELL_TWILIGHT_REVENGE, true);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
+3
-6
@@ -196,8 +196,7 @@ public:
|
||||
if (MovementType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_ARGENT_CHALLENGE_E, DONE);
|
||||
instance->SetData(BOSS_ARGENT_CHALLENGE_E, DONE);
|
||||
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
@@ -320,8 +319,7 @@ public:
|
||||
if (MovementType != POINT_MOTION_TYPE || Point != 0)
|
||||
return;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_ARGENT_CHALLENGE_P, DONE);
|
||||
instance->SetData(BOSS_ARGENT_CHALLENGE_P, DONE);
|
||||
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
@@ -582,8 +580,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, instance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1);
|
||||
instance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, instance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-2
@@ -293,8 +293,7 @@ public:
|
||||
{
|
||||
DoCast(me, SPELL_KILL_CREDIT);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_BLACK_KNIGHT, DONE);
|
||||
instance->SetData(BOSS_BLACK_KNIGHT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+9
-21
@@ -207,9 +207,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 waypointId) OVERRIDE
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 2:
|
||||
@@ -426,8 +423,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -507,8 +503,7 @@ public:
|
||||
else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3))
|
||||
me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
|
||||
EnterEvadeMode();
|
||||
bHome = true;
|
||||
@@ -565,8 +560,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -652,8 +646,7 @@ public:
|
||||
else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3))
|
||||
me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
|
||||
EnterEvadeMode();
|
||||
bHome = true;
|
||||
@@ -712,8 +705,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -798,8 +790,7 @@ public:
|
||||
else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3))
|
||||
me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
|
||||
EnterEvadeMode();
|
||||
bHome = true;
|
||||
@@ -868,8 +859,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -946,8 +936,7 @@ public:
|
||||
else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3))
|
||||
me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
|
||||
EnterEvadeMode();
|
||||
bHome = true;
|
||||
@@ -989,8 +978,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
instance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+6
-18
@@ -236,11 +236,8 @@ public:
|
||||
if (Vehicle* pVehicle = pBoss->GetVehicleKit())
|
||||
if (Unit* unit = pVehicle->GetPassenger(0))
|
||||
uiGrandChampionBoss1 = unit->GetGUID();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID);
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_1, uiGrandChampionBoss1);
|
||||
}
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID);
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_1, uiGrandChampionBoss1);
|
||||
pBoss->AI()->SetData(1, 0);
|
||||
break;
|
||||
}
|
||||
@@ -251,11 +248,8 @@ public:
|
||||
if (Vehicle* pVehicle = pBoss->GetVehicleKit())
|
||||
if (Unit* unit = pVehicle->GetPassenger(0))
|
||||
uiGrandChampionBoss2 = unit->GetGUID();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID);
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_2, uiGrandChampionBoss2);
|
||||
}
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID);
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_2, uiGrandChampionBoss2);
|
||||
pBoss->AI()->SetData(2, 0);
|
||||
break;
|
||||
}
|
||||
@@ -266,11 +260,8 @@ public:
|
||||
if (Vehicle* pVehicle = pBoss->GetVehicleKit())
|
||||
if (Unit* unit = pVehicle->GetPassenger(0))
|
||||
uiGrandChampionBoss3 = unit->GetGUID();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID);
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_3, uiGrandChampionBoss3);
|
||||
}
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID);
|
||||
instance->SetData64(DATA_GRAND_CHAMPION_3, uiGrandChampionBoss3);
|
||||
pBoss->AI()->SetData(3, 0);
|
||||
break;
|
||||
}
|
||||
@@ -359,9 +350,6 @@ public:
|
||||
|
||||
void StartEncounter()
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
if (instance->GetData(BOSS_BLACK_KNIGHT) == NOT_STARTED)
|
||||
|
||||
+2
-4
@@ -201,8 +201,7 @@ class boss_anubarak_trial : public CreatureScript
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_KILL_PLAYER);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,8 +217,7 @@ class boss_anubarak_trial : public CreatureScript
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(BOSS_ANUBARAK, FAIL);
|
||||
instance->SetBossState(BOSS_ANUBARAK, FAIL);
|
||||
//Summon Scarab Swarms neutral at random places
|
||||
for (int i = 0; i < 10; i++)
|
||||
if (Creature* temp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
|
||||
|
||||
+15
-21
@@ -559,9 +559,8 @@ struct boss_faction_championsAI : public BossAI
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, FAIL);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, FAIL);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
@@ -610,18 +609,16 @@ struct boss_faction_championsAI : public BossAI
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (_aiType != AI_PET)
|
||||
if (instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, DONE);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoCast(me, SPELL_ANTI_AOE, true);
|
||||
_EnterCombat();
|
||||
if (instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, IN_PROGRESS);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) OVERRIDE
|
||||
@@ -635,20 +632,17 @@ struct boss_faction_championsAI : public BossAI
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
TeamInInstance = player->GetTeam();
|
||||
|
||||
if (instance)
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
{
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
{
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_VARIAN)))
|
||||
temp->AI()->Talk(SAY_KILL_PLAYER);
|
||||
}
|
||||
else
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_GARROSH)))
|
||||
temp->AI()->Talk(SAY_KILL_PLAYER);
|
||||
|
||||
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_VARIAN)))
|
||||
temp->AI()->Talk(SAY_KILL_PLAYER);
|
||||
}
|
||||
else
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_GARROSH)))
|
||||
temp->AI()->Talk(SAY_KILL_PLAYER);
|
||||
|
||||
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -116,8 +116,7 @@ class boss_jaraxxus : public CreatureScript
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
_JustReachedHome();
|
||||
if (instance)
|
||||
instance->SetBossState(BOSS_JARAXXUS, FAIL);
|
||||
instance->SetBossState(BOSS_JARAXXUS, FAIL);
|
||||
DoCast(me, SPELL_JARAXXUS_CHAINS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
@@ -127,8 +126,7 @@ class boss_jaraxxus : public CreatureScript
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_KILL_PLAYER);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-34
@@ -195,17 +195,14 @@ class boss_gormok : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
|
||||
}
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
}
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
@@ -514,20 +511,17 @@ struct boss_jormungarAI : public BossAI
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
if (Creature* otherWorm = Unit::GetCreature(*me, instance->GetData64(OtherWormEntry)))
|
||||
{
|
||||
if (Creature* otherWorm = Unit::GetCreature(*me, instance->GetData64(OtherWormEntry)))
|
||||
if (!otherWorm->IsAlive())
|
||||
{
|
||||
if (!otherWorm->IsAlive())
|
||||
{
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
otherWorm->DespawnOrUnsummon();
|
||||
}
|
||||
else
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
|
||||
me->DespawnOrUnsummon();
|
||||
otherWorm->DespawnOrUnsummon();
|
||||
}
|
||||
else
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,16 +537,14 @@ struct boss_jormungarAI : public BossAI
|
||||
void KilledUnit(Unit* who) OVERRIDE
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
me->SetInCombatWithZone();
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -770,8 +762,7 @@ class boss_dreadscale : public CreatureScript
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
|
||||
boss_jormungarAI::JustReachedHome();
|
||||
}
|
||||
@@ -884,8 +875,7 @@ class boss_icehowl : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 pointId) OVERRIDE
|
||||
@@ -933,11 +923,8 @@ class boss_icehowl : public CreatureScript
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
}
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
@@ -945,16 +932,14 @@ class boss_icehowl : public CreatureScript
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE
|
||||
|
||||
+19
-30
@@ -165,8 +165,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetBossState(BOSS_VALKIRIES, FAIL);
|
||||
instance->SetBossState(BOSS_VALKIRIES, FAIL);
|
||||
|
||||
summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
@@ -193,8 +192,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_KILL_PLAYER);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,21 +225,18 @@ struct boss_twin_baseAI : public BossAI
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
if (Creature* pSister = GetSister())
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
if (!pSister->IsAlive())
|
||||
{
|
||||
if (!pSister->IsAlive())
|
||||
{
|
||||
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
_JustDied();
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetBossState(BOSS_VALKIRIES, SPECIAL);
|
||||
}
|
||||
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
_JustDied();
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetBossState(BOSS_VALKIRIES, SPECIAL);
|
||||
}
|
||||
}
|
||||
summons.DespawnAll();
|
||||
@@ -256,15 +251,12 @@ struct boss_twin_baseAI : public BossAI
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (instance)
|
||||
if (Creature* pSister = GetSister())
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
{
|
||||
me->AddAura(MyEmphatySpellId, pSister);
|
||||
pSister->SetInCombatWithZone();
|
||||
}
|
||||
instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
|
||||
me->AddAura(MyEmphatySpellId, pSister);
|
||||
pSister->SetInCombatWithZone();
|
||||
}
|
||||
instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
DoCast(me, SurgeSpellId);
|
||||
@@ -420,15 +412,13 @@ class boss_fjola : public CreatureScript
|
||||
TouchSpellId = SPELL_LIGHT_TOUCH;
|
||||
SpikeSpellId = SPELL_LIGHT_TWIN_SPIKE;
|
||||
|
||||
if (instance)
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
boss_twin_baseAI::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
|
||||
me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
boss_twin_baseAI::EnterCombat(who);
|
||||
@@ -442,8 +432,7 @@ class boss_fjola : public CreatureScript
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
|
||||
boss_twin_baseAI::JustReachedHome();
|
||||
}
|
||||
|
||||
@@ -209,19 +209,16 @@ class npc_corrupted_soul_fragment : public CreatureScript
|
||||
if (type != CHASE_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (instance)
|
||||
if (TempSummon* summ = me->ToTempSummon())
|
||||
{
|
||||
if (TempSummon* summ = me->ToTempSummon())
|
||||
{
|
||||
uint64 BronjahmGUID = instance->GetData64(DATA_BRONJAHM);
|
||||
if (GUID_LOPART(BronjahmGUID) != id)
|
||||
return;
|
||||
uint64 BronjahmGUID = instance->GetData64(DATA_BRONJAHM);
|
||||
if (GUID_LOPART(BronjahmGUID) != id)
|
||||
return;
|
||||
|
||||
if (Creature* bronjahm = ObjectAccessor::GetCreature(*me, BronjahmGUID))
|
||||
me->CastSpell(bronjahm, SPELL_CONSUME_SOUL, true);
|
||||
if (Creature* bronjahm = ObjectAccessor::GetCreature(*me, BronjahmGUID))
|
||||
me->CastSpell(bronjahm, SPELL_CONSUME_SOUL, true);
|
||||
|
||||
summ->UnSummon();
|
||||
}
|
||||
summ->UnSummon();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,9 +113,6 @@ public:
|
||||
{
|
||||
if (phase == PHASE_INTRO)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
@@ -239,9 +236,6 @@ public:
|
||||
{
|
||||
if (phase == PHASE_INTRO)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
|
||||
@@ -67,15 +67,13 @@ public:
|
||||
|
||||
uiHopelessnessCount = 0;
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_FALRIC_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_FALRIC_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_FALRIC_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_FALRIC_EVENT, IN_PROGRESS);
|
||||
|
||||
events.ScheduleEvent(EVENT_QUIVERING_STRIKE, 23000);
|
||||
events.ScheduleEvent(EVENT_IMPENDING_DESPAIR, 9000);
|
||||
@@ -86,8 +84,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_FALRIC_EVENT, DONE);
|
||||
instance->SetBossState(DATA_FALRIC_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
|
||||
@@ -62,15 +62,13 @@ public:
|
||||
{
|
||||
boss_horAI::Reset();
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_MARWYN_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_MARWYN_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_MARWYN_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_MARWYN_EVENT, IN_PROGRESS);
|
||||
|
||||
events.ScheduleEvent(EVENT_OBLITERATE, 30000); /// @todo Check timer
|
||||
events.ScheduleEvent(EVENT_WELL_OF_CORRUPTION, 13000);
|
||||
@@ -82,8 +80,7 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetBossState(DATA_MARWYN_EVENT, DONE);
|
||||
instance->SetBossState(DATA_MARWYN_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
|
||||
@@ -278,11 +278,8 @@ class boss_drakkari_elemental : public CreatureScript
|
||||
if (killer == me)
|
||||
return;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
|
||||
killer->Kill(colossus);
|
||||
}
|
||||
if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
|
||||
killer->Kill(colossus);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -317,12 +314,9 @@ class boss_drakkari_elemental : public CreatureScript
|
||||
{
|
||||
case ACTION_RETURN_TO_COLOSSUS:
|
||||
DoCast(SPELL_SURGE_VISUAL);
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
|
||||
// what if the elemental is more than 80 yards from drakkari colossus ?
|
||||
DoCast(colossus, SPELL_MERGE, true);
|
||||
}
|
||||
if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS)))
|
||||
// what if the elemental is more than 80 yards from drakkari colossus ?
|
||||
DoCast(colossus, SPELL_MERGE, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,14 +65,12 @@ public:
|
||||
|
||||
bBerserk = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, IN_PROGRESS);
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -127,8 +125,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, DONE);
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -155,12 +152,9 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData64(DATA_RUIN_DWELLER_DIED, me->GetGUID());
|
||||
if (instance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0)
|
||||
me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILLISECONDS);
|
||||
}
|
||||
instance->SetData64(DATA_RUIN_DWELLER_DIED, me->GetGUID());
|
||||
if (instance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0)
|
||||
me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILLISECONDS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user