*Add some checks to avoid crashes if ScriptedInstance is NULL.
--HG-- branch : trunk
This commit is contained in:
@@ -46,7 +46,7 @@ EndContentData */
|
|||||||
|
|
||||||
bool GOHello_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo)
|
bool GOHello_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo)
|
||||||
{
|
{
|
||||||
if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData())
|
if (ScriptedInstance* pInstance = pGo->GetInstanceData())
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(TYPE_LYCEUM) == IN_PROGRESS)
|
if (pInstance->GetData(TYPE_LYCEUM) == IN_PROGRESS)
|
||||||
pInstance->SetData(TYPE_LYCEUM, DONE);
|
pInstance->SetData(TYPE_LYCEUM, DONE);
|
||||||
@@ -91,8 +91,6 @@ uint32 RingBoss[]=
|
|||||||
|
|
||||||
bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry *at)
|
bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry *at)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pPlayer->GetInstanceData());
|
|
||||||
|
|
||||||
if (ScriptedInstance* pInstance = pPlayer->GetInstanceData())
|
if (ScriptedInstance* pInstance = pPlayer->GetInstanceData())
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || pInstance->GetData(TYPE_RING_OF_LAW) == DONE)
|
if (pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || pInstance->GetData(TYPE_RING_OF_LAW) == DONE)
|
||||||
@@ -1192,7 +1190,7 @@ CreatureAI* GetAI_npc_rocknot(Creature* pCreature)
|
|||||||
|
|
||||||
bool ChooseReward_npc_rocknot(Player* pPlayer, Creature* pCreature, const Quest *_Quest, uint32 item)
|
bool ChooseReward_npc_rocknot(Player* pPlayer, Creature* pCreature, const Quest *_Quest, uint32 item)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
|
|
||||||
if (!pInstance)
|
if (!pInstance)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance
|
|||||||
|
|
||||||
bool ItemUse_item_defias_gunpowder(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
bool ItemUse_item_defias_gunpowder(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (pPlayer->GetInstanceData()) ? (pPlayer->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = pPlayer->GetInstanceData();
|
||||||
|
|
||||||
if (!pInstance)
|
if (!pInstance)
|
||||||
{
|
{
|
||||||
@@ -233,5 +233,3 @@ void AddSC_instance_deadmines()
|
|||||||
newscript->pItemUse = &ItemUse_item_defias_gunpowder;
|
newscript->pItemUse = &ItemUse_item_defias_gunpowder;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_netherspiteAI(Creature* c) : ScriptedAI(c)
|
boss_netherspiteAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
|
|
||||||
for(int i=0; i<3; ++i)
|
for(int i=0; i<3; ++i)
|
||||||
{
|
{
|
||||||
@@ -251,7 +251,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
|
|||||||
|
|
||||||
void HandleDoors(bool open) // Massive Door switcher
|
void HandleDoors(bool open) // Massive Door switcher
|
||||||
{
|
{
|
||||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GO_MASSIVE_DOOR)))
|
if(GameObject *Door = GameObject::GetGameObject(*m_creature, pInstance : pInstance->GetData64(DATA_GO_MASSIVE_DOOR) ? 0))
|
||||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,14 +113,14 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
m_creature->setActive(true);
|
m_creature->setActive(true);
|
||||||
|
|
||||||
if (pInstance->GetData(TYPE_NIGHTBANE) == DONE || pInstance->GetData(TYPE_NIGHTBANE) == IN_PROGRESS)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
if (pInstance->GetData(TYPE_NIGHTBANE) == DONE || pInstance->GetData(TYPE_NIGHTBANE) == IN_PROGRESS)
|
||||||
m_creature->RemoveCorpse();
|
{
|
||||||
}
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
else
|
m_creature->RemoveCorpse();
|
||||||
{
|
}
|
||||||
if (pInstance)
|
else
|
||||||
pInstance->SetData(TYPE_NIGHTBANE, NOT_STARTED);
|
pInstance->SetData(TYPE_NIGHTBANE, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,8 +138,11 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
|
|
||||||
void HandleTerraceDoors(bool open)
|
void HandleTerraceDoors(bool open)
|
||||||
{
|
{
|
||||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
|
if(pInstance)
|
||||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
|
{
|
||||||
|
pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||||
|
pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
|||||||
uint64 KilrekGUID = pInstance->GetData64(DATA_KILREK);
|
uint64 KilrekGUID = pInstance->GetData64(DATA_KILREK);
|
||||||
else ERROR_INST_DATA(m_creature);
|
else ERROR_INST_DATA(m_creature);
|
||||||
|
|
||||||
Creature* Kilrek = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KILREK)));
|
Creature* Kilrek = Unit::GetCreature(*m_creature, pInstance : pInstance->GetData64(DATA_KILREK) ? 0);
|
||||||
if (SummonKilrek && Kilrek)
|
if (SummonKilrek && Kilrek)
|
||||||
{
|
{
|
||||||
Kilrek->Respawn();
|
Kilrek->Respawn();
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ CreatureAI* GetAI_npc_barnesAI(Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature)
|
bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature)
|
||||||
{
|
{
|
||||||
if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData())
|
if (ScriptedInstance* pInstance = pCreature->GetInstanceData())
|
||||||
{
|
{
|
||||||
// Check for death of Moroes and if opera event is not done already
|
// Check for death of Moroes and if opera event is not done already
|
||||||
if (pInstance->GetData(TYPE_MOROES) == DONE && pInstance->GetData(TYPE_OPERA) != DONE)
|
if (pInstance->GetData(TYPE_MOROES) == DONE && pInstance->GetData(TYPE_OPERA) != DONE)
|
||||||
@@ -402,7 +402,7 @@ enum
|
|||||||
|
|
||||||
bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature)
|
bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature)
|
||||||
{
|
{
|
||||||
if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData())
|
if (ScriptedInstance* pInstance = pCreature->GetInstanceData())
|
||||||
{
|
{
|
||||||
// Check if Shade of Aran event is done
|
// Check if Shade of Aran event is done
|
||||||
if (pInstance->GetData(TYPE_ARAN) == DONE)
|
if (pInstance->GetData(TYPE_ARAN) == DONE)
|
||||||
|
|||||||
+2
-1
@@ -79,7 +79,8 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_felblood_kaelthasAI(Creature* c) : ScriptedAI(c)
|
boss_felblood_kaelthasAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData(); Heroic = c->GetMap()->IsHeroic();
|
pInstance = c->GetInstanceData();
|
||||||
|
Heroic = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
+1
-1
@@ -372,7 +372,7 @@ struct TRINITY_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI
|
|||||||
ResetThreatTimer = 5000 + rand()%15000;
|
ResetThreatTimer = 5000 + rand()%15000;
|
||||||
|
|
||||||
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
|
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
|
||||||
if (Creature* pDelrissa = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA)))
|
if (Creature* pDelrissa = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_DELRISSA) : 0))
|
||||||
{
|
{
|
||||||
if (!pDelrissa->isAlive())
|
if (!pDelrissa->isAlive())
|
||||||
pDelrissa->Respawn();
|
pDelrissa->Respawn();
|
||||||
|
|||||||
+1
-1
@@ -326,7 +326,7 @@ struct TRINITY_DLL_DECL mob_fel_crystalAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if (ScriptedInstance* pInstance = (m_creature->GetInstanceData()))
|
if (ScriptedInstance* pInstance = m_creature->GetInstanceData())
|
||||||
{
|
{
|
||||||
Creature* Selin = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SELIN)));
|
Creature* Selin = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SELIN)));
|
||||||
if (Selin && Selin->isAlive())
|
if (Selin && Selin->isAlive())
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData(); Heroic = c->GetMap()->IsHeroic();
|
pInstance = c->GetInstanceData();
|
||||||
Heroic = c->GetMap()->IsHeroic();
|
Heroic = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-6
@@ -53,12 +53,7 @@ EndScriptData */
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_majordomoAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_majordomoAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_majordomoAI(Creature *c) : ScriptedAI(c)
|
boss_majordomoAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
|
|
||||||
uint32 MagicReflection_Timer;
|
uint32 MagicReflection_Timer;
|
||||||
uint32 DamageReflection_Timer;
|
uint32 DamageReflection_Timer;
|
||||||
|
|||||||
+2
-11
@@ -37,17 +37,13 @@ EndScriptData */
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_sulfuronAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_sulfuronAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_sulfuronAI(Creature *c) : ScriptedAI(c)
|
boss_sulfuronAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 Darkstrike_Timer;
|
uint32 Darkstrike_Timer;
|
||||||
uint32 DemoralizingShout_Timer;
|
uint32 DemoralizingShout_Timer;
|
||||||
uint32 Inspire_Timer;
|
uint32 Inspire_Timer;
|
||||||
uint32 Knockdown_Timer;
|
uint32 Knockdown_Timer;
|
||||||
uint32 Flamespear_Timer;
|
uint32 Flamespear_Timer;
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -124,17 +120,12 @@ struct TRINITY_DLL_DECL boss_sulfuronAI : public ScriptedAI
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_flamewaker_priestAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_flamewaker_priestAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_flamewaker_priestAI(Creature *c) : ScriptedAI(c)
|
mob_flamewaker_priestAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 Heal_Timer;
|
uint32 Heal_Timer;
|
||||||
uint32 ShadowWordPain_Timer;
|
uint32 ShadowWordPain_Timer;
|
||||||
uint32 Immolate_Timer;
|
uint32 Immolate_Timer;
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
Heal_Timer = 15000+rand()%15000;
|
Heal_Timer = 15000+rand()%15000;
|
||||||
|
|||||||
+1
-1
@@ -393,7 +393,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_HORSEMAN_EVENT, 0);
|
pInstance->SetData(DATA_HORSEMAN_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlyMode()
|
void FlyMode()
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_theolenkrastinovAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit* pKiller)
|
void JustDied(Unit* pKiller)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (m_creature->GetInstanceData()) ? (m_creature->GetInstanceData()) : NULL;
|
ScriptedInstance* pInstance = m_creature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_DOCTORTHEOLENKRASTINOV_DEATH, 0);
|
pInstance->SetData(DATA_DOCTORTHEOLENKRASTINOV_DEATH, 0);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ struct TRINITY_DLL_DECL boss_illuciabarovAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit *killer)
|
void JustDied(Unit *killer)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (m_creature->GetInstanceData()) ? (m_creature->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = m_creature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0);
|
pInstance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0);
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_instructormaliciaAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit *killer)
|
void JustDied(Unit *killer)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (m_creature->GetInstanceData()) ? (m_creature->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = m_creature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0);
|
pInstance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0);
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ struct TRINITY_DLL_DECL boss_lordalexeibarovAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit *killer)
|
void JustDied(Unit *killer)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (m_creature->GetInstanceData()) ? (m_creature->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = m_creature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0);
|
pInstance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0);
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ struct TRINITY_DLL_DECL boss_lorekeeperpolkeltAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit *killer)
|
void JustDied(Unit *killer)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (m_creature->GetInstanceData()) ? (m_creature->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = m_creature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0);
|
pInstance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_theravenianAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit *killer)
|
void JustDied(Unit *killer)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (m_creature->GetInstanceData()) ? (m_creature->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = m_creature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_THERAVENIAN_DEATH, 0);
|
pInstance->SetData(DATA_THERAVENIAN_DEATH, 0);
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ CreatureAI* GetAI_npc_shadowfang_prisoner(Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature)
|
bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
|
|
||||||
if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE)
|
if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE)
|
||||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||||
|
|||||||
+1
-6
@@ -34,12 +34,7 @@ EndScriptData */
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_magistrate_barthilasAI(Creature *c) : ScriptedAI(c)
|
boss_magistrate_barthilasAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = m_creature->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
|
|
||||||
uint32 DrainingBlow_Timer;
|
uint32 DrainingBlow_Timer;
|
||||||
uint32 CrowdPummel_Timer;
|
uint32 CrowdPummel_Timer;
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ enum Spells
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_brutallusAI(Creature *c) : ScriptedAI(c){
|
boss_brutallusAI(Creature *c) : ScriptedAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +142,8 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(YELL_DEATH, m_creature);
|
DoScriptText(YELL_DEATH, m_creature);
|
||||||
|
|
||||||
if (pInstance){
|
if (pInstance)
|
||||||
|
{
|
||||||
pInstance->SetData(DATA_BRUTALLUS_EVENT, DONE);
|
pInstance->SetData(DATA_BRUTALLUS_EVENT, DONE);
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
m_creature->GetPosition(x,y,z);
|
m_creature->GetPosition(x,y,z);
|
||||||
@@ -245,7 +247,8 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit *who){
|
void MoveInLineOfSight(Unit *who)
|
||||||
|
{
|
||||||
if (pInstance && Intro)
|
if (pInstance && Intro)
|
||||||
pInstance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
|
pInstance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ enum Creatures
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_sacrolashAI(Creature *c) : ScriptedAI(c){
|
boss_sacrolashAI(Creature *c) : ScriptedAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,7 +351,8 @@ CreatureAI* GetAI_boss_sacrolash(Creature* pCreature)
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
|
struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
|
||||||
{
|
{
|
||||||
boss_alythessAI(Creature *c) : Scripted_NoMovementAI(c){
|
boss_alythessAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
IntroStepCounter = 10;
|
IntroStepCounter = 10;
|
||||||
}
|
}
|
||||||
@@ -527,7 +529,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
|
|||||||
|
|
||||||
uint32 IntroStep(uint32 step)
|
uint32 IntroStep(uint32 step)
|
||||||
{
|
{
|
||||||
Creature* Sacrolash = Unit::GetCreature((*m_creature),pInstance->GetData64(DATA_SACROLASH));
|
Creature* Sacrolash = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_SACROLASH) : 0);
|
||||||
switch (step)
|
switch (step)
|
||||||
{
|
{
|
||||||
case 0: return 0;
|
case 0: return 0;
|
||||||
|
|||||||
@@ -126,7 +126,8 @@ static EventFelmyst MaxTimer[]=
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_felmystAI(Creature *c) : ScriptedAI(c){
|
boss_felmystAI(Creature *c) : ScriptedAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
|
|
||||||
// wait for core patch be accepted
|
// wait for core patch be accepted
|
||||||
@@ -307,7 +308,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
error_log("Summon Vapor case 2");
|
error_log("Summon Vapor case 2");
|
||||||
Unit* target;
|
Unit* target;
|
||||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||||
if (!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
|
if (!target) target = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
|
Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
|
||||||
@@ -332,7 +333,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
//m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support
|
//m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support
|
||||||
Unit* target;
|
Unit* target;
|
||||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||||
if (!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
|
if (!target) target = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
//target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
|
//target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
|
||||||
@@ -359,7 +360,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
case 5:{
|
case 5:{
|
||||||
Unit* target;
|
Unit* target;
|
||||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||||
if (!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
|
if (!target) target = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
BreathX = target->GetPositionX();
|
BreathX = target->GetPositionX();
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
DoScriptText(SAY_EVIL_AGGRO, m_creature);
|
DoScriptText(SAY_EVIL_AGGRO, m_creature);
|
||||||
if (GameObject *Door = pInstance->instance->GetGameObject(pInstance->GetData64(DoorGUID)))
|
if (GameObject *Door = pInstance ? pInstance->instance->GetGameObject(pInstance->GetData64(DoorGUID)) : NULL)
|
||||||
Door->SetLootState(GO_ACTIVATED);
|
Door->SetLootState(GO_ACTIVATED);
|
||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
|
|
||||||
@@ -548,7 +548,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff)
|
|||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop();
|
||||||
if (GameObject *Door = pInstance->instance->GetGameObject(pInstance->GetData64(DoorGUID)))
|
if (GameObject *Door = pInstance ? pInstance->instance->GetGameObject(pInstance->GetData64(DoorGUID)) : NULL)
|
||||||
Door->SetLootState(GO_JUST_DEACTIVATED);
|
Door->SetLootState(GO_JUST_DEACTIVATED);
|
||||||
TalkSequence++;
|
TalkSequence++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,14 +268,16 @@ public:
|
|||||||
|
|
||||||
bool GOHello_go_orb_of_the_blue_flight(Player* pPlayer, GameObject* pGo)
|
bool GOHello_go_orb_of_the_blue_flight(Player* pPlayer, GameObject* pGo)
|
||||||
{
|
{
|
||||||
if (pGo->GetUInt32Value(GAMEOBJECT_FACTION) == 35){
|
if (pGo->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
|
||||||
|
{
|
||||||
ScriptedInstance* pInstance = pGo->GetInstanceData();
|
ScriptedInstance* pInstance = pGo->GetInstanceData();
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
//float dx,dy,dz;
|
//float dx,dy,dz;
|
||||||
pGo->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
|
pGo->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
|
||||||
pPlayer->CastSpell(pPlayer, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
|
pPlayer->CastSpell(pPlayer, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
|
||||||
pGo->SetUInt32Value(GAMEOBJECT_FACTION, 0);
|
pGo->SetUInt32Value(GAMEOBJECT_FACTION, 0);
|
||||||
Creature* Kalec = Unit::GetCreature(*pPlayer, pInstance->GetData64(DATA_KALECGOS_KJ));
|
if(pInstance)
|
||||||
|
Creature* Kalec = Unit::GetCreature(*pPlayer, pInstance->GetData64(DATA_KALECGOS_KJ));
|
||||||
//Kalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
|
//Kalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
|
||||||
pGo->GetPosition(x,y,z);
|
pGo->GetPosition(x,y,z);
|
||||||
// this won't work. need rewritten
|
// this won't work. need rewritten
|
||||||
@@ -301,7 +303,8 @@ bool GOHello_go_orb_of_the_blue_flight(Player* pPlayer, GameObject* pGo)
|
|||||||
//AI for Kalecgos
|
//AI for Kalecgos
|
||||||
struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_kalecgos_kjAI(Creature* c) : ScriptedAI(c){
|
boss_kalecgos_kjAI(Creature* c) : ScriptedAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +348,7 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
uint8 i = 0;
|
uint8 i = 0;
|
||||||
for(std::list<GameObject*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr, ++i){
|
for(std::list<GameObject*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr, ++i){
|
||||||
Orb[i] = pInstance->instance->GetGameObject(pInstance->GetData64((*itr)->GetGUID()));
|
Orb[i] = pInstance ? pInstance->instance->GetGameObject(pInstance->GetData64((*itr)->GetGUID())) : NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,10 +389,13 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
Orb[random]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
|
if(Orb[random])
|
||||||
Orb[random]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
|
{
|
||||||
Orb[random]->setActive(true);
|
Orb[random]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
|
||||||
Orb[random]->Refresh();
|
Orb[random]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
|
||||||
|
Orb[random]->setActive(true);
|
||||||
|
Orb[random]->Refresh();
|
||||||
|
}
|
||||||
++OrbsEmpowered;
|
++OrbsEmpowered;
|
||||||
}
|
}
|
||||||
++EmpowerCount;
|
++EmpowerCount;
|
||||||
@@ -420,7 +426,8 @@ CreatureAI* GetAI_boss_kalecgos_kj(Creature* pCreature)
|
|||||||
//AI for Kil'jaeden
|
//AI for Kil'jaeden
|
||||||
struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
||||||
{
|
{
|
||||||
boss_kiljaedenAI(Creature* c) : Scripted_NoMovementAI(c), Summons(m_creature){
|
boss_kiljaedenAI(Creature* c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,7 +479,8 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
|||||||
IsWaiting = false;
|
IsWaiting = false;
|
||||||
OrbActivated = false;
|
OrbActivated = false;
|
||||||
|
|
||||||
Kalec = CAST_CRE(Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KALECGOS_KJ)));
|
if(pInstance)
|
||||||
|
Kalec = CAST_CRE(Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KALECGOS_KJ)));
|
||||||
ChangeTimers(false, 0);
|
ChangeTimers(false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,7 +724,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
|||||||
if (Phase <= PHASE_ARMAGEDDON){
|
if (Phase <= PHASE_ARMAGEDDON){
|
||||||
if (Phase == PHASE_ARMAGEDDON && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)){
|
if (Phase == PHASE_ARMAGEDDON && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)){
|
||||||
Phase = PHASE_SACRIFICE;
|
Phase = PHASE_SACRIFICE;
|
||||||
Creature* Anveena = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_ANVEENA)));
|
Creature* Anveena = (Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_ANVEENA) : 0));
|
||||||
if (Anveena)Anveena->CastSpell(m_creature, SPELL_SACRIFICE_OF_ANVEENA, false);
|
if (Anveena)Anveena->CastSpell(m_creature, SPELL_SACRIFICE_OF_ANVEENA, false);
|
||||||
OrbActivated = false;
|
OrbActivated = false;
|
||||||
ChangeTimers(true, 10000);// He shouldn't cast spells for ~10 seconds after Anveena's sacrifice. This will be done within Anveena's script
|
ChangeTimers(true, 10000);// He shouldn't cast spells for ~10 seconds after Anveena's sacrifice. This will be done within Anveena's script
|
||||||
@@ -735,7 +743,8 @@ CreatureAI* GetAI_boss_kiljaeden(Creature* pCreature)
|
|||||||
//AI for Kil'jaeden Event Controller
|
//AI for Kil'jaeden Event Controller
|
||||||
struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementAI
|
struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementAI
|
||||||
{
|
{
|
||||||
mob_kiljaeden_controllerAI(Creature* c) : Scripted_NoMovementAI(c), Summons(m_creature){
|
mob_kiljaeden_controllerAI(Creature* c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,8 +759,10 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
|
|||||||
uint32 Phase;
|
uint32 Phase;
|
||||||
uint8 DeceiverDeathCount;
|
uint8 DeceiverDeathCount;
|
||||||
|
|
||||||
void InitializeAI(){
|
void InitializeAI()
|
||||||
KalecKJ = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KALECGOS_KJ));
|
{
|
||||||
|
if(pInstance)
|
||||||
|
KalecKJ = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KALECGOS_KJ));
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
m_creature->addUnitState(UNIT_STAT_STUNNED);
|
m_creature->addUnitState(UNIT_STAT_STUNNED);
|
||||||
@@ -790,7 +801,7 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (RandomSayTimer < diff && pInstance->GetData(DATA_MURU_EVENT) != DONE && pInstance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED){
|
if (RandomSayTimer < diff && pInstance && pInstance->GetData(DATA_MURU_EVENT) != DONE && pInstance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED){
|
||||||
switch(rand()%5){
|
switch(rand()%5){
|
||||||
case 0: DoScriptText(SAY_KJ_OFFCOMBAT1, m_creature); break;
|
case 0: DoScriptText(SAY_KJ_OFFCOMBAT1, m_creature); break;
|
||||||
case 1: DoScriptText(SAY_KJ_OFFCOMBAT2, m_creature); break;
|
case 1: DoScriptText(SAY_KJ_OFFCOMBAT2, m_creature); break;
|
||||||
@@ -826,7 +837,8 @@ CreatureAI* GetAI_mob_kiljaeden_controller(Creature* pCreature)
|
|||||||
//AI for Hand of the Deceiver
|
//AI for Hand of the Deceiver
|
||||||
struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_hand_of_the_deceiverAI(Creature* c) : ScriptedAI(c){
|
mob_hand_of_the_deceiverAI(Creature* c) : ScriptedAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -838,7 +850,8 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
|
|||||||
// TODO: Timers!
|
// TODO: Timers!
|
||||||
ShadowBoltVolleyTimer = 8000 + rand()%6000; // So they don't all cast it in the same moment.
|
ShadowBoltVolleyTimer = 8000 + rand()%6000; // So they don't all cast it in the same moment.
|
||||||
FelfirePortalTimer = 20000;
|
FelfirePortalTimer = 20000;
|
||||||
if (pInstance)pInstance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
|
if (pInstance)
|
||||||
|
pInstance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summoned){
|
void JustSummoned(Creature* summoned){
|
||||||
@@ -847,7 +860,8 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who){
|
void EnterCombat(Unit* who){
|
||||||
if (pInstance){
|
if (pInstance)
|
||||||
|
{
|
||||||
pInstance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
|
||||||
Creature* Control = CAST_CRE(Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER)));
|
Creature* Control = CAST_CRE(Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER)));
|
||||||
if (Control)
|
if (Control)
|
||||||
@@ -856,7 +870,8 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
|
|||||||
m_creature->InterruptNonMeleeSpells(true);
|
m_creature->InterruptNonMeleeSpells(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer){
|
void JustDied(Unit* killer)
|
||||||
|
{
|
||||||
if (!pInstance)
|
if (!pInstance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1050,7 +1065,8 @@ CreatureAI* GetAI_mob_armageddon(Creature* pCreature)
|
|||||||
//AI for Shield Orbs
|
//AI for Shield Orbs
|
||||||
struct TRINITY_DLL_DECL mob_shield_orbAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_shield_orbAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_shield_orbAI(Creature* c) : ScriptedAI(c) {
|
mob_shield_orbAI(Creature* c) : ScriptedAI(c)
|
||||||
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1101,7 +1117,7 @@ struct TRINITY_DLL_DECL mob_shield_orbAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Timer < diff){
|
if (Timer < diff){
|
||||||
Unit* random = (Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
|
Unit* random = (Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0));
|
||||||
if (random)DoCast(random, SPELL_SHADOW_BOLT, false);
|
if (random)DoCast(random, SPELL_SHADOW_BOLT, false);
|
||||||
Timer = 500+ rand()%500;
|
Timer = 500+ rand()%500;
|
||||||
}else Timer -= diff;
|
}else Timer -= diff;
|
||||||
@@ -1316,4 +1332,4 @@ void AddSC_boss_kiljaeden()
|
|||||||
newscript->GetAI = &GetAI_mob_sinster_reflection;
|
newscript->GetAI = &GetAI_mob_sinster_reflection;
|
||||||
newscript->Name = "mob_sinster_reflection";
|
newscript->Name = "mob_sinster_reflection";
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -287,6 +287,8 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI
|
|||||||
{
|
{
|
||||||
if (Timer[TIMER_PHASE] <diff)
|
if (Timer[TIMER_PHASE] <diff)
|
||||||
{
|
{
|
||||||
|
if(!pInstance)
|
||||||
|
return;
|
||||||
switch(pInstance->GetData(DATA_MURU_EVENT))
|
switch(pInstance->GetData(DATA_MURU_EVENT))
|
||||||
{
|
{
|
||||||
case NOT_STARTED:
|
case NOT_STARTED:
|
||||||
@@ -394,7 +396,7 @@ struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI
|
|||||||
|
|
||||||
void JustSummoned(Creature* summoned)
|
void JustSummoned(Creature* summoned)
|
||||||
{
|
{
|
||||||
Player* Target = Unit::GetPlayer(pInstance->GetData64(DATA_PLAYER_GUID));
|
Player* Target = Unit::GetPlayer(pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||||
if (Target)
|
if (Target)
|
||||||
summoned->AI()->AttackStart(Target);
|
summoned->AI()->AttackStart(Target);
|
||||||
|
|
||||||
@@ -423,7 +425,8 @@ struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI
|
|||||||
{
|
{
|
||||||
if (!SummonSentinel)
|
if (!SummonSentinel)
|
||||||
{
|
{
|
||||||
if (InAction && pInstance->GetData(DATA_MURU_EVENT) == NOT_STARTED)Reset();
|
if (InAction && pInstance && pInstance->GetData(DATA_MURU_EVENT) == NOT_STARTED)
|
||||||
|
Reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (SummonTimer < diff)
|
if (SummonTimer < diff)
|
||||||
@@ -442,12 +445,7 @@ CreatureAI* GetAI_npc_muru_portal(Creature* pCreature)
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI
|
struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
npc_dark_fiendAI(Creature *c) : ScriptedAI(c)
|
npc_dark_fiendAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
|
|
||||||
uint32 WaitTimer;
|
uint32 WaitTimer;
|
||||||
bool InAction;
|
bool InAction;
|
||||||
@@ -507,12 +505,7 @@ CreatureAI* GetAI_npc_dark_fiend(Creature* pCreature)
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI
|
struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
npc_void_sentinelAI(Creature *c) : ScriptedAI(c)
|
npc_void_sentinelAI(Creature *c) : ScriptedAI(c){}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
|
|
||||||
uint32 PulseTimer;
|
uint32 PulseTimer;
|
||||||
uint32 VoidBlastTimer;
|
uint32 VoidBlastTimer;
|
||||||
@@ -588,7 +581,7 @@ struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (SpellTimer < diff)
|
if (SpellTimer < diff)
|
||||||
{
|
{
|
||||||
Unit* Victim = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
|
Unit* Victim = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||||
switch(NeedForAHack)
|
switch(NeedForAHack)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_archaedasAI(Creature *c) : ScriptedAI(c)
|
boss_archaedasAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (m_creature->GetInstanceData());
|
pInstance = m_creature->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Tremor_Timer;
|
uint32 Tremor_Timer;
|
||||||
@@ -73,7 +73,8 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
|||||||
guardiansAwake = false;
|
guardiansAwake = false;
|
||||||
vaultWalkersAwake = false;
|
vaultWalkersAwake = false;
|
||||||
|
|
||||||
if (pInstance) pInstance->SetData (NULL, 5); // respawn any dead minions
|
if (pInstance)
|
||||||
|
pInstance->SetData (NULL, 5); // respawn any dead minions
|
||||||
m_creature->setFaction(35);
|
m_creature->setFaction(35);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||||
@@ -208,7 +209,7 @@ struct TRINITY_DLL_DECL mob_archaedas_minionsAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_archaedas_minionsAI(Creature *c) : ScriptedAI(c)
|
mob_archaedas_minionsAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (m_creature->GetInstanceData());
|
pInstance = m_creature->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Arcing_Timer;
|
uint32 Arcing_Timer;
|
||||||
@@ -264,7 +265,7 @@ struct TRINITY_DLL_DECL mob_archaedas_minionsAI : public ScriptedAI
|
|||||||
} else if (wakingUp && Awaken_Timer <= 0) {
|
} else if (wakingUp && Awaken_Timer <= 0) {
|
||||||
wakingUp = false;
|
wakingUp = false;
|
||||||
amIAwake = true;
|
amIAwake = true;
|
||||||
AttackStart(Unit::GetUnit(*m_creature, pInstance->GetData64(0))); // whoWokeArchaedasGUID
|
// AttackStart(Unit::GetUnit(*m_creature, pInstance->GetData64(0))); // whoWokeArchaedasGUID
|
||||||
return; // dont want to continue until we finish the AttackStart method
|
return; // dont want to continue until we finish the AttackStart method
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,8 +333,10 @@ bool GOHello_go_altar_of_archaedas(Player* pPlayer, GameObject* pGo)
|
|||||||
return false; // not enough people
|
return false; // not enough people
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance = (pPlayer->GetInstanceData());
|
ScriptedInstance* pInstance = pPlayer->GetInstanceData();
|
||||||
if (!pInstance) return false;
|
if (!pInstance)
|
||||||
|
return false;
|
||||||
|
|
||||||
pInstance->SetData(NULL,0);
|
pInstance->SetData(NULL,0);
|
||||||
pInstance->SetData64(0,pPlayer->GetGUID()); // activate archaedas
|
pInstance->SetData64(0,pPlayer->GetGUID()); // activate archaedas
|
||||||
|
|
||||||
@@ -416,8 +419,9 @@ static uint32 altarOfTheKeeperCounter=0;
|
|||||||
|
|
||||||
bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* pGo)
|
bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* pGo)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pPlayer->GetInstanceData());
|
ScriptedInstance* pInstance = pPlayer->GetInstanceData();
|
||||||
if (!pInstance) return true;
|
if (!pInstance)
|
||||||
|
return true;
|
||||||
|
|
||||||
bool alreadyUsed;
|
bool alreadyUsed;
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ bool GossipSelect_npc_zulaman_hostage(Player* pPlayer, Creature* pCreature, uint
|
|||||||
return true;
|
return true;
|
||||||
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
|
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
//uint8 progress = pInstance->GetData(DATA_CHESTLOOTED);
|
//uint8 progress = pInstance->GetData(DATA_CHESTLOOTED);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ EndScriptData */
|
|||||||
|
|
||||||
bool GOHello_go_gong_of_bethekk(Player* pPlayer, GameObject* pGo)
|
bool GOHello_go_gong_of_bethekk(Player* pPlayer, GameObject* pGo)
|
||||||
{
|
{
|
||||||
if (ScriptedInstance* m_pInstance = (ScriptedInstance*)pGo->GetInstanceData())
|
if (ScriptedInstance* m_pInstance = pGo->GetInstanceData())
|
||||||
{
|
{
|
||||||
if (m_pInstance->GetData(TYPE_ARLOKK) == DONE || m_pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS)
|
if (m_pInstance->GetData(TYPE_ARLOKK) == DONE || m_pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -41,12 +41,7 @@ EndScriptData */
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_jindoAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_jindoAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_jindoAI(Creature *c) : ScriptedAI(c)
|
boss_jindoAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
uint32 BrainWashTotem_Timer;
|
uint32 BrainWashTotem_Timer;
|
||||||
uint32 HealingWard_Timer;
|
uint32 HealingWard_Timer;
|
||||||
@@ -168,7 +163,7 @@ struct TRINITY_DLL_DECL mob_healing_wardAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_healing_wardAI(Creature *c) : ScriptedAI(c)
|
mob_healing_wardAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Heal_Timer;
|
uint32 Heal_Timer;
|
||||||
@@ -205,15 +200,10 @@ struct TRINITY_DLL_DECL mob_healing_wardAI : public ScriptedAI
|
|||||||
//Shade of Jindo
|
//Shade of Jindo
|
||||||
struct TRINITY_DLL_DECL mob_shade_of_jindoAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_shade_of_jindoAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_shade_of_jindoAI(Creature *c) : ScriptedAI(c)
|
mob_shade_of_jindoAI(Creature *c) : ScriptedAI(c) {}
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 ShadowShock_Timer;
|
uint32 ShadowShock_Timer;
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
ShadowShock_Timer = 1000;
|
ShadowShock_Timer = 1000;
|
||||||
|
|||||||
@@ -180,7 +180,6 @@ struct TRINITY_DLL_DECL boss_venoxisAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI
|
|||||||
boss_chrono_lord_dejaAI(Creature *c) : ScriptedAI(c)
|
boss_chrono_lord_dejaAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI
|
|||||||
if (!creature_entry)
|
if (!creature_entry)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
if (pInstance && pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||||
{
|
{
|
||||||
m_creature->InterruptNonMeleeSpells(true);
|
m_creature->InterruptNonMeleeSpells(true);
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
@@ -297,7 +297,7 @@ struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI
|
|||||||
|
|
||||||
if (Summon)
|
if (Summon)
|
||||||
{
|
{
|
||||||
if (Unit *temp = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_MEDIVH)))
|
if (Unit *temp = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_MEDIVH) : 0))
|
||||||
Summon->AddThreat(temp,0.0f);
|
Summon->AddThreat(temp,0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -708,7 +708,8 @@ void hyjalAI::SpawnVeins()
|
|||||||
|
|
||||||
void hyjalAI::DeSpawnVeins()
|
void hyjalAI::DeSpawnVeins()
|
||||||
{
|
{
|
||||||
if (!pInstance)return;
|
if (!pInstance)
|
||||||
|
return;
|
||||||
if (Faction == 1)
|
if (Faction == 1)
|
||||||
{
|
{
|
||||||
Creature* pUnit=Unit::GetCreature((*m_creature),pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
Creature* pUnit=Unit::GetCreature((*m_creature),pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||||
@@ -751,7 +752,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
|||||||
switch(m_creature->GetEntry())
|
switch(m_creature->GetEntry())
|
||||||
{
|
{
|
||||||
case JAINA:
|
case JAINA:
|
||||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))
|
if (pInstance && pInstance->GetData(DATA_ALLIANCE_RETREAT))
|
||||||
{
|
{
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
HideNearPos(m_creature->GetPositionX(), m_creature->GetPositionY());
|
HideNearPos(m_creature->GetPositionX(), m_creature->GetPositionY());
|
||||||
@@ -763,7 +764,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
|||||||
else m_creature->SetVisibility(VISIBILITY_ON);
|
else m_creature->SetVisibility(VISIBILITY_ON);
|
||||||
break;
|
break;
|
||||||
case THRALL: //thrall
|
case THRALL: //thrall
|
||||||
if (pInstance->GetData(DATA_HORDE_RETREAT))
|
if (pInstance && pInstance->GetData(DATA_HORDE_RETREAT))
|
||||||
{
|
{
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
HideNearPos(m_creature->GetPositionX(), m_creature->GetPositionY());
|
HideNearPos(m_creature->GetPositionX(), m_creature->GetPositionY());
|
||||||
@@ -867,7 +868,8 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
|||||||
CheckTimer = 0;
|
CheckTimer = 0;
|
||||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
BossGUID[i] = 0;
|
BossGUID[i] = 0;
|
||||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
if(pInstance)
|
||||||
|
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1156,4 +1158,4 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,8 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
|
|||||||
|
|
||||||
void hyjal_trashAI::JustDied(Unit *victim)
|
void hyjal_trashAI::JustDied(Unit *victim)
|
||||||
{
|
{
|
||||||
if (!pInstance)return;
|
if (!pInstance)
|
||||||
|
return;
|
||||||
if (IsEvent && !m_creature->isWorldBoss())
|
if (IsEvent && !m_creature->isWorldBoss())
|
||||||
pInstance->SetData(DATA_TRASH, 0);//signal trash is dead
|
pInstance->SetData(DATA_TRASH, 0);//signal trash is dead
|
||||||
|
|
||||||
|
|||||||
+7
-8
@@ -46,7 +46,7 @@ bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature)
|
|||||||
if (pCreature->isQuestGiver())
|
if (pCreature->isQuestGiver())
|
||||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||||
|
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
if (pInstance && pInstance->GetData(TYPE_BARREL_DIVERSION) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_BOMBS,1))
|
if (pInstance && pInstance->GetData(TYPE_BARREL_DIVERSION) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_BOMBS,1))
|
||||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need a pack of Incendiary Bombs.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need a pack of Incendiary Bombs.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||||
|
|
||||||
@@ -491,7 +491,7 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature)
|
|||||||
pPlayer->SendPreparedQuest(pCreature->GetGUID());
|
pPlayer->SendPreparedQuest(pCreature->GetGUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT))
|
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT))
|
||||||
@@ -517,7 +517,7 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
switch(uiAction)
|
switch(uiAction)
|
||||||
{
|
{
|
||||||
case GOSSIP_ACTION_INFO_DEF+1:
|
case GOSSIP_ACTION_INFO_DEF+1:
|
||||||
@@ -609,7 +609,7 @@ CreatureAI* GetAI_npc_taretha(Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature)
|
bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
if (pInstance && pInstance->GetData(TYPE_THRALL_PART3) == DONE && pInstance->GetData(TYPE_THRALL_PART4) == NOT_STARTED)
|
if (pInstance && pInstance->GetData(TYPE_THRALL_PART3) == DONE && pInstance->GetData(TYPE_THRALL_PART4) == NOT_STARTED)
|
||||||
{
|
{
|
||||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||||
@@ -620,7 +620,7 @@ bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||||
{
|
{
|
||||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||||
@@ -630,10 +630,9 @@ bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSen
|
|||||||
{
|
{
|
||||||
pPlayer->CLOSE_GOSSIP_MENU();
|
pPlayer->CLOSE_GOSSIP_MENU();
|
||||||
|
|
||||||
if (pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
if (pInstance && pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if (pInstance)
|
pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS);
|
||||||
pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS);
|
|
||||||
if (pInstance->GetData64(DATA_EPOCH) == 0)
|
if (pInstance->GetData64(DATA_EPOCH) == 0)
|
||||||
pCreature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
pCreature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ struct TRINITY_DLL_DECL npc_deaths_head_ward_keeperAI : public ScriptedAI
|
|||||||
npc_deaths_head_ward_keeperAI(Creature *c) : ScriptedAI(c)
|
npc_deaths_head_ward_keeperAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -53,12 +53,9 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_skeramAI(Creature *c) : ScriptedAI(c)
|
boss_skeramAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
IsImage = false;
|
IsImage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
uint32 ArcaneExplosion_Timer;
|
uint32 ArcaneExplosion_Timer;
|
||||||
uint32 EarthShock_Timer;
|
uint32 EarthShock_Timer;
|
||||||
uint32 FullFillment_Timer;
|
uint32 FullFillment_Timer;
|
||||||
|
|||||||
@@ -59,7 +59,13 @@ EndScriptData */
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
|
boss_twinemperorsAI(Creature *c): ScriptedAI(c)
|
||||||
|
{
|
||||||
|
pInstance = c->GetInstanceData();
|
||||||
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|
||||||
uint32 Heal_Timer;
|
uint32 Heal_Timer;
|
||||||
uint32 Teleport_Timer;
|
uint32 Teleport_Timer;
|
||||||
bool AfterTeleport;
|
bool AfterTeleport;
|
||||||
@@ -73,11 +79,6 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
virtual void Reset() = 0;
|
virtual void Reset() = 0;
|
||||||
virtual void CastSpellOnBug(Creature *target) = 0;
|
virtual void CastSpellOnBug(Creature *target) = 0;
|
||||||
|
|
||||||
boss_twinemperorsAI(Creature *c): ScriptedAI(c)
|
|
||||||
{
|
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TwinReset()
|
void TwinReset()
|
||||||
{
|
{
|
||||||
Heal_Timer = 0; // first heal immediately when they get close together
|
Heal_Timer = 0; // first heal immediately when they get close together
|
||||||
@@ -95,13 +96,9 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
Creature *GetOtherBoss()
|
Creature *GetOtherBoss()
|
||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
|
||||||
return Unit::GetCreature(*m_creature, pInstance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
|
return Unit::GetCreature(*m_creature, pInstance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ CreatureAI* GetAI_npc_disciple_of_naralex(Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature)
|
bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance *pInstance = pCreature->GetInstanceData();
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
@@ -380,11 +380,12 @@ bool GossipHello_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature)
|
|||||||
|
|
||||||
bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
bool GossipSelect_npc_disciple_of_naralex(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance *pInstance = pCreature->GetInstanceData();
|
||||||
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
|
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
|
||||||
{
|
{
|
||||||
pPlayer->CLOSE_GOSSIP_MENU();
|
pPlayer->CLOSE_GOSSIP_MENU();
|
||||||
if (pInstance)pInstance->SetData(TYPE_NARALEX_EVENT, IN_PROGRESS);
|
if (pInstance)
|
||||||
|
pInstance->SetData(TYPE_NARALEX_EVENT, IN_PROGRESS);
|
||||||
|
|
||||||
DoScriptText(SAY_MAKE_PREPARATIONS, pCreature);
|
DoScriptText(SAY_MAKE_PREPARATIONS, pCreature);
|
||||||
|
|
||||||
@@ -408,4 +409,4 @@ void AddSC_wailing_caverns()
|
|||||||
newscript->pGossipSelect = &GossipSelect_npc_disciple_of_naralex;
|
newscript->pGossipSelect = &GossipSelect_npc_disciple_of_naralex;
|
||||||
newscript->GetAI = &GetAI_npc_disciple_of_naralex;
|
newscript->GetAI = &GetAI_npc_disciple_of_naralex;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ struct TRINITY_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI
|
|||||||
|
|
||||||
if (SPELL_CHAOTIC_ENERGY_BURST_Timer < diff)
|
if (SPELL_CHAOTIC_ENERGY_BURST_Timer < diff)
|
||||||
{
|
{
|
||||||
Unit* Anomalus = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ANOMALUS));
|
Unit* Anomalus = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
|
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
|
||||||
DoCast(target, SPELL_CHARGED_CHAOTIC_ENERGY_BURST);
|
DoCast(target, SPELL_CHARGED_CHAOTIC_ENERGY_BURST);
|
||||||
@@ -272,7 +272,7 @@ struct TRINITY_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI
|
|||||||
if (Wraith)
|
if (Wraith)
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
Wraith->AI()->AttackStart(target);
|
Wraith->AI()->AttackStart(target);
|
||||||
Unit* Anomalus = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ANOMALUS));
|
Unit* Anomalus = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
|
||||||
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
|
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
|
||||||
SUMMON_CRAZED_MANA_WRAITH_Timer = 5000;
|
SUMMON_CRAZED_MANA_WRAITH_Timer = 5000;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -127,6 +127,9 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
|
|||||||
|
|
||||||
bool CheckContainmentSpheres(bool remove_prison = false)
|
bool CheckContainmentSpheres(bool remove_prison = false)
|
||||||
{
|
{
|
||||||
|
if(!pInstance)
|
||||||
|
return false;
|
||||||
|
|
||||||
ContainmentSphereGUIDs[0] = pInstance->GetData64(ANOMALUS_CONTAINMET_SPHERE);
|
ContainmentSphereGUIDs[0] = pInstance->GetData64(ANOMALUS_CONTAINMET_SPHERE);
|
||||||
ContainmentSphereGUIDs[1] = pInstance->GetData64(ORMOROKS_CONTAINMET_SPHERE);
|
ContainmentSphereGUIDs[1] = pInstance->GetData64(ORMOROKS_CONTAINMET_SPHERE);
|
||||||
ContainmentSphereGUIDs[2] = pInstance->GetData64(TELESTRAS_CONTAINMET_SPHERE);
|
ContainmentSphereGUIDs[2] = pInstance->GetData64(TELESTRAS_CONTAINMET_SPHERE);
|
||||||
@@ -230,7 +233,7 @@ bool GOHello_containment_sphere(Player *pPlayer, GameObject *pGO)
|
|||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = pGO->GetInstanceData();
|
ScriptedInstance *pInstance = pGO->GetInstanceData();
|
||||||
|
|
||||||
Creature *Keristrasza = Unit::GetCreature(*pGO, pInstance->GetData64(DATA_KERISTRASZA));
|
Creature *Keristrasza = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_KERISTRASZA) : 0);
|
||||||
if (Keristrasza && Keristrasza->isAlive())
|
if (Keristrasza && Keristrasza->isAlive())
|
||||||
{
|
{
|
||||||
// maybe these are hacks :(
|
// maybe these are hacks :(
|
||||||
|
|||||||
@@ -355,9 +355,9 @@ struct TRINITY_DLL_DECL boss_sartharionAI : public ScriptedAI
|
|||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Unit* pTene = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TENEBRON));
|
Unit* pTene = Unit::GetUnit(*m_creature, m_pInstance ? m_pInstance->GetData64(DATA_TENEBRON) : 0);
|
||||||
Unit* pShad = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADRON));
|
Unit* pShad = Unit::GetUnit(*m_creature, m_pInstance ? m_pInstance->GetData64(DATA_SHADRON) : 0);
|
||||||
Unit* pVesp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VESPERON));
|
Unit* pVesp = Unit::GetUnit(*m_creature, m_pInstance ? m_pInstance->GetData64(DATA_VESPERON) : 0);
|
||||||
|
|
||||||
//spell will target dragons, if they are still alive at 35%
|
//spell will target dragons, if they are still alive at 35%
|
||||||
if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 35 && (pTene->isAlive() || pShad->isAlive() || pVesp->isAlive()))
|
if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 35 && (pTene->isAlive() || pShad->isAlive() || pVesp->isAlive()))
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ struct TRINITY_DLL_DECL boss_ionarAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
m_pInstance = pCreature->GetInstanceData();
|
m_pInstance = pCreature->GetInstanceData();
|
||||||
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* m_pInstance;
|
ScriptedInstance* m_pInstance;
|
||||||
@@ -346,7 +345,6 @@ struct TRINITY_DLL_DECL mob_spark_of_ionarAI : public ScriptedAI
|
|||||||
mob_spark_of_ionarAI(Creature *pCreature) : ScriptedAI(pCreature)
|
mob_spark_of_ionarAI(Creature *pCreature) : ScriptedAI(pCreature)
|
||||||
{
|
{
|
||||||
m_pInstance = pCreature->GetInstanceData();
|
m_pInstance = pCreature->GetInstanceData();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* m_pInstance;
|
ScriptedInstance* m_pInstance;
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
m_pInstance = pCreature->GetInstanceData();
|
m_pInstance = pCreature->GetInstanceData();
|
||||||
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* m_pInstance;
|
ScriptedInstance* m_pInstance;
|
||||||
@@ -366,13 +365,9 @@ struct TRINITY_DLL_DECL mob_molten_golemAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_molten_golemAI(Creature *pCreature) : ScriptedAI(pCreature)
|
mob_molten_golemAI(Creature *pCreature) : ScriptedAI(pCreature)
|
||||||
{
|
{
|
||||||
m_pInstance = pCreature->GetInstanceData();
|
|
||||||
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* m_pInstance;
|
|
||||||
|
|
||||||
bool m_bIsHeroic;
|
bool m_bIsHeroic;
|
||||||
bool m_bIsFrozen;
|
bool m_bIsFrozen;
|
||||||
|
|
||||||
|
|||||||
@@ -118,9 +118,6 @@ struct TRINITY_DLL_DECL boss_steelbreakerAI : public ScriptedAI
|
|||||||
boss_steelbreakerAI(Creature *c) : ScriptedAI(c)
|
boss_steelbreakerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
if(!pInstance)
|
|
||||||
return;
|
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
@@ -128,7 +125,8 @@ struct TRINITY_DLL_DECL boss_steelbreakerAI : public ScriptedAI
|
|||||||
events.Reset();
|
events.Reset();
|
||||||
phase = 0;
|
phase = 0;
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
pInstance->SetData(DATA_ASSEMBLY, NOT_STARTED);
|
if(pInstance)
|
||||||
|
pInstance->SetData(DATA_ASSEMBLY, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventMap events;
|
EventMap events;
|
||||||
@@ -158,13 +156,13 @@ struct TRINITY_DLL_DECL boss_steelbreakerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(damage >= m_creature->GetHealth())
|
if(damage >= m_creature->GetHealth())
|
||||||
{
|
{
|
||||||
if(Creature* Brundir = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_STORMCALLER_BRUNDIR)))
|
if(Creature* Brundir = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_STORMCALLER_BRUNDIR) : 0))
|
||||||
if(Brundir->isAlive())
|
if(Brundir->isAlive())
|
||||||
{
|
{
|
||||||
Brundir->SetHealth(Brundir->GetMaxHealth());
|
Brundir->SetHealth(Brundir->GetMaxHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Creature* Molgeim = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_RUNEMASTER_MOLGEIM)))
|
if(Creature* Molgeim = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_RUNEMASTER_MOLGEIM) : 0))
|
||||||
if(Molgeim->isAlive())
|
if(Molgeim->isAlive())
|
||||||
{
|
{
|
||||||
Molgeim->SetHealth(Molgeim->GetMaxHealth());
|
Molgeim->SetHealth(Molgeim->GetMaxHealth());
|
||||||
@@ -175,7 +173,7 @@ struct TRINITY_DLL_DECL boss_steelbreakerAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
if(IsEncounterComplete(pInstance, m_creature))
|
if(IsEncounterComplete(pInstance, m_creature) && pInstance)
|
||||||
pInstance->SetData(DATA_ASSEMBLY, DONE);
|
pInstance->SetData(DATA_ASSEMBLY, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,16 +230,12 @@ struct TRINITY_DLL_DECL boss_runemaster_molgeimAI : public ScriptedAI
|
|||||||
boss_runemaster_molgeimAI(Creature *c) : ScriptedAI(c)
|
boss_runemaster_molgeimAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
if(!pInstance)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Reset();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_ASSEMBLY, NOT_STARTED);
|
if(pInstance)
|
||||||
|
pInstance->SetData(DATA_ASSEMBLY, NOT_STARTED);
|
||||||
events.Reset();
|
events.Reset();
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
phase = 0;
|
phase = 0;
|
||||||
@@ -274,13 +268,13 @@ struct TRINITY_DLL_DECL boss_runemaster_molgeimAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(damage >= m_creature->GetHealth())
|
if(damage >= m_creature->GetHealth())
|
||||||
{
|
{
|
||||||
if(Creature* Steelbreaker = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_STEELBREAKER)))
|
if(Creature* Steelbreaker = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_STEELBREAKER) : 0))
|
||||||
if(Steelbreaker->isAlive())
|
if(Steelbreaker->isAlive())
|
||||||
{
|
{
|
||||||
Steelbreaker->SetHealth(Steelbreaker->GetMaxHealth());
|
Steelbreaker->SetHealth(Steelbreaker->GetMaxHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Creature* Brundir = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_STORMCALLER_BRUNDIR)))
|
if(Creature* Brundir = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_STORMCALLER_BRUNDIR) : 0))
|
||||||
if(Brundir->isAlive())
|
if(Brundir->isAlive())
|
||||||
{
|
{
|
||||||
Brundir->SetHealth(Brundir->GetMaxHealth());
|
Brundir->SetHealth(Brundir->GetMaxHealth());
|
||||||
@@ -291,7 +285,7 @@ struct TRINITY_DLL_DECL boss_runemaster_molgeimAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
if(IsEncounterComplete(pInstance, m_creature))
|
if(IsEncounterComplete(pInstance, m_creature) && pInstance)
|
||||||
pInstance->SetData(DATA_ASSEMBLY, DONE);
|
pInstance->SetData(DATA_ASSEMBLY, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,15 +394,12 @@ struct TRINITY_DLL_DECL boss_stormcaller_brundirAI : public ScriptedAI
|
|||||||
boss_stormcaller_brundirAI(Creature *c) : ScriptedAI(c)
|
boss_stormcaller_brundirAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
if(!pInstance)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_ASSEMBLY, NOT_STARTED);
|
if(pInstance)
|
||||||
|
pInstance->SetData(DATA_ASSEMBLY, NOT_STARTED);
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
events.Reset();
|
events.Reset();
|
||||||
phase = 0;
|
phase = 0;
|
||||||
@@ -445,13 +436,13 @@ struct TRINITY_DLL_DECL boss_stormcaller_brundirAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(damage >= m_creature->GetHealth())
|
if(damage >= m_creature->GetHealth())
|
||||||
{
|
{
|
||||||
if(Creature* Steelbreaker = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_STEELBREAKER)))
|
if(Creature* Steelbreaker = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_STEELBREAKER) : 0))
|
||||||
if(Steelbreaker->isAlive())
|
if(Steelbreaker->isAlive())
|
||||||
{
|
{
|
||||||
Steelbreaker->SetHealth(Steelbreaker->GetMaxHealth());
|
Steelbreaker->SetHealth(Steelbreaker->GetMaxHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Creature* Molgeim = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_RUNEMASTER_MOLGEIM)))
|
if(Creature* Molgeim = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_RUNEMASTER_MOLGEIM) : 0))
|
||||||
if(Molgeim->isAlive())
|
if(Molgeim->isAlive())
|
||||||
{
|
{
|
||||||
Molgeim->SetHealth(Molgeim->GetMaxHealth());
|
Molgeim->SetHealth(Molgeim->GetMaxHealth());
|
||||||
@@ -463,7 +454,7 @@ struct TRINITY_DLL_DECL boss_stormcaller_brundirAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
if(IsEncounterComplete(pInstance, m_creature))
|
if(IsEncounterComplete(pInstance, m_creature) && pInstance)
|
||||||
pInstance->SetData(DATA_ASSEMBLY, DONE);
|
pInstance->SetData(DATA_ASSEMBLY, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-7
@@ -311,7 +311,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
|
|||||||
m_creature->GetPosition(x,y,z);
|
m_creature->GetPosition(x,y,z);
|
||||||
DoTeleportTo(x+1,y,z+30);
|
DoTeleportTo(x+1,y,z+30);
|
||||||
|
|
||||||
Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR));
|
Unit* ingvar = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_INGVAR) : 0);
|
||||||
if (ingvar)
|
if (ingvar)
|
||||||
{
|
{
|
||||||
m_creature->GetMotionMaster()->MovePoint(1,x,y,z+15);
|
m_creature->GetMotionMaster()->MovePoint(1,x,y,z+15);
|
||||||
@@ -324,7 +324,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (type != POINT_MOTION_TYPE)
|
if (type != POINT_MOTION_TYPE)
|
||||||
return;
|
return;
|
||||||
Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR));
|
Unit* ingvar = Unit::GetUnit((*m_creature), pInstance ? pInstance->GetData64(DATA_INGVAR) : 0);
|
||||||
if (ingvar)
|
if (ingvar)
|
||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
@@ -354,7 +354,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (Resurect_Phase == 1)
|
if (Resurect_Phase == 1)
|
||||||
{
|
{
|
||||||
Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR));
|
Unit* ingvar = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_INGVAR) : 0);
|
||||||
if (ingvar)
|
if (ingvar)
|
||||||
{
|
{
|
||||||
ingvar->SetStandState(UNIT_STAND_STATE_STAND);
|
ingvar->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
@@ -364,7 +364,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
|
|||||||
Resurect_Phase = 2;
|
Resurect_Phase = 2;
|
||||||
}else if (Resurect_Phase == 2)
|
}else if (Resurect_Phase == 2)
|
||||||
{
|
{
|
||||||
Creature* ingvar = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_INGVAR));
|
Creature* ingvar = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_INGVAR) : 0);
|
||||||
if (ingvar)
|
if (ingvar)
|
||||||
{
|
{
|
||||||
ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY);
|
ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY);
|
||||||
@@ -398,15 +398,12 @@ struct TRINITY_DLL_DECL mob_ingvar_throw_dummyAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_ingvar_throw_dummyAI(Creature *c) : ScriptedAI(c)
|
mob_ingvar_throw_dummyAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
uint32 Despawn_Timer;
|
uint32 Despawn_Timer;
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
Unit* target = m_creature->FindNearestCreature(ENTRY_THROW_TARGET,50);
|
Unit* target = m_creature->FindNearestCreature(ENTRY_THROW_TARGET,50);
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ struct TRINITY_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(DATA_PRINCEKELESETH_EVENT) == IN_PROGRESS)
|
if (pInstance && pInstance->GetData(DATA_PRINCEKELESETH_EVENT) == IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if (isDead)
|
if (isDead)
|
||||||
{
|
{
|
||||||
|
|||||||
+15
-23
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI
|
|||||||
boss_skarvald_the_constructorAI(Creature *c) : ScriptedAI(c)
|
boss_skarvald_the_constructorAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -82,20 +82,19 @@ struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI
|
|||||||
Check_Timer = 5000;
|
Check_Timer = 5000;
|
||||||
|
|
||||||
ghost = (m_creature->GetEntry() == MOB_SKARVALD_GHOST);
|
ghost = (m_creature->GetEntry() == MOB_SKARVALD_GHOST);
|
||||||
if (!ghost)
|
if (!ghost && pInstance)
|
||||||
{
|
{
|
||||||
Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN));
|
Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN));
|
||||||
if (dalronn && dalronn->isDead())
|
if (dalronn && dalronn->isDead())
|
||||||
CAST_CRE(dalronn)->Respawn();
|
CAST_CRE(dalronn)->Respawn();
|
||||||
|
|
||||||
if (pInstance)
|
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, NOT_STARTED);
|
||||||
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, NOT_STARTED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
{
|
{
|
||||||
if (!ghost)
|
if (!ghost && pInstance)
|
||||||
{
|
{
|
||||||
DoScriptText(YELL_SKARVALD_AGGRO,m_creature);
|
DoScriptText(YELL_SKARVALD_AGGRO,m_creature);
|
||||||
|
|
||||||
@@ -103,14 +102,13 @@ struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI
|
|||||||
if (dalronn && dalronn->isAlive() && !dalronn->getVictim())
|
if (dalronn && dalronn->isAlive() && !dalronn->getVictim())
|
||||||
dalronn->getThreatManager().addThreat(who,0.0f);
|
dalronn->getThreatManager().addThreat(who,0.0f);
|
||||||
|
|
||||||
if (pInstance)
|
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, IN_PROGRESS);
|
||||||
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, IN_PROGRESS);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
if (!ghost)
|
if (!ghost && pInstance)
|
||||||
{
|
{
|
||||||
Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN));
|
Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN));
|
||||||
if (dalronn)
|
if (dalronn)
|
||||||
@@ -119,8 +117,7 @@ struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(YELL_SKARVALD_DAL_DIED,m_creature);
|
DoScriptText(YELL_SKARVALD_DAL_DIED,m_creature);
|
||||||
|
|
||||||
if (pInstance)
|
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE);
|
||||||
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -151,10 +148,8 @@ struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (ghost)
|
if (ghost)
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(DATA_SKARVALD_DALRONN_EVENT) != IN_PROGRESS)
|
if (pInstance && pInstance->GetData(DATA_SKARVALD_DALRONN_EVENT) != IN_PROGRESS)
|
||||||
{
|
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -166,7 +161,7 @@ struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI
|
|||||||
if (Check_Timer < diff)
|
if (Check_Timer < diff)
|
||||||
{
|
{
|
||||||
Check_Timer = 5000;
|
Check_Timer = 5000;
|
||||||
Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN));
|
Unit* dalronn = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_DALRONN) : 0);
|
||||||
if (dalronn && dalronn->isDead())
|
if (dalronn && dalronn->isDead())
|
||||||
{
|
{
|
||||||
Dalronn_isDead = true;
|
Dalronn_isDead = true;
|
||||||
@@ -211,7 +206,7 @@ struct TRINITY_DLL_DECL boss_dalronn_the_controllerAI : public ScriptedAI
|
|||||||
boss_dalronn_the_controllerAI(Creature *c) : ScriptedAI(c)
|
boss_dalronn_the_controllerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -238,14 +233,13 @@ struct TRINITY_DLL_DECL boss_dalronn_the_controllerAI : public ScriptedAI
|
|||||||
AggroYell_Timer = 0;
|
AggroYell_Timer = 0;
|
||||||
|
|
||||||
ghost = m_creature->GetEntry() == MOB_DALRONN_GHOST;
|
ghost = m_creature->GetEntry() == MOB_DALRONN_GHOST;
|
||||||
if (!ghost)
|
if (!ghost && pInstance)
|
||||||
{
|
{
|
||||||
Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD));
|
Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD));
|
||||||
if (skarvald && skarvald->isDead())
|
if (skarvald && skarvald->isDead())
|
||||||
CAST_CRE(skarvald)->Respawn();
|
CAST_CRE(skarvald)->Respawn();
|
||||||
|
|
||||||
if (pInstance)
|
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, NOT_STARTED);
|
||||||
pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, NOT_STARTED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,10 +299,8 @@ struct TRINITY_DLL_DECL boss_dalronn_the_controllerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (ghost)
|
if (ghost)
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(DATA_SKARVALD_DALRONN_EVENT) != IN_PROGRESS)
|
if (pInstance && pInstance->GetData(DATA_SKARVALD_DALRONN_EVENT) != IN_PROGRESS)
|
||||||
{
|
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -328,7 +320,7 @@ struct TRINITY_DLL_DECL boss_dalronn_the_controllerAI : public ScriptedAI
|
|||||||
if (Check_Timer < diff)
|
if (Check_Timer < diff)
|
||||||
{
|
{
|
||||||
Check_Timer = 5000;
|
Check_Timer = 5000;
|
||||||
Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD));
|
Unit* skarvald = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_SKARVALD) : 0);
|
||||||
if (skarvald && skarvald->isDead())
|
if (skarvald && skarvald->isDead())
|
||||||
{
|
{
|
||||||
Skarvald_isDead = true;
|
Skarvald_isDead = true;
|
||||||
@@ -394,4 +386,4 @@ void AddSC_boss_skarvald_dalronn()
|
|||||||
newscript->Name="boss_dalronn_the_controller";
|
newscript->Name="boss_dalronn_the_controller";
|
||||||
newscript->GetAI = &GetAI_boss_dalronn_the_controller;
|
newscript->GetAI = &GetAI_boss_dalronn_the_controller;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -127,7 +127,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
boss_grandmaster_vorpilAI(Creature *c) : ScriptedAI(c)
|
boss_grandmaster_vorpilAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
Intro = false;
|
Intro = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ EndContentData */
|
|||||||
|
|
||||||
bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature)
|
bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
|
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||||
|
|
||||||
if (pInstance && (pInstance->GetData(DATA_SUPREMUSEVENT) >= DONE) && (pInstance->GetData(DATA_HIGHWARLORDNAJENTUSEVENT) >= DONE))
|
if (pInstance && (pInstance->GetData(DATA_SUPREMUSEVENT) >= DONE) && (pInstance->GetData(DATA_HIGHWARLORDNAJENTUSEVENT) >= DONE))
|
||||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||||
|
|||||||
@@ -1123,7 +1123,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
|
|
||||||
void EnterPhase(PhaseAkama NextPhase)
|
void EnterPhase(PhaseAkama NextPhase)
|
||||||
{
|
{
|
||||||
if (!pInstance) return;
|
if (!pInstance)
|
||||||
|
return;
|
||||||
switch(NextPhase)
|
switch(NextPhase)
|
||||||
{
|
{
|
||||||
case PHASE_CHANNEL:
|
case PHASE_CHANNEL:
|
||||||
@@ -1241,7 +1242,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
m_creature->InterruptNonMeleeSpells(true);
|
m_creature->InterruptNonMeleeSpells(true);
|
||||||
Spirit[0]->InterruptNonMeleeSpells(true);
|
Spirit[0]->InterruptNonMeleeSpells(true);
|
||||||
Spirit[1]->InterruptNonMeleeSpells(true);
|
Spirit[1]->InterruptNonMeleeSpells(true);
|
||||||
pInstance->HandleGameObject(GateGUID, true);
|
if(pInstance)
|
||||||
|
pInstance->HandleGameObject(GateGUID, true);
|
||||||
Timer = 2000;
|
Timer = 2000;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@@ -1271,7 +1273,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
case 6:
|
case 6:
|
||||||
for(uint8 i = 0; i < 2; ++i)
|
for(uint8 i = 0; i < 2; ++i)
|
||||||
pInstance->HandleGameObject(DoorGUID[i], true);
|
if(pInstance)
|
||||||
|
pInstance->HandleGameObject(DoorGUID[i], true);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (Phase == PHASE_WALK)
|
if (Phase == PHASE_WALK)
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
//m_creature->GetMotionMaster()->MoveIdle();
|
//m_creature->GetMotionMaster()->MoveIdle();
|
||||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
|
||||||
|
|
||||||
if (pInstance && m_creature->isAlive())
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, NOT_STARTED);
|
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, NOT_STARTED);
|
||||||
|
|
||||||
reseting = false;
|
reseting = false;
|
||||||
@@ -667,7 +667,8 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
|
|
||||||
if (ShadeHasDied && (WayPointId == 1))
|
if (ShadeHasDied && (WayPointId == 1))
|
||||||
{
|
{
|
||||||
if (pInstance) pInstance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
|
if (pInstance)
|
||||||
|
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
|
||||||
m_creature->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[1].x, AkamaWP[1].y, AkamaWP[1].z);
|
m_creature->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[1].x, AkamaWP[1].y, AkamaWP[1].z);
|
||||||
++WayPointId;
|
++WayPointId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedA
|
|||||||
// finds and stores the GUIDs for each Council member using instance data system.
|
// finds and stores the GUIDs for each Council member using instance data system.
|
||||||
void LoadCouncilGUIDs()
|
void LoadCouncilGUIDs()
|
||||||
{
|
{
|
||||||
if (ScriptedInstance* pInstance = (m_creature->GetInstanceData()))
|
if (ScriptedInstance* pInstance = m_creature->GetInstanceData())
|
||||||
{
|
{
|
||||||
Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER);
|
Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER);
|
||||||
Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW);
|
Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW);
|
||||||
@@ -251,7 +251,8 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
|||||||
|
|
||||||
void StartEvent(Unit *target)
|
void StartEvent(Unit *target)
|
||||||
{
|
{
|
||||||
if (!pInstance) return;
|
if (!pInstance)
|
||||||
|
return;
|
||||||
|
|
||||||
if (target && target->isAlive())
|
if (target && target->isAlive())
|
||||||
{
|
{
|
||||||
|
|||||||
+1
@@ -82,6 +82,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
uint64 beams[2];
|
uint64 beams[2];
|
||||||
uint32 PosCheck_Timer;
|
uint32 PosCheck_Timer;
|
||||||
uint32 MarkOfHydross_Timer;
|
uint32 MarkOfHydross_Timer;
|
||||||
|
|||||||
+2
-2
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Intro = false;
|
Intro = false;
|
||||||
JustCreated = true;
|
JustCreated = true;
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on Creature create (no need do intro if wiped)
|
c->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on Creature create (no need do intro if wiped)
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -924,7 +924,7 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
|
|||||||
|
|
||||||
bool ItemUse_item_tainted_core(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
bool ItemUse_item_tainted_core(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||||
{
|
{
|
||||||
ScriptedInstance *pInstance = (pPlayer->GetInstanceData()) ? (pPlayer->GetInstanceData()) : NULL;
|
ScriptedInstance *pInstance = pPlayer->GetInstanceData();
|
||||||
|
|
||||||
if (!pInstance)
|
if (!pInstance)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_leotheras_the_blindAI(Creature *c) : ScriptedAI(c)
|
boss_leotheras_the_blindAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
m_creature->GetPosition(x,y,z);
|
c->GetPosition(x,y,z);
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Demon = 0;
|
Demon = 0;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -222,7 +222,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
|||||||
}else SpoutAnimTimer-=diff;
|
}else SpoutAnimTimer-=diff;
|
||||||
|
|
||||||
Map* pMap = m_creature->GetMap();
|
Map* pMap = m_creature->GetMap();
|
||||||
if (pMap->IsDungeon() && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS)
|
if (pMap->IsDungeon() && pInstance && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS)
|
||||||
{
|
{
|
||||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||||
@@ -258,7 +258,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
|||||||
|
|
||||||
//Check if players in water and if in water cast spell
|
//Check if players in water and if in water cast spell
|
||||||
Map* pMap = m_creature->GetMap();
|
Map* pMap = m_creature->GetMap();
|
||||||
if (pMap->IsDungeon() && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS)
|
if (pMap->IsDungeon() && pInstance && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS)
|
||||||
{
|
{
|
||||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||||
|
|
||||||
|
|||||||
+1
@@ -104,6 +104,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
Map::PlayerList const *PlayerList;
|
Map::PlayerList const *PlayerList;
|
||||||
|
|
||||||
uint32 TidalWave_Timer;
|
uint32 TidalWave_Timer;
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI
|
|||||||
LungBurst_Timer = 7000;
|
LungBurst_Timer = 7000;
|
||||||
EnvelopingWinds_Timer = 9000;
|
EnvelopingWinds_Timer = 9000;
|
||||||
|
|
||||||
if (pInstance && m_creature->isAlive())
|
if (pInstance)
|
||||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED);
|
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI
|
|||||||
boss_mekgineer_steamriggerAI(Creature *c) : ScriptedAI(c)
|
boss_mekgineer_steamriggerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI
|
|||||||
Summon50 = false;
|
Summon50 = false;
|
||||||
Summon25 = false;
|
Summon25 = false;
|
||||||
|
|
||||||
if (pInstance && m_creature->isAlive())
|
if (pInstance)
|
||||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED);
|
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ struct TRINITY_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI
|
|||||||
mob_steamrigger_mechanicAI(Creature *c) : ScriptedAI(c)
|
mob_steamrigger_mechanicAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -193,11 +193,14 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
|||||||
|
|
||||||
void GetCouncil()
|
void GetCouncil()
|
||||||
{
|
{
|
||||||
//get council member's guid to respawn them if needed
|
if(pInstance)
|
||||||
Council[0] = pInstance->GetData64(DATA_KIGGLERTHECRAZED);
|
{
|
||||||
Council[1] = pInstance->GetData64(DATA_BLINDEYETHESEER);
|
//get council member's guid to respawn them if needed
|
||||||
Council[2] = pInstance->GetData64(DATA_OLMTHESUMMONER);
|
Council[0] = pInstance->GetData64(DATA_KIGGLERTHECRAZED);
|
||||||
Council[3] = pInstance->GetData64(DATA_KROSHFIREHAND);
|
Council[1] = pInstance->GetData64(DATA_BLINDEYETHESEER);
|
||||||
|
Council[2] = pInstance->GetData64(DATA_OLMTHESUMMONER);
|
||||||
|
Council[3] = pInstance->GetData64(DATA_KROSHFIREHAND);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartEvent(Unit *who)
|
void StartEvent(Unit *who)
|
||||||
|
|||||||
-2
@@ -286,11 +286,9 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_shadowmoon_channelerAI(Creature *c) : ScriptedAI(c)
|
mob_shadowmoon_channelerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
uint32 ShadowBolt_Timer;
|
uint32 ShadowBolt_Timer;
|
||||||
|
|||||||
+3
-2
@@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_magtheridonAI(Creature *c) : ScriptedAI(c)
|
boss_magtheridonAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance =m_creature->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
|
m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
|
||||||
m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
|
m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
|
||||||
|
|
||||||
@@ -511,7 +511,8 @@ struct TRINITY_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI
|
|||||||
bool GOHello_go_Manticron_Cube(Player* pPlayer, GameObject* pGo)
|
bool GOHello_go_Manticron_Cube(Player* pPlayer, GameObject* pGo)
|
||||||
{
|
{
|
||||||
ScriptedInstance* pInstance = pGo->GetInstanceData();
|
ScriptedInstance* pInstance = pGo->GetInstanceData();
|
||||||
if (!pInstance) return true;
|
if (!pInstance)
|
||||||
|
return true;
|
||||||
if (pInstance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS) return true;
|
if (pInstance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS) return true;
|
||||||
Creature *Magtheridon =Unit::GetCreature(*pGo, pInstance->GetData64(DATA_MAGTHERIDON));
|
Creature *Magtheridon =Unit::GetCreature(*pGo, pInstance->GetData64(DATA_MAGTHERIDON));
|
||||||
if (!Magtheridon || !Magtheridon->isAlive()) return true;
|
if (!Magtheridon || !Magtheridon->isAlive()) return true;
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
|
|||||||
boss_grand_warlock_nethekurseAI(Creature *c) : ScriptedAI(c)
|
boss_grand_warlock_nethekurseAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI
|
|||||||
LeftHeadGUID = 0;
|
LeftHeadGUID = 0;
|
||||||
RightHeadGUID = 0;
|
RightHeadGUID = 0;
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
+1
-3
@@ -52,11 +52,9 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_warchief_kargath_bladefistAI(Creature *c) : ScriptedAI(c)
|
boss_warchief_kargath_bladefistAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
std::vector<uint64> adds;
|
std::vector<uint64> adds;
|
||||||
|
|||||||
@@ -380,7 +380,10 @@ struct TRINITY_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
|
|||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == FAIL)
|
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == FAIL)
|
||||||
|
{
|
||||||
Reset();
|
Reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CanSpawn)
|
if (CanSpawn)
|
||||||
|
|||||||
+2
-4
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
|
|||||||
boss_harbinger_skyrissAI(Creature *c) : ScriptedAI(c)
|
boss_harbinger_skyrissAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
Intro = false;
|
Intro = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,11 +278,9 @@ struct TRINITY_DLL_DECL boss_harbinger_skyriss_illusionAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_harbinger_skyriss_illusionAI(Creature *c) : ScriptedAI(c)
|
boss_harbinger_skyriss_illusionAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
void Reset() { }
|
void Reset() { }
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
|
|||||||
boss_alarAI(Creature *c) : ScriptedAI(c)
|
boss_alarAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance =c->GetInstanceData();
|
pInstance =c->GetInstanceData();
|
||||||
DefaultMoveSpeedRate = m_creature->GetSpeedRate(MOVE_RUN);
|
DefaultMoveSpeedRate = c->GetSpeedRate(MOVE_RUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -431,8 +431,8 @@ struct TRINITY_DLL_DECL mob_ember_of_alarAI : public ScriptedAI
|
|||||||
mob_ember_of_alarAI(Creature *c) : ScriptedAI(c)
|
mob_ember_of_alarAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
c->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
c->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
|
|
||||||
defaultarmor = m_creature->GetArmor();
|
defaultarmor = c->GetArmor();
|
||||||
defaultsize = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X);
|
defaultsize = c->GetFloatValue(OBJECT_FIELD_SCALE_X);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -620,7 +620,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
|
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
|
||||||
{
|
{
|
||||||
Phase = 2;
|
Phase = 2;
|
||||||
m_pInstance->SetData(DATA_KAELTHASEVENT, 2);
|
if(m_pInstance)
|
||||||
|
m_pInstance->SetData(DATA_KAELTHASEVENT, 2);
|
||||||
|
|
||||||
DoScriptText(SAY_PHASE2_WEAPON, m_creature);
|
DoScriptText(SAY_PHASE2_WEAPON, m_creature);
|
||||||
|
|
||||||
@@ -661,7 +662,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
if (Phase_Timer < diff)
|
if (Phase_Timer < diff)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_PHASE3_ADVANCE, m_creature);
|
DoScriptText(SAY_PHASE3_ADVANCE, m_creature);
|
||||||
m_pInstance->SetData(DATA_KAELTHASEVENT, 3);
|
if(m_pInstance)
|
||||||
|
m_pInstance->SetData(DATA_KAELTHASEVENT, 3);
|
||||||
Phase = 3;
|
Phase = 3;
|
||||||
PhaseSubphase = 0;
|
PhaseSubphase = 0;
|
||||||
}else Phase_Timer -= diff;
|
}else Phase_Timer -= diff;
|
||||||
@@ -695,7 +697,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_PHASE4_INTRO2, m_creature);
|
DoScriptText(SAY_PHASE4_INTRO2, m_creature);
|
||||||
Phase = 4;
|
Phase = 4;
|
||||||
|
|
||||||
m_pInstance->SetData(DATA_KAELTHASEVENT, 4);
|
if(m_pInstance)
|
||||||
|
m_pInstance->SetData(DATA_KAELTHASEVENT, 4);
|
||||||
|
|
||||||
// Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael.
|
// Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael.
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
@@ -800,7 +803,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
|
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
|
||||||
{
|
{
|
||||||
m_pInstance->SetData(DATA_KAELTHASEVENT, 4);
|
if(m_pInstance)
|
||||||
|
m_pInstance->SetData(DATA_KAELTHASEVENT, 4);
|
||||||
Phase = 5;
|
Phase = 5;
|
||||||
Phase_Timer = 10000;
|
Phase_Timer = 10000;
|
||||||
|
|
||||||
|
|||||||
+1
-8
@@ -44,12 +44,9 @@ struct TRINITY_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_gatewatcher_iron_handAI(Creature *c) : ScriptedAI(c)
|
boss_gatewatcher_iron_handAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
uint32 Shadow_Power_Timer;
|
uint32 Shadow_Power_Timer;
|
||||||
@@ -83,10 +80,6 @@ struct TRINITY_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI
|
|||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH_1, m_creature);
|
DoScriptText(SAY_DEATH_1, m_creature);
|
||||||
|
|
||||||
if (!pInstance)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//TODO: Add door check/open code
|
//TODO: Add door check/open code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI
|
|||||||
boss_nethermancer_sepethreaAI(Creature *c) : ScriptedAI(c)
|
boss_nethermancer_sepethreaAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
+1
-3
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_pathaleon_the_calculatorAI(Creature *c) : ScriptedAI(c), summons(m_creature)
|
boss_pathaleon_the_calculatorAI(Creature *c) : ScriptedAI(c), summons(m_creature)
|
||||||
{
|
{
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Summon_Timer;
|
uint32 Summon_Timer;
|
||||||
@@ -179,8 +179,6 @@ struct TRINITY_DLL_DECL mob_nether_wraithAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_nether_wraithAI(Creature *c) : ScriptedAI(c) {}
|
mob_nether_wraithAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
|
||||||
|
|
||||||
uint32 ArcaneMissiles_Timer;
|
uint32 ArcaneMissiles_Timer;
|
||||||
uint32 Detonation_Timer;
|
uint32 Detonation_Timer;
|
||||||
uint32 Die_Timer;
|
uint32 Die_Timer;
|
||||||
|
|||||||
Reference in New Issue
Block a user