mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-02 15:17:27 +01:00
Scripts/Trial of the Crusader: Made instance script a more readable, fixed early despawning of worm boss
Closes issue #3915. --HG-- branch : trunk extra : rebase_source : 7c086f0859bec23e53b2f9f9b2c458c48b9940df
This commit is contained in:
@@ -187,7 +187,7 @@ public:
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(urand(0,1) ? SAY_KILL1 : SAY_KILL2,me);
|
||||
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
{
|
||||
if (!m_bIntro)
|
||||
{
|
||||
DoScriptText(SAY_INTRO,me);
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
m_bIntro = false;
|
||||
}
|
||||
}
|
||||
@@ -208,14 +208,14 @@ public:
|
||||
m_pInstance->SetData(TYPE_ANUBARAK, FAIL);
|
||||
//Summon Scarab Swarms neutral at random places
|
||||
for (int i=0; i < 10; i++)
|
||||
if (Creature* pTemp = me->SummonCreature(NPC_SCARAB,AnubarakLoc[1].GetPositionX()+urand(0,50)-25,AnubarakLoc[1].GetPositionY()+urand(0,50)-25,AnubarakLoc[1].GetPositionZ()))
|
||||
if (Creature* pTemp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
|
||||
pTemp->setFaction(31);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
DoScriptText(SAY_DEATH,me);
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ANUBARAK, DONE);
|
||||
}
|
||||
@@ -223,16 +223,16 @@ public:
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM);
|
||||
switch(pSummoned->GetEntry())
|
||||
switch (pSummoned->GetEntry())
|
||||
{
|
||||
case NPC_BURROW:
|
||||
m_vBurrowGUID.push_back(pSummoned->GetGUID());
|
||||
pSummoned->SetReactState(REACT_PASSIVE);
|
||||
pSummoned->CastSpell(pSummoned,SPELL_CHURNING_GROUND,false);
|
||||
pSummoned->CastSpell(pSummoned, SPELL_CHURNING_GROUND, false);
|
||||
break;
|
||||
case NPC_SPIKE:
|
||||
pSummoned->CombatStart(pTarget);
|
||||
DoScriptText(EMOTE_SPIKE,me,pTarget);
|
||||
DoScriptText(EMOTE_SPIKE, me, pTarget);
|
||||
break;
|
||||
}
|
||||
Summons.Summon(pSummoned);
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
|
||||
void SummonedCreatureDespawn(Creature* pSummoned)
|
||||
{
|
||||
switch(pSummoned->GetEntry())
|
||||
switch (pSummoned->GetEntry())
|
||||
{
|
||||
case NPC_SPIKE:
|
||||
m_uiPursuingSpikeTimer = 2*IN_MILLISECONDS;
|
||||
@@ -250,19 +250,19 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO,me);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetInCombatWithZone();
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
|
||||
//Despawn Scarab Swarms neutral
|
||||
Summons.DoAction(NPC_SCARAB,ACTION_SCARAB_SUBMERGE);
|
||||
Summons.DoAction(NPC_SCARAB, ACTION_SCARAB_SUBMERGE);
|
||||
//Spawn Burrow
|
||||
for (int i=0; i < 4; i++)
|
||||
me->SummonCreature(NPC_BURROW,AnubarakLoc[i+2]);
|
||||
me->SummonCreature(NPC_BURROW, AnubarakLoc[i+2]);
|
||||
//Spawn Frost Spheres
|
||||
for (int i=0; i < 6; i++)
|
||||
if (Unit *pSummoned = me->SummonCreature(NPC_FROST_SPHERE,SphereSpawn[i]))
|
||||
if (Unit *pSummoned = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
|
||||
m_aSphereGUID[i] = pSummoned->GetGUID();
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
switch(m_uiStage)
|
||||
switch (m_uiStage)
|
||||
{
|
||||
case 0:
|
||||
if (m_uiFreezeSlashTimer <= uiDiff)
|
||||
@@ -282,19 +282,19 @@ public:
|
||||
|
||||
if (m_uiPenetratingColdTimer <= uiDiff)
|
||||
{
|
||||
me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2,5));
|
||||
me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5));
|
||||
m_uiPenetratingColdTimer = 20*IN_MILLISECONDS;
|
||||
} else m_uiPenetratingColdTimer -= uiDiff;
|
||||
|
||||
if (m_uiSummonNerubianTimer <= uiDiff && (IsHeroic() || !m_bReachedPhase3))
|
||||
{
|
||||
me->CastCustomSpell(SPELL_SUMMON_BURROWER, SPELLVALUE_MAX_TARGETS, RAID_MODE(1,2,2,4));
|
||||
me->CastCustomSpell(SPELL_SUMMON_BURROWER, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 2, 2, 4));
|
||||
m_uiSummonNerubianTimer = 45*IN_MILLISECONDS;
|
||||
} else m_uiSummonNerubianTimer -= uiDiff;
|
||||
|
||||
if (IsHeroic() && m_uiNerubianShadowStrikeTimer <= uiDiff)
|
||||
{
|
||||
Summons.DoAction(NPC_BURROWER,ACTION_SHADOW_STRIKE);
|
||||
Summons.DoAction(NPC_BURROWER, ACTION_SHADOW_STRIKE);
|
||||
m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiNerubianShadowStrikeTimer -= uiDiff;
|
||||
|
||||
@@ -305,10 +305,10 @@ public:
|
||||
} else m_uiSubmergeTimer -= uiDiff;
|
||||
break;
|
||||
case 1:
|
||||
DoCast(me,SPELL_SUBMERGE_ANUBARAK);
|
||||
DoCast(me,SPELL_CLEAR_ALL_DEBUFFS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoScriptText(SAY_BURROWER,me);
|
||||
DoCast(me, SPELL_SUBMERGE_ANUBARAK);
|
||||
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoScriptText(SAY_BURROWER, me);
|
||||
m_uiScarabSummoned = 0;
|
||||
m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
|
||||
m_uiStage = 2;
|
||||
@@ -327,14 +327,14 @@ public:
|
||||
* - The correct implementation is more likely the comment below but it needs spell knowledge
|
||||
*/
|
||||
std::list<uint64>::iterator i = m_vBurrowGUID.begin();
|
||||
uint32 at = urand(0,m_vBurrowGUID.size()-1);
|
||||
uint32 at = urand(0, m_vBurrowGUID.size()-1);
|
||||
for (uint32 k = 0; k < at; k++)
|
||||
++i;
|
||||
if (Creature *pBurrow = Unit::GetCreature(*me, *i))
|
||||
pBurrow->CastSpell(pBurrow,66340,false);
|
||||
pBurrow->CastSpell(pBurrow, 66340, false);
|
||||
m_uiScarabSummoned++;
|
||||
m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
|
||||
if (m_uiScarabSummoned == 4) m_uiSummonScarabTimer = RAID_MODE(4,20)*IN_MILLISECONDS;
|
||||
if (m_uiScarabSummoned == 4) m_uiSummonScarabTimer = RAID_MODE(4, 20)*IN_MILLISECONDS;
|
||||
|
||||
/*It seems that this spell have something more that needs to be taken into account
|
||||
//Need more sniff info
|
||||
@@ -354,8 +354,8 @@ public:
|
||||
DoCast(SPELL_SPIKE_TELE);
|
||||
Summons.DespawnEntry(NPC_SPIKE);
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_ANUBARAK);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me,SPELL_EMERGE_ANUBARAK);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_EMERGE_ANUBARAK);
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
m_uiSummonNerubianTimer = 10*IN_MILLISECONDS;
|
||||
m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
|
||||
@@ -367,22 +367,22 @@ public:
|
||||
{
|
||||
if (m_uiSummonFrostSphereTimer <= uiDiff)
|
||||
{
|
||||
uint8 startAt = urand(0,5);
|
||||
uint8 startAt = urand(0, 5);
|
||||
uint8 i = startAt;
|
||||
do
|
||||
{
|
||||
if (Unit *pSphere = Unit::GetCreature(*me,m_aSphereGUID[i]))
|
||||
if (Unit *pSphere = Unit::GetCreature(*me, m_aSphereGUID[i]))
|
||||
{
|
||||
if (!pSphere->HasAura(SPELL_FROST_SPHERE))
|
||||
{
|
||||
if (Creature *pSummon = me->SummonCreature(NPC_FROST_SPHERE,SphereSpawn[i]))
|
||||
if (Creature *pSummon = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
|
||||
m_aSphereGUID[i] = pSummon->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
i = (i+1)%6;
|
||||
} while (i != startAt);
|
||||
m_uiSummonFrostSphereTimer = urand(20,30)*IN_MILLISECONDS;
|
||||
m_uiSummonFrostSphereTimer = urand(20, 30)*IN_MILLISECONDS;
|
||||
} else m_uiSummonFrostSphereTimer -= uiDiff;
|
||||
}
|
||||
|
||||
@@ -390,13 +390,13 @@ public:
|
||||
{
|
||||
m_bReachedPhase3 = true;
|
||||
DoCastAOE(SPELL_LEECHING_SWARM);
|
||||
DoScriptText(EMOTE_LEECHING_SWARM,me);
|
||||
DoScriptText(SAY_LEECHING_SWARM,me);
|
||||
DoScriptText(EMOTE_LEECHING_SWARM, me);
|
||||
DoScriptText(SAY_LEECHING_SWARM, me);
|
||||
}
|
||||
|
||||
if (m_uiBerserkTimer <= uiDiff && !me->HasAura(SPELL_BERSERK))
|
||||
{
|
||||
DoCast(me,SPELL_BERSERK);
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
} else m_uiBerserkTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -430,18 +430,18 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
me->SetCorpseDelay(0);
|
||||
m_uiDeterminationTimer = urand(5*IN_MILLISECONDS,60*IN_MILLISECONDS);
|
||||
DoCast(me,SPELL_ACID_MANDIBLE);
|
||||
m_uiDeterminationTimer = urand(5*IN_MILLISECONDS, 60*IN_MILLISECONDS);
|
||||
DoCast(me, SPELL_ACID_MANDIBLE);
|
||||
me->SetInCombatWithZone();
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
me->AddThreat(pTarget,20000.0f);
|
||||
me->AddThreat(pTarget, 20000.0f);
|
||||
if (!me->isInCombat())
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
|
||||
void DoAction(const int32 actionId)
|
||||
{
|
||||
switch(actionId)
|
||||
switch (actionId)
|
||||
{
|
||||
case ACTION_SCARAB_SUBMERGE:
|
||||
DoCast(SPELL_SUBMERGE_EFFECT);
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
DoCast(pKiller,RAID_MODE(SPELL_TRAITOR_KING_10,SPELL_TRAITOR_KING_25));
|
||||
DoCast(pKiller, RAID_MODE(SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25));
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
@@ -463,8 +463,8 @@ public:
|
||||
/* Bosskillers don't recognize */
|
||||
if (m_uiDeterminationTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me,SPELL_DETERMINATION);
|
||||
m_uiDeterminationTimer = urand(10*IN_MILLISECONDS,60*IN_MILLISECONDS);
|
||||
DoCast(me, SPELL_DETERMINATION);
|
||||
m_uiDeterminationTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
|
||||
} else m_uiDeterminationTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -499,10 +499,10 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
me->SetCorpseDelay(0);
|
||||
m_uiSpiderFrenzyTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
m_uiSpiderFrenzyTimer = urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
m_uiSubmergeTimer = 30*IN_MILLISECONDS;
|
||||
DoCast(me,SPELL_EXPOSE_WEAKNESS);
|
||||
DoCast(me,SPELL_SPIDER_FRENZY);
|
||||
DoCast(me, SPELL_EXPOSE_WEAKNESS);
|
||||
DoCast(me, SPELL_SPIDER_FRENZY);
|
||||
me->SetInCombatWithZone();
|
||||
if (!me->isInCombat())
|
||||
me->DisappearAndDie();
|
||||
@@ -510,11 +510,11 @@ public:
|
||||
|
||||
void DoAction(const int32 actionId)
|
||||
{
|
||||
switch(actionId)
|
||||
switch (actionId)
|
||||
{
|
||||
case ACTION_SHADOW_STRIKE:
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,SPELL_SHADOW_STRIKE);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SHADOW_STRIKE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -529,16 +529,16 @@ public:
|
||||
if (me->HasAura(SPELL_SUBMERGE_EFFECT))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_EFFECT);
|
||||
DoCast(me,SPELL_EMERGE_EFFECT);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_EMERGE_EFFECT);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->CombatStart(me->SelectNearestTarget());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!me->HasAura(SPELL_PERMAFROST))
|
||||
{
|
||||
DoCast(me,SPELL_SUBMERGE_EFFECT);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_SUBMERGE_EFFECT);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->CombatStop();
|
||||
}
|
||||
}
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
m_bFall = true;
|
||||
me->SetFlying(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//At hit the ground
|
||||
me->GetMotionMaster()->MoveFall(142.2f, 0);
|
||||
//me->FallGround(); //need correct vmap use (i believe it isn't working properly right now)
|
||||
@@ -665,7 +665,7 @@ public:
|
||||
void EnterCombat(Unit *pWho)
|
||||
{
|
||||
m_uiTargetGUID = pWho->GetGUID();
|
||||
DoCast(pWho,SPELL_MARK);
|
||||
DoCast(pWho, SPELL_MARK);
|
||||
me->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_uiSpeed = 0;
|
||||
m_uiIncreaseSpeedTimer = 1*IN_MILLISECONDS;
|
||||
@@ -682,8 +682,8 @@ public:
|
||||
Unit* pTarget = Unit::GetPlayer(*me, m_uiTargetGUID);
|
||||
if (!pTarget || !pTarget->isAlive() || !pTarget->HasAura(SPELL_MARK))
|
||||
{
|
||||
if (Creature* pAnubarak = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ANUBARAK)))
|
||||
pAnubarak->CastSpell(pAnubarak,SPELL_SPIKE_TELE,false);
|
||||
if (Creature* pAnubarak = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ANUBARAK)))
|
||||
pAnubarak->CastSpell(pAnubarak, SPELL_SPIKE_TELE, false);
|
||||
me->DisappearAndDie();
|
||||
return;
|
||||
}
|
||||
@@ -695,18 +695,18 @@ public:
|
||||
switch (m_uiSpeed)
|
||||
{
|
||||
case 0:
|
||||
DoCast(me,SPELL_SPIKE_SPEED1);
|
||||
DoCast(me,SPELL_SPIKE_TRAIL);
|
||||
DoCast(me, SPELL_SPIKE_SPEED1);
|
||||
DoCast(me, SPELL_SPIKE_TRAIL);
|
||||
m_uiSpeed = 1;
|
||||
m_uiIncreaseSpeedTimer = 7*IN_MILLISECONDS;
|
||||
break;
|
||||
case 1:
|
||||
DoCast(me,SPELL_SPIKE_SPEED2);
|
||||
DoCast(me, SPELL_SPIKE_SPEED2);
|
||||
m_uiSpeed = 2;
|
||||
m_uiIncreaseSpeedTimer = 7*IN_MILLISECONDS;
|
||||
break;
|
||||
case 2:
|
||||
DoCast(me,SPELL_SPIKE_SPEED3);
|
||||
DoCast(me, SPELL_SPIKE_SPEED3);
|
||||
m_uiIncreaseSpeedTimer = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@ public:
|
||||
{
|
||||
boss_jaraxxusAI(Creature* pCreature) : ScriptedAI(pCreature), Summons(me)
|
||||
{
|
||||
m_pInstance = (InstanceScript*)pCreature->GetInstanceScript();
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -124,11 +124,11 @@ public:
|
||||
m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED);
|
||||
SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED);
|
||||
m_uiFelFireballTimer = 5*IN_MILLISECONDS;
|
||||
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
|
||||
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
|
||||
m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
m_uiSummonNetherPortalTimer = 1*MINUTE*IN_MILLISECONDS;
|
||||
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
|
||||
Summons.DespawnAll();
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_JARAXXUS, FAIL);
|
||||
DoCast(me,SPELL_JARAXXUS_CHAINS);
|
||||
DoCast(me, SPELL_JARAXXUS_CHAINS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
DoScriptText(SAY_DEATH,me);
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_JARAXXUS, DONE);
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
me->SetInCombatWithZone();
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
|
||||
DoScriptText(SAY_AGGRO,me);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
@@ -180,67 +180,67 @@ public:
|
||||
|
||||
if (m_uiSummonInfernalEruptionTimer <= uiDiff)
|
||||
{
|
||||
DoScriptText(EMOTE_INFERNAL_ERUPTION,me);
|
||||
DoScriptText(SAY_INFERNAL_ERUPTION,me);
|
||||
uint8 i = urand(2,3);
|
||||
me->SummonCreature(NPC_INFERNAL_VOLCANO,JaraxxusLoc[i].GetPositionX(),JaraxxusLoc[i].GetPositionY(),JaraxxusLoc[i].GetPositionZ(),TEMPSUMMON_CORPSE_DESPAWN);
|
||||
DoScriptText(EMOTE_INFERNAL_ERUPTION, me);
|
||||
DoScriptText(SAY_INFERNAL_ERUPTION, me);
|
||||
uint8 i = urand(2, 3);
|
||||
me->SummonCreature(NPC_INFERNAL_VOLCANO, JaraxxusLoc[i].GetPositionX(), JaraxxusLoc[i].GetPositionY(), JaraxxusLoc[i].GetPositionZ(), TEMPSUMMON_CORPSE_DESPAWN);
|
||||
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
|
||||
} else m_uiSummonInfernalEruptionTimer -= uiDiff;
|
||||
|
||||
if (m_uiSummonNetherPortalTimer <= uiDiff)
|
||||
{
|
||||
DoScriptText(EMOTE_NETHER_PORTAL,me);
|
||||
DoScriptText(SAY_NETHER_PORTAL,me);
|
||||
uint8 i = urand(2,3);
|
||||
me->SummonCreature(NPC_NETHER_PORTAL,JaraxxusLoc[i].GetPositionX(),JaraxxusLoc[i].GetPositionY(),JaraxxusLoc[i].GetPositionZ(),TEMPSUMMON_CORPSE_DESPAWN);
|
||||
DoScriptText(EMOTE_NETHER_PORTAL, me);
|
||||
DoScriptText(SAY_NETHER_PORTAL, me);
|
||||
uint8 i = urand(2, 3);
|
||||
me->SummonCreature(NPC_NETHER_PORTAL, JaraxxusLoc[i].GetPositionX(), JaraxxusLoc[i].GetPositionY(), JaraxxusLoc[i].GetPositionZ(), TEMPSUMMON_CORPSE_DESPAWN);
|
||||
m_uiSummonNetherPortalTimer = 2*MINUTE*IN_MILLISECONDS;
|
||||
} else m_uiSummonNetherPortalTimer -= uiDiff;
|
||||
|
||||
if (m_uiFelFireballTimer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_FEL_FIREBALL);
|
||||
m_uiFelFireballTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
m_uiFelFireballTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else m_uiFelFireballTimer -= uiDiff;
|
||||
|
||||
if (m_uiFelLightningTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(pTarget,SPELL_FEL_LIGHTING);
|
||||
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
DoCast(pTarget, SPELL_FEL_LIGHTING);
|
||||
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else m_uiFelLightningTimer -= uiDiff;
|
||||
|
||||
if (m_uiIncinerateFleshTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
DoScriptText(EMOTE_INCINERATE,me,pTarget);
|
||||
DoScriptText(SAY_INCINERATE,me);
|
||||
DoCast(pTarget,SPELL_INCINERATE_FLESH);
|
||||
DoScriptText(EMOTE_INCINERATE, me, pTarget);
|
||||
DoScriptText(SAY_INCINERATE, me);
|
||||
DoCast(pTarget, SPELL_INCINERATE_FLESH);
|
||||
}
|
||||
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else m_uiIncinerateFleshTimer -= uiDiff;
|
||||
|
||||
if (m_uiNetherPowerTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me,SPELL_NETHER_POWER);
|
||||
DoCast(me, SPELL_NETHER_POWER);
|
||||
m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
|
||||
} else m_uiNetherPowerTimer -= uiDiff;
|
||||
|
||||
if (m_uiLegionFlameTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
DoScriptText(EMOTE_LEGION_FLAME,me,pTarget);
|
||||
DoCast(pTarget,SPELL_LEGION_FLAME);
|
||||
DoScriptText(EMOTE_LEGION_FLAME, me, pTarget);
|
||||
DoCast(pTarget, SPELL_LEGION_FLAME);
|
||||
}
|
||||
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiLegionFlameTimer -= uiDiff;
|
||||
|
||||
if (getDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC && m_uiTouchOfJaraxxusTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,SPELL_TOUCH_OF_JARAXXUS);
|
||||
m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_TOUCH_OF_JARAXXUS);
|
||||
m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else m_uiTouchOfJaraxxusTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -249,7 +249,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
class mob_legion_flame : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -269,21 +268,19 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetInCombatWithZone();
|
||||
DoCast(SPELL_LEGION_FLAME_EFFECT);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 /*uiDiff*/)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
UpdateVictim();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
class mob_infernal_volcano : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -354,14 +351,12 @@ public:
|
||||
m_Timer = 5*IN_MILLISECONDS;
|
||||
} else m_Timer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
UpdateVictim();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
class mob_fel_infernal : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -405,8 +400,8 @@ public:
|
||||
|
||||
if (m_uiFelStreakTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,SPELL_FEL_STREAK);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FEL_STREAK);
|
||||
m_uiFelStreakTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiFelStreakTimer -= uiDiff;
|
||||
|
||||
@@ -416,7 +411,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
class mob_nether_portal : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -481,14 +475,12 @@ public:
|
||||
m_Timer = 15*IN_MILLISECONDS;
|
||||
} else m_Timer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
UpdateVictim();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
class mob_mistress_of_pain : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -544,15 +536,15 @@ public:
|
||||
|
||||
if (m_uiSpinningStrikeTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,SPELL_SPINNING_STRIKE);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SPINNING_STRIKE);
|
||||
m_uiSpinningStrikeTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiSpinningStrikeTimer -= uiDiff;
|
||||
|
||||
if (IsHeroic() && m_uiMistressKissTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,SPELL_MISTRESS_KISS);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_MISTRESS_KISS);
|
||||
m_uiMistressKissTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiMistressKissTimer -= uiDiff;
|
||||
|
||||
@@ -562,7 +554,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
void AddSC_boss_jaraxxus()
|
||||
{
|
||||
new boss_jaraxxus();
|
||||
|
||||
@@ -136,9 +136,9 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiImpaleTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS);
|
||||
m_uiImpaleTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
|
||||
m_uiStaggeringStompTimer = 15*IN_MILLISECONDS;
|
||||
m_uiSummonTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);;
|
||||
m_uiSummonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);;
|
||||
|
||||
if (getDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL ||
|
||||
getDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
|
||||
@@ -152,20 +152,20 @@ public:
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS,GORMOK_DONE);
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS,FAIL);
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
me->ForcedDespawn();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS,GORMOK_IN_PROGRESS);
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
@@ -197,24 +197,24 @@ public:
|
||||
|
||||
if (m_uiImpaleTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(),SPELL_IMPALE);
|
||||
m_uiImpaleTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS);
|
||||
DoCast(me->getVictim(), SPELL_IMPALE);
|
||||
m_uiImpaleTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
|
||||
} else m_uiImpaleTimer -= uiDiff;
|
||||
|
||||
if (m_uiStaggeringStompTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(),SPELL_STAGGERING_STOMP);
|
||||
m_uiStaggeringStompTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
DoCast(me->getVictim(), SPELL_STAGGERING_STOMP);
|
||||
m_uiStaggeringStompTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else m_uiStaggeringStompTimer -= uiDiff;
|
||||
|
||||
if (m_uiSummonTimer <= uiDiff)
|
||||
{
|
||||
if (m_uiSummonCount > 0)
|
||||
{
|
||||
me->SummonCreature(NPC_SNOBOLD_VASSAL,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),0,TEMPSUMMON_CORPSE_DESPAWN);
|
||||
DoScriptText(SAY_SNOBOLLED,me);
|
||||
me->SummonCreature(NPC_SNOBOLD_VASSAL, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN);
|
||||
DoScriptText(SAY_SNOBOLLED, me);
|
||||
}
|
||||
m_uiSummonTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiSummonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else m_uiSummonTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
if (m_pInstance)
|
||||
m_uiBossGUID = m_pInstance->GetData64(NPC_GORMOK);
|
||||
//Workaround for Snobold
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *pWho)
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetPlayer(*me,m_uiTargetGUID))
|
||||
if (Unit *pTarget = Unit::GetPlayer(*me, m_uiTargetGUID))
|
||||
if (pTarget->isAlive())
|
||||
pTarget->RemoveAurasDueToSpell(SPELL_SNOBOLLED);
|
||||
if (m_pInstance)
|
||||
@@ -305,23 +305,23 @@ public:
|
||||
if (m_bTargetDied || !UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Unit* pTarget = Unit::GetPlayer(*me,m_uiTargetGUID))
|
||||
if (Unit* pTarget = Unit::GetPlayer(*me, m_uiTargetGUID))
|
||||
if (!pTarget->isAlive())
|
||||
if (m_pInstance)
|
||||
if (Unit* pGormok = Unit::GetCreature(*me,m_pInstance->GetData64(NPC_GORMOK)))
|
||||
if (Unit* pGormok = Unit::GetCreature(*me, m_pInstance->GetData64(NPC_GORMOK)))
|
||||
{
|
||||
if (pGormok->isAlive())
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
m_bTargetDied = true;
|
||||
me->GetMotionMaster()->MoveJump(pGormok->GetPositionX(),pGormok->GetPositionY(),pGormok->GetPositionZ(),15.0f,15.0f);
|
||||
me->GetMotionMaster()->MoveJump(pGormok->GetPositionX(), pGormok->GetPositionY(), pGormok->GetPositionZ(), 15.0f, 15.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
m_uiTargetGUID = pTarget->GetGUID();
|
||||
me->GetMotionMaster()->MoveJump(pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),15.0f,15.0f);
|
||||
me->GetMotionMaster()->MoveJump(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 15.0f, 15.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
|
||||
if (m_uiBatterTimer < uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetPlayer(*me,m_uiTargetGUID))
|
||||
if (Unit *pTarget = Unit::GetPlayer(*me, m_uiTargetGUID))
|
||||
DoCast(pTarget, SPELL_BATTER);
|
||||
m_uiBatterTimer = 10000;
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public:
|
||||
|
||||
if (m_uiHeadCrackTimer < uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetPlayer(*me,m_uiTargetGUID))
|
||||
if (Unit *pTarget = Unit::GetPlayer(*me, m_uiTargetGUID))
|
||||
DoCast(pTarget, SPELL_HEAD_CRACK);
|
||||
m_uiHeadCrackTimer = 35000;
|
||||
}
|
||||
@@ -359,208 +359,225 @@ public:
|
||||
|
||||
struct boss_jormungarAI : public ScriptedAI
|
||||
{
|
||||
boss_jormungarAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
boss_jormungarAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_pInstance = (InstanceScript*)pCreature->GetInstanceScript();
|
||||
instanceScript = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_pInstance;
|
||||
|
||||
uint32 m_uiSisterID;
|
||||
|
||||
uint32 m_uiModelStationary;
|
||||
uint32 m_uiModelMobile;
|
||||
|
||||
uint32 m_uiBiteSpell;
|
||||
uint32 m_uiSpewSpell;
|
||||
uint32 m_uiSpitSpell;
|
||||
uint32 m_uiSpraySpell;
|
||||
|
||||
uint32 m_uiBiteTimer;
|
||||
uint32 m_uiSpewTimer;
|
||||
uint32 m_uiSlimePoolTimer;
|
||||
uint32 m_uiSpitTimer;
|
||||
uint32 m_uiSprayTimer;
|
||||
uint32 m_uiSweepTimer;
|
||||
uint32 m_uiSubmergeTimer;
|
||||
uint8 m_uiStage;
|
||||
bool m_bEnraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_bEnraged = false;
|
||||
m_uiBiteTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiSpewTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiSlimePoolTimer = 15*IN_MILLISECONDS;
|
||||
m_uiSpitTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiSprayTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiSweepTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
enraged = false;
|
||||
biteTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
spewTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
slimePoolTimer = 15*IN_MILLISECONDS;
|
||||
spitTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
sprayTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
sweepTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (instanceScript)
|
||||
{
|
||||
if (Creature* pSister = Unit::GetCreature((*me),m_pInstance->GetData64(m_uiSisterID)))
|
||||
if (Creature* otherWorm = Unit::GetCreature(*me, instanceScript->GetData64(otherWormEntry)))
|
||||
{
|
||||
if (!pSister->isAlive())
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
|
||||
if (!otherWorm->isAlive())
|
||||
{
|
||||
instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
|
||||
|
||||
if (TempSummon* summ = me->ToTempSummon())
|
||||
summ->UnSummon();
|
||||
else
|
||||
me->ForcedDespawn();
|
||||
|
||||
if (TempSummon* summ = otherWorm->ToTempSummon())
|
||||
summ->UnSummon();
|
||||
else
|
||||
otherWorm->ForcedDespawn();
|
||||
}
|
||||
else
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
|
||||
instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_pInstance && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL)
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
me->ForcedDespawn();
|
||||
if (instanceScript && instanceScript->GetData(TYPE_NORTHREND_BEASTS) != FAIL)
|
||||
instanceScript->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
|
||||
if (TempSummon* summ = me->ToTempSummon())
|
||||
summ->UnSummon();
|
||||
else
|
||||
me->ForcedDespawn();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *pWho)
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
if (instanceScript)
|
||||
instanceScript->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
|
||||
if (instanceScript)
|
||||
instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
|
||||
if (m_pInstance && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !m_bEnraged)
|
||||
if (instanceScript && instanceScript->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged)
|
||||
{
|
||||
DoScriptText(SAY_EMERGE,me);
|
||||
DoScriptText(SAY_EMERGE, me);
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(SPELL_ENRAGE);
|
||||
m_bEnraged = true;
|
||||
DoScriptText(SAY_BERSERK,me);
|
||||
switch (m_uiStage)
|
||||
enraged = true;
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
switch (stage)
|
||||
{
|
||||
case 0: break;
|
||||
case 0:
|
||||
break;
|
||||
case 4:
|
||||
m_uiStage = 5;
|
||||
m_uiSubmergeTimer = 5*IN_MILLISECONDS;
|
||||
stage = 5;
|
||||
submergeTimer = 5*IN_MILLISECONDS;
|
||||
break;
|
||||
default:
|
||||
m_uiStage = 7;
|
||||
stage = 7;
|
||||
}
|
||||
}
|
||||
|
||||
switch (m_uiStage)
|
||||
switch (stage)
|
||||
{
|
||||
case 0: // Mobile
|
||||
if (m_uiBiteTimer <= uiDiff)
|
||||
if (biteTimer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(m_uiBiteSpell);
|
||||
m_uiBiteTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
} else m_uiBiteTimer -= uiDiff;
|
||||
DoCastVictim(biteSpell);
|
||||
biteTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else biteTimer -= uiDiff;
|
||||
|
||||
if (m_uiSpewTimer <= uiDiff)
|
||||
if (spewTimer <= uiDiff)
|
||||
{
|
||||
DoCastAOE(m_uiSpewSpell);
|
||||
m_uiSpewTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
} else m_uiSpewTimer -= uiDiff;
|
||||
DoCastAOE(spewSpell);
|
||||
spewTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else spewTimer -= uiDiff;
|
||||
|
||||
if (m_uiSlimePoolTimer <= uiDiff)
|
||||
if (slimePoolTimer <= uiDiff)
|
||||
{
|
||||
/* Spell summon has only 30s duration */
|
||||
//DoCast(SUMMON_SLIME_POOL);
|
||||
me->SummonCreature(NPC_SLIME_POOL,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),0);
|
||||
m_uiSlimePoolTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiSlimePoolTimer -= uiDiff;
|
||||
me->SummonCreature(NPC_SLIME_POOL, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0);
|
||||
slimePoolTimer = 30*IN_MILLISECONDS;
|
||||
} else slimePoolTimer -= uiDiff;
|
||||
|
||||
if (m_uiSubmergeTimer <= uiDiff && !m_bEnraged)
|
||||
if (submergeTimer <= uiDiff && !enraged)
|
||||
{
|
||||
m_uiStage = 1;
|
||||
m_uiSubmergeTimer = 5*IN_MILLISECONDS;
|
||||
} else m_uiSubmergeTimer -= uiDiff;
|
||||
stage = 1;
|
||||
submergeTimer = 5*IN_MILLISECONDS;
|
||||
} else submergeTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
case 1: // Submerge
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me,SPELL_SUBMERGE_0);
|
||||
DoScriptText(SAY_SUBMERGE,me);
|
||||
me->GetMotionMaster()->MovePoint(0,ToCCommonLoc[1].GetPositionX()+urand(0,80)-40,ToCCommonLoc[1].GetPositionY()+urand(0,80)-40,ToCCommonLoc[1].GetPositionZ());
|
||||
m_uiStage = 2;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_SUBMERGE_0);
|
||||
DoScriptText(SAY_SUBMERGE, me);
|
||||
me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionY()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionZ());
|
||||
stage = 2;
|
||||
case 2: // Wait til emerge
|
||||
if (m_uiSubmergeTimer <= uiDiff)
|
||||
if (submergeTimer <= uiDiff)
|
||||
{
|
||||
m_uiStage = 3;
|
||||
m_uiSubmergeTimer = 50*IN_MILLISECONDS;
|
||||
} else m_uiSubmergeTimer -= uiDiff;
|
||||
stage = 3;
|
||||
submergeTimer = 50*IN_MILLISECONDS;
|
||||
} else submergeTimer -= uiDiff;
|
||||
break;
|
||||
case 3: // Emerge
|
||||
me->SetDisplayId(m_uiModelStationary);
|
||||
DoScriptText(SAY_EMERGE,me);
|
||||
me->SetDisplayId(modelStationary);
|
||||
DoScriptText(SAY_EMERGE, me);
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
|
||||
DoCast(me,SPELL_EMERGE_0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
|
||||
DoCast(me, SPELL_EMERGE_0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
SetCombatMovement(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
m_uiStage = 4;
|
||||
stage = 4;
|
||||
break;
|
||||
case 4: // Stationary
|
||||
if (m_uiSprayTimer <= uiDiff)
|
||||
if (sprayTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,m_uiSpraySpell);
|
||||
m_uiSprayTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
} else m_uiSprayTimer -= uiDiff;
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, spraySpell);
|
||||
sprayTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else sprayTimer -= uiDiff;
|
||||
|
||||
if (m_uiSweepTimer <= uiDiff)
|
||||
if (sweepTimer <= uiDiff)
|
||||
{
|
||||
DoCastAOE(SPELL_SWEEP_0);
|
||||
m_uiSweepTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
} else m_uiSweepTimer -= uiDiff;
|
||||
sweepTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else sweepTimer -= uiDiff;
|
||||
|
||||
if (m_uiSubmergeTimer <= uiDiff)
|
||||
if (submergeTimer <= uiDiff)
|
||||
{
|
||||
m_uiStage = 5;
|
||||
m_uiSubmergeTimer = 10*IN_MILLISECONDS;
|
||||
} else m_uiSubmergeTimer -= uiDiff;
|
||||
stage = 5;
|
||||
submergeTimer = 10*IN_MILLISECONDS;
|
||||
} else submergeTimer -= uiDiff;
|
||||
|
||||
DoSpellAttackIfReady(m_uiSpitSpell);
|
||||
DoSpellAttackIfReady(spitSpell);
|
||||
break;
|
||||
case 5: // Submerge
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me,SPELL_SUBMERGE_0);
|
||||
DoScriptText(SAY_SUBMERGE,me);
|
||||
me->GetMotionMaster()->MovePoint(0,ToCCommonLoc[1].GetPositionX()+urand(0,80)-40,ToCCommonLoc[1].GetPositionY()+urand(0,80)-40,ToCCommonLoc[1].GetPositionZ());
|
||||
m_uiStage = 6;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_SUBMERGE_0);
|
||||
DoScriptText(SAY_SUBMERGE, me);
|
||||
me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionY()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionZ());
|
||||
stage = 6;
|
||||
case 6: // Wait til emerge
|
||||
if (m_uiSubmergeTimer <= uiDiff)
|
||||
if (submergeTimer <= uiDiff)
|
||||
{
|
||||
m_uiStage = 7;
|
||||
m_uiSubmergeTimer = 45*IN_MILLISECONDS;
|
||||
} else m_uiSubmergeTimer -= uiDiff;
|
||||
stage = 7;
|
||||
submergeTimer = 45*IN_MILLISECONDS;
|
||||
} else submergeTimer -= uiDiff;
|
||||
break;
|
||||
case 7: // Emerge
|
||||
me->SetDisplayId(m_uiModelMobile);
|
||||
DoScriptText(SAY_EMERGE,me);
|
||||
me->SetDisplayId(modelMobile);
|
||||
DoScriptText(SAY_EMERGE, me);
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
|
||||
DoCast(me,SPELL_EMERGE_0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
|
||||
DoCast(me, SPELL_EMERGE_0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
SetCombatMovement(true);
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
m_uiStage = 0;
|
||||
stage = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript* instanceScript;
|
||||
|
||||
uint32 otherWormEntry;
|
||||
|
||||
uint32 modelStationary;
|
||||
uint32 modelMobile;
|
||||
|
||||
uint32 biteSpell;
|
||||
uint32 spewSpell;
|
||||
uint32 spitSpell;
|
||||
uint32 spraySpell;
|
||||
|
||||
uint32 biteTimer;
|
||||
uint32 spewTimer;
|
||||
uint32 slimePoolTimer;
|
||||
uint32 spitTimer;
|
||||
uint32 sprayTimer;
|
||||
uint32 sweepTimer;
|
||||
uint32 submergeTimer;
|
||||
uint8 stage;
|
||||
bool enraged;
|
||||
};
|
||||
|
||||
|
||||
@@ -569,11 +586,6 @@ class boss_acidmaw : public CreatureScript
|
||||
public:
|
||||
boss_acidmaw() : CreatureScript("boss_acidmaw") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_acidmawAI(pCreature);
|
||||
}
|
||||
|
||||
struct boss_acidmawAI : public boss_jormungarAI
|
||||
{
|
||||
boss_acidmawAI(Creature* pCreature) : boss_jormungarAI(pCreature) { }
|
||||
@@ -581,20 +593,24 @@ class boss_acidmaw : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
boss_jormungarAI::Reset();
|
||||
m_uiBiteSpell = SPELL_PARALYTIC_BITE;
|
||||
m_uiSpewSpell = SPELL_ACID_SPEW;
|
||||
m_uiSpitSpell = SPELL_ACID_SPIT;
|
||||
m_uiSpraySpell = SPELL_PARALYTIC_SPRAY;
|
||||
m_uiModelStationary = MODEL_ACIDMAW_STATIONARY;
|
||||
m_uiModelMobile = MODEL_ACIDMAW_MOBILE;
|
||||
m_uiSisterID = NPC_DREADSCALE;
|
||||
biteSpell = SPELL_PARALYTIC_BITE;
|
||||
spewSpell = SPELL_ACID_SPEW;
|
||||
spitSpell = SPELL_ACID_SPIT;
|
||||
spraySpell = SPELL_PARALYTIC_SPRAY;
|
||||
modelStationary = MODEL_ACIDMAW_STATIONARY;
|
||||
modelMobile = MODEL_ACIDMAW_MOBILE;
|
||||
otherWormEntry = NPC_DREADSCALE;
|
||||
|
||||
m_uiSubmergeTimer = 500;
|
||||
DoCast(me,SPELL_SUBMERGE_0);
|
||||
m_uiStage = 2;
|
||||
submergeTimer = 500;
|
||||
DoCast(me, SPELL_SUBMERGE_0);
|
||||
stage = 2;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_acidmawAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -603,11 +619,6 @@ class boss_dreadscale : public CreatureScript
|
||||
public:
|
||||
boss_dreadscale() : CreatureScript("boss_dreadscale") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_dreadscaleAI(pCreature);
|
||||
}
|
||||
|
||||
struct boss_dreadscaleAI : public boss_jormungarAI
|
||||
{
|
||||
boss_dreadscaleAI(Creature* pCreature) : boss_jormungarAI(pCreature) { }
|
||||
@@ -615,19 +626,23 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
boss_jormungarAI::Reset();
|
||||
m_uiBiteSpell = SPELL_BURNING_BITE;
|
||||
m_uiSpewSpell = SPELL_MOLTEN_SPEW;
|
||||
m_uiSpitSpell = SPELL_FIRE_SPIT;
|
||||
m_uiSpraySpell = SPELL_BURNING_SPRAY;
|
||||
m_uiModelStationary = MODEL_DREADSCALE_STATIONARY;
|
||||
m_uiModelMobile = MODEL_DREADSCALE_MOBILE;
|
||||
m_uiSisterID = NPC_ACIDMAW;
|
||||
biteSpell = SPELL_BURNING_BITE;
|
||||
spewSpell = SPELL_MOLTEN_SPEW;
|
||||
spitSpell = SPELL_FIRE_SPIT;
|
||||
spraySpell = SPELL_BURNING_SPRAY;
|
||||
modelStationary = MODEL_DREADSCALE_STATIONARY;
|
||||
modelMobile = MODEL_DREADSCALE_MOBILE;
|
||||
otherWormEntry = NPC_ACIDMAW;
|
||||
|
||||
m_uiSubmergeTimer = 45*IN_MILLISECONDS;
|
||||
m_uiStage = 0;
|
||||
submergeTimer = 45 * IN_MILLISECONDS;
|
||||
stage = 0;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_dreadscaleAI(pCreature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -660,7 +675,7 @@ public:
|
||||
if (!casted)
|
||||
{
|
||||
casted = true;
|
||||
DoCast(me,SPELL_SLIME_POOL_EFFECT);
|
||||
DoCast(me, SPELL_SLIME_POOL_EFFECT);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -691,7 +706,7 @@ public:
|
||||
uint32 m_uiWhirlTimer;
|
||||
uint32 m_uiMassiveCrashTimer;
|
||||
uint32 m_uiTrampleTimer;
|
||||
float m_fTrampleTargetX,m_fTrampleTargetY,m_fTrampleTargetZ;
|
||||
float m_fTrampleTargetX, m_fTrampleTargetY, m_fTrampleTargetZ;
|
||||
uint64 m_uiTrampleTargetGUID;
|
||||
bool m_bMovementStarted;
|
||||
bool m_bMovementFinish;
|
||||
@@ -701,9 +716,9 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiArticBreathTimer = urand(25*IN_MILLISECONDS,40*IN_MILLISECONDS);
|
||||
m_uiWhirlTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
m_uiArticBreathTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
|
||||
m_uiWhirlTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
m_uiMassiveCrashTimer = 30*IN_MILLISECONDS;
|
||||
m_uiTrampleTimer = IN_MILLISECONDS;
|
||||
m_bMovementStarted = false;
|
||||
@@ -729,7 +744,7 @@ public:
|
||||
switch (uiId)
|
||||
{
|
||||
case 0: // JUMP!? Fuck! THAT'S BEEZARR! Would someone PLEASE make MotionMaster->Move* work better?
|
||||
if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(),ToCCommonLoc[1].GetPositionY()) < 6.0f)
|
||||
if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()) < 6.0f)
|
||||
{
|
||||
// Middle of the room
|
||||
m_uiStage = 1;
|
||||
@@ -737,7 +752,7 @@ public:
|
||||
else
|
||||
{
|
||||
// Landed from Hop backwards (start trample)
|
||||
if (Unit::GetPlayer(*me,m_uiTrampleTargetGUID))
|
||||
if (Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
|
||||
{
|
||||
m_uiStage = 4;
|
||||
} else m_uiStage = 6;
|
||||
@@ -795,25 +810,25 @@ public:
|
||||
if (m_uiFerociousButtTimer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_FEROCIOUS_BUTT);
|
||||
m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else m_uiFerociousButtTimer -= uiDiff;
|
||||
|
||||
if (m_uiArticBreathTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget,SPELL_ARCTIC_BREATH);
|
||||
m_uiArticBreathTimer = urand(25*IN_MILLISECONDS,40*IN_MILLISECONDS);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ARCTIC_BREATH);
|
||||
m_uiArticBreathTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
|
||||
} else m_uiArticBreathTimer -= uiDiff;
|
||||
|
||||
if (m_uiWhirlTimer <= uiDiff)
|
||||
{
|
||||
DoCastAOE(SPELL_WHIRL);
|
||||
m_uiWhirlTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
m_uiWhirlTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else m_uiWhirlTimer -= uiDiff;
|
||||
|
||||
if (m_uiMassiveCrashTimer <= uiDiff)
|
||||
{
|
||||
me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(),ToCCommonLoc[1].GetPositionY(),ToCCommonLoc[1].GetPositionZ(),10.0f,20.0f); // 1: Middle of the room
|
||||
me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 10.0f, 20.0f); // 1: Middle of the room
|
||||
m_uiStage = 7; //Invalid (Do nothing more than move)
|
||||
m_uiMassiveCrashTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiMassiveCrashTimer -= uiDiff;
|
||||
@@ -825,11 +840,11 @@ public:
|
||||
m_uiStage = 2;
|
||||
break;
|
||||
case 2:
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
m_uiTrampleTargetGUID = pTarget->GetGUID();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, m_uiTrampleTargetGUID);
|
||||
DoScriptText(SAY_TRAMPLE_STARE,me,pTarget);
|
||||
DoScriptText(SAY_TRAMPLE_STARE, me, pTarget);
|
||||
m_bTrampleCasted = false;
|
||||
SetCombatMovement(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
@@ -841,7 +856,7 @@ public:
|
||||
case 3:
|
||||
if (m_uiTrampleTimer <= uiDiff)
|
||||
{
|
||||
if (Unit* pTarget = Unit::GetPlayer(*me,m_uiTrampleTargetGUID))
|
||||
if (Unit* pTarget = Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
|
||||
{
|
||||
m_bTrampleCasted = false;
|
||||
m_bMovementStarted = true;
|
||||
@@ -851,14 +866,14 @@ public:
|
||||
me->GetMotionMaster()->MoveJump(2*me->GetPositionX()-m_fTrampleTargetX,
|
||||
2*me->GetPositionY()-m_fTrampleTargetY,
|
||||
me->GetPositionZ(),
|
||||
10.0f,20.0f); // 2: Hop Backwards
|
||||
10.0f, 20.0f); // 2: Hop Backwards
|
||||
m_uiStage = 7; //Invalid (Do nothing more than move)
|
||||
} else m_uiStage = 6;
|
||||
} else m_uiTrampleTimer -= uiDiff;
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SAY_TRAMPLE_START,me);
|
||||
me->GetMotionMaster()->MoveCharge(m_fTrampleTargetX,m_fTrampleTargetY,m_fTrampleTargetZ+2, 42, 1);
|
||||
DoScriptText(SAY_TRAMPLE_START, me);
|
||||
me->GetMotionMaster()->MoveCharge(m_fTrampleTargetX, m_fTrampleTargetY, m_fTrampleTargetZ+2, 42, 1);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
m_uiStage = 5;
|
||||
break;
|
||||
@@ -888,8 +903,8 @@ public:
|
||||
case 6:
|
||||
if (!m_bTrampleCasted)
|
||||
{
|
||||
DoCast(me,SPELL_STAGGERED_DAZE);
|
||||
DoScriptText(SAY_TRAMPLE_FAIL,me);
|
||||
DoCast(me, SPELL_STAGGERED_DAZE);
|
||||
DoScriptText(SAY_TRAMPLE_FAIL, me);
|
||||
}
|
||||
m_bMovementStarted = false;
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
|
||||
@@ -145,7 +145,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
Position EssenceLocation[2];
|
||||
|
||||
void Reset() {
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
/* Uncomment this once that they are flying above the ground
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
@@ -156,7 +156,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
m_uiColorballsTimer = 15*IN_MILLISECONDS;
|
||||
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
|
||||
m_uiSpikeTimer = 20*IN_MILLISECONDS;
|
||||
m_uiTouchTimer = urand(10,15)*IN_MILLISECONDS;
|
||||
m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
|
||||
m_uiBerserkTimer = IsHeroic() ? 6*MINUTE*IN_MILLISECONDS : 10*MINUTE*IN_MILLISECONDS;
|
||||
|
||||
Summons.DespawnAll();
|
||||
@@ -183,7 +183,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
me->SetHomePosition(HomeLocation);
|
||||
break;
|
||||
case 1:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetInCombatWithZone();
|
||||
break;
|
||||
@@ -194,7 +194,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(urand(0,1) ? SAY_KILL1 : SAY_KILL2,me);
|
||||
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
@@ -202,7 +202,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
switch(pSummoned->GetEntry())
|
||||
switch (pSummoned->GetEntry())
|
||||
{
|
||||
case NPC_UNLEASHED_DARK:
|
||||
case NPC_UNLEASHED_LIGHT:
|
||||
@@ -214,7 +214,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
void SummonedCreatureDespawn(Creature* pSummoned)
|
||||
{
|
||||
switch(pSummoned->GetEntry())
|
||||
switch (pSummoned->GetEntry())
|
||||
{
|
||||
case NPC_LIGHT_ESSENCE:
|
||||
case NPC_DARK_ESSENCE:
|
||||
@@ -273,17 +273,17 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
for (uint8 i = 0; i < quantity; i++)
|
||||
{
|
||||
float x = float(urand(uint32(x0 - r), uint32(x0 + r)));
|
||||
if (urand(0,1))
|
||||
y = y0 + sqrt(pow(r,2) - pow((x-x0),2));
|
||||
if (urand(0, 1))
|
||||
y = y0 + sqrt(pow(r, 2) - pow((x-x0), 2));
|
||||
else
|
||||
y = y0 - sqrt(pow(r,2) - pow((x-x0),2));
|
||||
me->SummonCreature(m_uiColorballNpcId,x,y,me->GetPositionZ(),TEMPSUMMON_CORPSE_DESPAWN);
|
||||
y = y0 - sqrt(pow(r, 2) - pow((x-x0), 2));
|
||||
me->SummonCreature(m_uiColorballNpcId, x, y, me->GetPositionZ(), TEMPSUMMON_CORPSE_DESPAWN);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH,me);
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
{
|
||||
m_pInstance->SetData(DATA_HEALTH_TWIN_SHARED, 0);
|
||||
@@ -303,7 +303,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
// Called when sister pointer needed
|
||||
Creature* GetSister()
|
||||
{
|
||||
return Unit::GetCreature((*me),m_pInstance->GetData64(m_uiSisterNpcId));
|
||||
return Unit::GetCreature((*me), m_pInstance->GetData64(m_uiSisterNpcId));
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
@@ -319,20 +319,20 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
me->SummonCreature(m_uiEssenceNpcId, EssenceLocation[0].GetPositionX(), EssenceLocation[0].GetPositionY(), EssenceLocation[0].GetPositionZ());
|
||||
me->SummonCreature(m_uiEssenceNpcId, EssenceLocation[1].GetPositionX(), EssenceLocation[1].GetPositionY(), EssenceLocation[1].GetPositionZ());
|
||||
}
|
||||
DoScriptText(SAY_AGGRO,me);
|
||||
DoCast(me,m_uiSurgeSpellId);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoCast(me, m_uiSurgeSpellId);
|
||||
}
|
||||
|
||||
void DoAction(const int32 action)
|
||||
{
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_VORTEX:
|
||||
m_uiStage = me->GetEntry() == NPC_LIGHTBANE ? 2 : 1;
|
||||
break;
|
||||
case ACTION_PACT:
|
||||
m_uiStage = me->GetEntry() == NPC_LIGHTBANE ? 1 : 2;
|
||||
DoCast(me,SPELL_TWIN_POWER);
|
||||
DoCast(me, SPELL_TWIN_POWER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -356,8 +356,8 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
pSister->AI()->DoAction(ACTION_VORTEX);
|
||||
DoScriptText(m_uiVortexEmote,me);
|
||||
DoScriptText(m_uiVortexSay,me);
|
||||
DoScriptText(m_uiVortexEmote, me);
|
||||
DoScriptText(m_uiVortexSay, me);
|
||||
DoCastAOE(m_uiVortexSpellId);
|
||||
m_uiStage = 0;
|
||||
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
|
||||
@@ -368,10 +368,10 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
pSister->AI()->DoAction(ACTION_PACT);
|
||||
DoScriptText(EMOTE_SHIELD,me);
|
||||
DoScriptText(SAY_SHIELD,me);
|
||||
DoCast(me,m_uiShieldSpellId);
|
||||
DoCast(me,m_uiTwinPactSpellId);
|
||||
DoScriptText(EMOTE_SHIELD, me);
|
||||
DoScriptText(SAY_SHIELD, me);
|
||||
DoCast(me, m_uiShieldSpellId);
|
||||
DoCast(me, m_uiTwinPactSpellId);
|
||||
m_uiStage = 0;
|
||||
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
|
||||
} m_uiSpecialAbilityTimer -= uiDiff;
|
||||
@@ -388,9 +388,9 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
if (IsHeroic() && m_uiTouchTimer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0,200,true,m_uiOtherEssenceSpellId))
|
||||
DoCast(pTarget,m_uiTouchSpellId);
|
||||
m_uiTouchTimer = urand(10,15)*IN_MILLISECONDS;
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true, m_uiOtherEssenceSpellId))
|
||||
DoCast(pTarget, m_uiTouchSpellId);
|
||||
m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
|
||||
} m_uiTouchTimer -= uiDiff;
|
||||
|
||||
if (m_uiColorballsTimer <= uiDiff)
|
||||
@@ -410,8 +410,8 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
if (!m_bIsBerserk && m_uiBerserkTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me,SPELL_BERSERK);
|
||||
DoScriptText(SAY_BERSERK,me);
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
m_bIsBerserk = true;
|
||||
} else m_uiBerserkTimer -= uiDiff;
|
||||
|
||||
@@ -566,16 +566,16 @@ struct mob_unleashed_ballAI : public ScriptedAI
|
||||
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
|
||||
float y = y0;
|
||||
float x = float(urand(uint32(x0 - r), uint32(x0 + r)));
|
||||
if (urand(0,1))
|
||||
y = y0 + sqrt(pow(r,2) - pow((x-x0),2));
|
||||
if (urand(0, 1))
|
||||
y = y0 + sqrt(pow(r, 2) - pow((x-x0), 2));
|
||||
else
|
||||
y = y0 - sqrt(pow(r,2) - pow((x-x0),2));
|
||||
me->GetMotionMaster()->MovePoint(0,x,y,me->GetPositionZ());
|
||||
y = y0 - sqrt(pow(r, 2) - pow((x-x0), 2));
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetFlying(true);
|
||||
@@ -591,7 +591,7 @@ struct mob_unleashed_ballAI : public ScriptedAI
|
||||
switch (uiId)
|
||||
{
|
||||
case 0:
|
||||
if (urand(0,3) == 0)
|
||||
if (urand(0, 3) == 0)
|
||||
MoveToNextPoint();
|
||||
else
|
||||
me->DisappearAndDie();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -83,12 +83,12 @@ struct _Messages
|
||||
|
||||
static _Messages _GossipMessage[]=
|
||||
{
|
||||
{MSG_BEASTS,GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS},
|
||||
{MSG_JARAXXUS,GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS},
|
||||
{MSG_CRUSADERS,GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS},
|
||||
{MSG_VALKIRIES,GOSSIP_ACTION_INFO_DEF+4,false,TYPE_VALKIRIES},
|
||||
{MSG_LICH_KING,GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK},
|
||||
{MSG_ANUBARAK,GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}
|
||||
{MSG_BEASTS, GOSSIP_ACTION_INFO_DEF+1, false, TYPE_BEASTS},
|
||||
{MSG_JARAXXUS, GOSSIP_ACTION_INFO_DEF+2, false, TYPE_JARAXXUS},
|
||||
{MSG_CRUSADERS, GOSSIP_ACTION_INFO_DEF+3, false, TYPE_CRUSADERS},
|
||||
{MSG_VALKIRIES, GOSSIP_ACTION_INFO_DEF+4, false, TYPE_VALKIRIES},
|
||||
{MSG_LICH_KING, GOSSIP_ACTION_INFO_DEF+5, false, TYPE_ANUBARAK},
|
||||
{MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF+6, true, TYPE_ANUBARAK}
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -254,7 +254,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
pSummoned->CastSpell(pSummoned, 51807, false);
|
||||
pSummoned->SetDisplayId(11686);
|
||||
}
|
||||
if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING,IN_PROGRESS);
|
||||
if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
}
|
||||
|
||||
@@ -265,10 +265,10 @@ class boss_lich_king_toc : public CreatureScript
|
||||
switch (uiId)
|
||||
{
|
||||
case 0:
|
||||
m_pInstance->SetData(TYPE_EVENT,5030);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5030);
|
||||
break;
|
||||
case 1:
|
||||
m_pInstance->SetData(TYPE_EVENT,5050);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5050);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -284,49 +284,49 @@ class boss_lich_king_toc : public CreatureScript
|
||||
switch (m_pInstance->GetData(TYPE_EVENT))
|
||||
{
|
||||
case 5010:
|
||||
DoScriptText(SAY_STAGE_4_02,me);
|
||||
DoScriptText(SAY_STAGE_4_02, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
me->GetMotionMaster()->MovePoint(0,LichKingLoc[0]);
|
||||
m_pInstance->SetData(TYPE_EVENT,5020);
|
||||
me->GetMotionMaster()->MovePoint(0, LichKingLoc[0]);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5020);
|
||||
break;
|
||||
case 5030:
|
||||
DoScriptText(SAY_STAGE_4_04,me);
|
||||
DoScriptText(SAY_STAGE_4_04, me);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
|
||||
m_uiUpdateTimer = 10000;
|
||||
m_pInstance->SetData(TYPE_EVENT,5040);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5040);
|
||||
break;
|
||||
case 5040:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
me->GetMotionMaster()->MovePoint(1,LichKingLoc[1]);
|
||||
me->GetMotionMaster()->MovePoint(1, LichKingLoc[1]);
|
||||
m_uiUpdateTimer = 1000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 5050:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,5060);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5060);
|
||||
break;
|
||||
case 5060:
|
||||
DoScriptText(SAY_STAGE_4_05,me);
|
||||
DoScriptText(SAY_STAGE_4_05, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
m_uiUpdateTimer = 2500;
|
||||
m_pInstance->SetData(TYPE_EVENT,5070);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5070);
|
||||
break;
|
||||
case 5070:
|
||||
me->CastSpell(me,68198,false);
|
||||
me->CastSpell(me, 68198, false);
|
||||
m_uiUpdateTimer = 1500;
|
||||
m_pInstance->SetData(TYPE_EVENT,5080);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5080);
|
||||
break;
|
||||
case 5080:
|
||||
if (GameObject* pGoFloor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
pGoFloor->TakenDamage(1000000);
|
||||
me->CastSpell(me,69016,false);
|
||||
if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING,DONE);
|
||||
Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ANUBARAK));
|
||||
me->CastSpell(me, 69016, false);
|
||||
if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, DONE);
|
||||
Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ANUBARAK));
|
||||
if (!pTemp || !pTemp->isAlive())
|
||||
pTemp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
me->ForcedDespawn();
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
m_uiUpdateTimer = 20000;
|
||||
break;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
DoScriptText(SAY_STAGE_1_06, me, pKiller);
|
||||
m_pInstance->SetData(TYPE_EVENT, 1180);
|
||||
if (Creature* pTemp = Unit::GetCreature(*me,m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
{
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pTemp->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -447,7 +447,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
pPortal->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
||||
pPortal->CastSpell(pPortal,SPELL_WILFRED_PORTAL,false);
|
||||
pPortal->CastSpell(pPortal, SPELL_WILFRED_PORTAL, false);
|
||||
m_uiPortalGUID = pPortal->GetGUID();
|
||||
}
|
||||
m_uiUpdateTimer = 4000;
|
||||
@@ -463,32 +463,32 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pTemp->SetReactState(REACT_PASSIVE);
|
||||
pTemp->GetMotionMaster()->MovePoint(0,ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()-10, ToCCommonLoc[1].GetPositionZ());
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()-10, ToCCommonLoc[1].GetPositionZ());
|
||||
}
|
||||
m_pInstance->SetData(TYPE_EVENT, 1142);
|
||||
m_uiUpdateTimer = 5000;
|
||||
break;
|
||||
case 1142:
|
||||
if (Creature* pTemp = Unit::GetCreature(*me,m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
pTemp->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
if (Creature* pTrigger = Unit::GetCreature(*me,m_uiTriggerGUID))
|
||||
if (Creature* pTrigger = Unit::GetCreature(*me, m_uiTriggerGUID))
|
||||
pTrigger->ForcedDespawn();
|
||||
if (Creature* pPortal = Unit::GetCreature(*me,m_uiPortalGUID))
|
||||
if (Creature* pPortal = Unit::GetCreature(*me, m_uiPortalGUID))
|
||||
pPortal->ForcedDespawn();
|
||||
m_pInstance->SetData(TYPE_EVENT, 1144);
|
||||
m_uiUpdateTimer = 10000;
|
||||
break;
|
||||
case 1144:
|
||||
if (Creature* pTemp = Unit::GetCreature(*me,m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
DoScriptText(SAY_STAGE_1_05,pTemp);
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
DoScriptText(SAY_STAGE_1_05, pTemp);
|
||||
m_pInstance->SetData(TYPE_EVENT, 1150);
|
||||
m_uiUpdateTimer = 5000;
|
||||
break;
|
||||
case 1150:
|
||||
if (Creature* pTemp = Unit::GetCreature(*me,m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
{
|
||||
//1-shot Fizzlebang
|
||||
pTemp->CastSpell(me,67888,false);
|
||||
pTemp->CastSpell(me, 67888, false);
|
||||
me->SetInCombatWith(pTemp);
|
||||
pTemp->AddThreat(me, 1000.0f);
|
||||
pTemp->AI()->AttackStart(me);
|
||||
@@ -542,13 +542,13 @@ class npc_tirion_toc : public CreatureScript
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_01, me);
|
||||
m_uiUpdateTimer = 22000;
|
||||
m_pInstance->SetData(TYPE_EVENT,120);
|
||||
m_pInstance->SetData(TYPE_EVENT, 120);
|
||||
break;
|
||||
case 140:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_02, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,150);
|
||||
m_pInstance->SetData(TYPE_EVENT, 150);
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
break;
|
||||
case 150:
|
||||
@@ -556,259 +556,259 @@ class npc_tirion_toc : public CreatureScript
|
||||
if (m_pInstance->GetData(TYPE_BEASTS) != DONE)
|
||||
{
|
||||
me->SummonCreature(NPC_GORMOK, ToCCommonLoc[10].GetPositionX(), ToCCommonLoc[10].GetPositionY(), ToCCommonLoc[10].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS);
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_GORMOK)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_GORMOK)))
|
||||
{
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
|
||||
pTemp->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,155);
|
||||
m_pInstance->SetData(TYPE_EVENT, 155);
|
||||
break;
|
||||
case 155:
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_GORMOK)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_GORMOK)))
|
||||
{
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetReactState(REACT_AGGRESSIVE);
|
||||
pTemp->SetInCombatWithZone();
|
||||
}
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
m_pInstance->SetData(TYPE_BEASTS,IN_PROGRESS);
|
||||
m_pInstance->SetData(TYPE_BEASTS, IN_PROGRESS);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,160);
|
||||
m_pInstance->SetData(TYPE_EVENT, 160);
|
||||
break;
|
||||
case 200:
|
||||
DoScriptText(SAY_STAGE_0_04, me);
|
||||
m_uiUpdateTimer = 8000;
|
||||
m_pInstance->SetData(TYPE_EVENT,205);
|
||||
m_pInstance->SetData(TYPE_EVENT, 205);
|
||||
break;
|
||||
case 205:
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,210);
|
||||
m_pInstance->SetData(TYPE_EVENT, 210);
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
break;
|
||||
case 210:
|
||||
if (m_pInstance->GetData(TYPE_BEASTS) != DONE)
|
||||
{
|
||||
me->SummonCreature(NPC_DREADSCALE, ToCCommonLoc[3].GetPositionX(), ToCCommonLoc[3].GetPositionY(), ToCCommonLoc[3].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[4].GetPositionX(), ToCCommonLoc[4].GetPositionY(), ToCCommonLoc[4].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS);
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_DREADSCALE)))
|
||||
me->SummonCreature(NPC_DREADSCALE, ToCCommonLoc[3].GetPositionX(), ToCCommonLoc[3].GetPositionY(), ToCCommonLoc[3].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[4].GetPositionX(), ToCCommonLoc[4].GetPositionY(), ToCCommonLoc[4].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_DREADSCALE)))
|
||||
{
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
|
||||
pTemp->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ACIDMAW)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ACIDMAW)))
|
||||
{
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ());
|
||||
pTemp->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,220);
|
||||
m_pInstance->SetData(TYPE_EVENT, 220);
|
||||
break;
|
||||
case 220:
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_DREADSCALE)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_DREADSCALE)))
|
||||
{
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetReactState(REACT_AGGRESSIVE);
|
||||
pTemp->SetInCombatWithZone();
|
||||
}
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ACIDMAW)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ACIDMAW)))
|
||||
{
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTemp->SetReactState(REACT_AGGRESSIVE);
|
||||
pTemp->SetInCombatWithZone();
|
||||
}
|
||||
m_pInstance->SetData(TYPE_EVENT,230);
|
||||
m_pInstance->SetData(TYPE_EVENT, 230);
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
break;
|
||||
case 300:
|
||||
DoScriptText(SAY_STAGE_0_05, me);
|
||||
m_uiUpdateTimer = 8000;
|
||||
m_pInstance->SetData(TYPE_EVENT,305);
|
||||
m_pInstance->SetData(TYPE_EVENT, 305);
|
||||
break;
|
||||
case 305:
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,310);
|
||||
m_pInstance->SetData(TYPE_EVENT, 310);
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
break;
|
||||
case 310:
|
||||
if (m_pInstance->GetData(TYPE_BEASTS) != DONE)
|
||||
{
|
||||
me->SummonCreature(NPC_ICEHOWL, ToCCommonLoc[10].GetPositionX(), ToCCommonLoc[10].GetPositionY(), ToCCommonLoc[10].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN);
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ICEHOWL)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ICEHOWL)))
|
||||
{
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
|
||||
pTemp->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,315);
|
||||
m_pInstance->SetData(TYPE_EVENT, 315);
|
||||
break;
|
||||
case 315:
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
m_pInstance->SetData(TYPE_EVENT,320);
|
||||
m_pInstance->SetData(TYPE_EVENT, 320);
|
||||
break;
|
||||
case 400:
|
||||
DoScriptText(SAY_STAGE_0_06, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 666:
|
||||
DoScriptText(SAY_STAGE_0_WIPE, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 1010:
|
||||
DoScriptText(SAY_STAGE_1_01, me);
|
||||
m_uiUpdateTimer = 7000;
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
me->SummonCreature(NPC_FIZZLEBANG, ToCCommonLoc[10].GetPositionX(), ToCCommonLoc[10].GetPositionY(), ToCCommonLoc[10].GetPositionZ(), 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 1180:
|
||||
DoScriptText(SAY_STAGE_1_07, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 2000:
|
||||
DoScriptText(SAY_STAGE_1_08, me);
|
||||
m_uiUpdateTimer = 18000;
|
||||
m_pInstance->SetData(TYPE_EVENT,2010);
|
||||
m_pInstance->SetData(TYPE_EVENT, 2010);
|
||||
break;
|
||||
case 2030:
|
||||
DoScriptText(SAY_STAGE_1_11, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 3000:
|
||||
DoScriptText(SAY_STAGE_2_01, me);
|
||||
m_uiUpdateTimer = 12000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3050);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3050);
|
||||
break;
|
||||
case 3001:
|
||||
DoScriptText(SAY_STAGE_2_01, me);
|
||||
m_uiUpdateTimer = 12000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3051);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3051);
|
||||
break;
|
||||
case 3060:
|
||||
DoScriptText(SAY_STAGE_2_03, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3070);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3070);
|
||||
break;
|
||||
case 3061:
|
||||
DoScriptText(SAY_STAGE_2_03, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3071);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3071);
|
||||
break;
|
||||
//Summoning crusaders
|
||||
case 3091:
|
||||
me->SummonCreature(NPC_CHAMPIONS_CONTROLLER, ToCCommonLoc[1]);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(0,HORDE);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(0, HORDE);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3092);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3092);
|
||||
break;
|
||||
//Summoning crusaders
|
||||
case 3090:
|
||||
me->SummonCreature(NPC_CHAMPIONS_CONTROLLER, ToCCommonLoc[1]);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(0,ALLIANCE);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(0, ALLIANCE);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3092);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3092);
|
||||
break;
|
||||
case 3092:
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(1,NOT_STARTED);
|
||||
m_pInstance->SetData(TYPE_EVENT,3095);
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(1, NOT_STARTED);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3095);
|
||||
break;
|
||||
//Crusaders battle end
|
||||
case 3100:
|
||||
DoScriptText(SAY_STAGE_2_06, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 4000:
|
||||
DoScriptText(SAY_STAGE_3_01, me);
|
||||
m_uiUpdateTimer = 13000;
|
||||
m_pInstance->SetData(TYPE_EVENT,4010);
|
||||
m_pInstance->SetData(TYPE_EVENT, 4010);
|
||||
break;
|
||||
case 4010:
|
||||
DoScriptText(SAY_STAGE_3_02, me);
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,4015);
|
||||
m_pInstance->SetData(TYPE_EVENT, 4015);
|
||||
break;
|
||||
case 4015:
|
||||
me->SummonCreature(NPC_LIGHTBANE, ToCCommonLoc[3].GetPositionX(), ToCCommonLoc[3].GetPositionY(), ToCCommonLoc[3].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_LIGHTBANE)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_LIGHTBANE)))
|
||||
{
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[6].GetPositionX(), ToCCommonLoc[6].GetPositionY(), ToCCommonLoc[6].GetPositionZ());
|
||||
pTemp->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
me->SummonCreature(NPC_DARKBANE, ToCCommonLoc[4].GetPositionX(), ToCCommonLoc[4].GetPositionY(), ToCCommonLoc[4].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
if (Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_DARKBANE)))
|
||||
if (Creature* pTemp = Unit::GetCreature((*me), m_pInstance->GetData64(NPC_DARKBANE)))
|
||||
{
|
||||
pTemp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[7].GetPositionX(), ToCCommonLoc[7].GetPositionY(), ToCCommonLoc[7].GetPositionZ());
|
||||
pTemp->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,4016);
|
||||
m_pInstance->SetData(TYPE_EVENT, 4016);
|
||||
break;
|
||||
case 4016:
|
||||
m_pInstance->SetData(TYPE_EVENT,4017);
|
||||
m_pInstance->SetData(TYPE_EVENT, 4017);
|
||||
m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
break;
|
||||
case 4040:
|
||||
m_uiUpdateTimer = 60000;
|
||||
m_pInstance->SetData(TYPE_EVENT,5000);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5000);
|
||||
break;
|
||||
case 5000:
|
||||
DoScriptText(SAY_STAGE_4_01, me);
|
||||
m_uiUpdateTimer = 10000;
|
||||
m_pInstance->SetData(TYPE_EVENT,5005);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5005);
|
||||
break;
|
||||
case 5005:
|
||||
m_uiUpdateTimer = 8000;
|
||||
m_pInstance->SetData(TYPE_EVENT,5010);
|
||||
m_pInstance->SetData(TYPE_EVENT, 5010);
|
||||
me->SummonCreature(NPC_LICH_KING_1, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5);
|
||||
break;
|
||||
case 5020:
|
||||
DoScriptText(SAY_STAGE_4_03, me);
|
||||
m_uiUpdateTimer = 1000;
|
||||
m_pInstance->SetData(TYPE_EVENT,0);
|
||||
m_pInstance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 6000:
|
||||
me->NearTeleportTo(AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 4.0f);
|
||||
m_uiUpdateTimer = 20000;
|
||||
m_pInstance->SetData(TYPE_EVENT,6005);
|
||||
m_pInstance->SetData(TYPE_EVENT, 6005);
|
||||
break;
|
||||
case 6005:
|
||||
DoScriptText(SAY_STAGE_4_06, me);
|
||||
m_uiUpdateTimer = 20000;
|
||||
m_pInstance->SetData(TYPE_EVENT,6010);
|
||||
m_pInstance->SetData(TYPE_EVENT, 6010);
|
||||
break;
|
||||
case 6010:
|
||||
if (IsHeroic())
|
||||
{
|
||||
DoScriptText(SAY_STAGE_4_07, me);
|
||||
m_uiUpdateTimer = 60000;
|
||||
m_pInstance->SetData(TYPE_ANUBARAK,SPECIAL);
|
||||
m_pInstance->SetData(TYPE_EVENT,6020);
|
||||
} else m_pInstance->SetData(TYPE_EVENT,6030);
|
||||
m_pInstance->SetData(TYPE_ANUBARAK, SPECIAL);
|
||||
m_pInstance->SetData(TYPE_EVENT, 6020);
|
||||
} else m_pInstance->SetData(TYPE_EVENT, 6030);
|
||||
break;
|
||||
case 6020:
|
||||
me->ForcedDespawn();
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,6030);
|
||||
m_pInstance->SetData(TYPE_EVENT, 6030);
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
@@ -856,37 +856,37 @@ class npc_garrosh_toc : public CreatureScript
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_03h, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,132);
|
||||
m_pInstance->SetData(TYPE_EVENT, 132);
|
||||
break;
|
||||
case 132:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,140);
|
||||
m_pInstance->SetData(TYPE_EVENT, 140);
|
||||
break;
|
||||
case 2010:
|
||||
DoScriptText(SAY_STAGE_1_09, me);
|
||||
m_uiUpdateTimer = 9000;
|
||||
m_pInstance->SetData(TYPE_EVENT,2020);
|
||||
m_pInstance->SetData(TYPE_EVENT, 2020);
|
||||
break;
|
||||
case 3050:
|
||||
DoScriptText(SAY_STAGE_2_02h, me);
|
||||
m_uiUpdateTimer = 15000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3060);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3060);
|
||||
break;
|
||||
case 3070:
|
||||
DoScriptText(SAY_STAGE_2_04h, me);
|
||||
m_uiUpdateTimer = 6000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3080);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3080);
|
||||
break;
|
||||
case 3081:
|
||||
DoScriptText(SAY_STAGE_2_05h, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3091);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3091);
|
||||
break;
|
||||
case 4030:
|
||||
DoScriptText(SAY_STAGE_3_03h, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,4040);
|
||||
m_pInstance->SetData(TYPE_EVENT, 4040);
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
@@ -934,41 +934,41 @@ class npc_varian_toc : public CreatureScript
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_03a, me);
|
||||
m_uiUpdateTimer = 2000;
|
||||
m_pInstance->SetData(TYPE_EVENT,122);
|
||||
m_pInstance->SetData(TYPE_EVENT, 122);
|
||||
break;
|
||||
case 122:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,130);
|
||||
m_pInstance->SetData(TYPE_EVENT, 130);
|
||||
break;
|
||||
case 2020:
|
||||
DoScriptText(SAY_STAGE_1_10, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,2030);
|
||||
m_pInstance->SetData(TYPE_EVENT, 2030);
|
||||
break;
|
||||
case 3051:
|
||||
DoScriptText(SAY_STAGE_2_02a, me);
|
||||
m_uiUpdateTimer = 10000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3061);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3061);
|
||||
break;
|
||||
case 3071:
|
||||
DoScriptText(SAY_STAGE_2_04a, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3081);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3081);
|
||||
break;
|
||||
case 3080:
|
||||
DoScriptText(SAY_STAGE_2_05a, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_pInstance->SetData(TYPE_EVENT,3090);
|
||||
m_pInstance->SetData(TYPE_EVENT, 3090);
|
||||
break;
|
||||
case 4020:
|
||||
DoScriptText(SAY_STAGE_3_03a, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_pInstance->SetData(TYPE_EVENT,4040);
|
||||
m_pInstance->SetData(TYPE_EVENT, 4040);
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
m_pInstance->SetData(TYPE_EVENT_TIMER,m_uiUpdateTimer);
|
||||
m_pInstance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -76,28 +76,28 @@ const Position JaraxxusLoc[]=
|
||||
|
||||
const Position FactionChampionLoc[]=
|
||||
{
|
||||
{514.231f,105.569f,418.234f, 0}, // 0 - Horde Initial Pos 0
|
||||
{508.334f,115.377f,418.234f, 0}, // 1 - Horde Initial Pos 1
|
||||
{506.454f,126.291f,418.234f, 0}, // 2 - Horde Initial Pos 2
|
||||
{506.243f,106.596f,421.592f, 0}, // 3 - Horde Initial Pos 3
|
||||
{499.885f,117.717f,421.557f, 0}, // 4 - Horde Initial Pos 4
|
||||
{514.231f, 105.569f, 418.234f, 0}, // 0 - Horde Initial Pos 0
|
||||
{508.334f, 115.377f, 418.234f, 0}, // 1 - Horde Initial Pos 1
|
||||
{506.454f, 126.291f, 418.234f, 0}, // 2 - Horde Initial Pos 2
|
||||
{506.243f, 106.596f, 421.592f, 0}, // 3 - Horde Initial Pos 3
|
||||
{499.885f, 117.717f, 421.557f, 0}, // 4 - Horde Initial Pos 4
|
||||
|
||||
{613.127f,100.443f,419.74f, 0}, // 5 - Ally Initial Pos 0
|
||||
{621.126f,128.042f,418.231f, 0}, // 6 - Ally Initial Pos 1
|
||||
{618.829f,113.606f,418.232f, 0}, // 7 - Ally Initial Pos 2
|
||||
{625.845f,112.914f,421.575f, 0}, // 8 - Ally Initial Pos 3
|
||||
{615.566f,109.653f,418.234f, 0}, // 9 - Ally Initial Pos 4
|
||||
{613.127f, 100.443f, 419.74f, 0}, // 5 - Ally Initial Pos 0
|
||||
{621.126f, 128.042f, 418.231f, 0}, // 6 - Ally Initial Pos 1
|
||||
{618.829f, 113.606f, 418.232f, 0}, // 7 - Ally Initial Pos 2
|
||||
{625.845f, 112.914f, 421.575f, 0}, // 8 - Ally Initial Pos 3
|
||||
{615.566f, 109.653f, 418.234f, 0}, // 9 - Ally Initial Pos 4
|
||||
|
||||
{535.469f,113.012f,394.66f, 0}, // 10 - Horde Final Pos 0
|
||||
{526.417f,137.465f,394.749f, 0}, // 11 - Horde Final Pos 1
|
||||
{528.108f,111.057f,395.289f, 0}, // 12 - Horde Final Pos 2
|
||||
{519.92f,134.285f,395.289f, 0}, // 13 - Horde Final Pos 3
|
||||
{533.648f,119.148f,394.646f, 0}, // 14 - Horde Final Pos 4
|
||||
{531.399f,125.63f,394.708f, 0}, // 15 - Horde Final Pos 5
|
||||
{528.958f,131.47f,394.73f, 0}, // 16 - Horde Final Pos 6
|
||||
{526.309f,116.667f,394.833f, 0}, // 17 - Horde Final Pos 7
|
||||
{524.238f,122.411f,394.819f, 0}, // 18 - Horde Final Pos 8
|
||||
{521.901f,128.488f,394.832f, 0}, // 19 - Horde Final Pos 9
|
||||
{535.469f, 113.012f, 394.66f, 0}, // 10 - Horde Final Pos 0
|
||||
{526.417f, 137.465f, 394.749f, 0}, // 11 - Horde Final Pos 1
|
||||
{528.108f, 111.057f, 395.289f, 0}, // 12 - Horde Final Pos 2
|
||||
{519.92f, 134.285f, 395.289f, 0}, // 13 - Horde Final Pos 3
|
||||
{533.648f, 119.148f, 394.646f, 0}, // 14 - Horde Final Pos 4
|
||||
{531.399f, 125.63f, 394.708f, 0}, // 15 - Horde Final Pos 5
|
||||
{528.958f, 131.47f, 394.73f, 0}, // 16 - Horde Final Pos 6
|
||||
{526.309f, 116.667f, 394.833f, 0}, // 17 - Horde Final Pos 7
|
||||
{524.238f, 122.411f, 394.819f, 0}, // 18 - Horde Final Pos 8
|
||||
{521.901f, 128.488f, 394.832f, 0}, // 19 - Horde Final Pos 9
|
||||
};
|
||||
|
||||
const Position TwinValkyrsLoc[]=
|
||||
|
||||
Reference in New Issue
Block a user