* Tabs to spaces in the entire TrinityScript project. Please set your text editing settings to insert 4 spaces upon tabbing.
--HG-- branch : trunk
This commit is contained in:
@@ -45,8 +45,8 @@ void guardAI::EnterCombat(Unit *who)
|
|||||||
switch(rand()%3)
|
switch(rand()%3)
|
||||||
{
|
{
|
||||||
case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
|
case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
|
||||||
case 1: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
|
case 1: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
|
||||||
case 2: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
|
case 2: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
|
|||||||
Creature* Patient = NULL;
|
Creature* Patient = NULL;
|
||||||
Location* Point = NULL;
|
Location* Point = NULL;
|
||||||
|
|
||||||
if (Coordinates.empty())
|
if (Coordinates.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector<Location*>::iterator itr = Coordinates.begin()+rand()%Coordinates.size();
|
std::vector<Location*>::iterator itr = Coordinates.begin()+rand()%Coordinates.size();
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI
|
|||||||
if(SonicBoom)
|
if(SonicBoom)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_SONIC_BOOM_EFFECT, true);
|
DoCast(m_creature, SPELL_SONIC_BOOM_EFFECT, true);
|
||||||
SonicBoomEffect();
|
SonicBoomEffect();
|
||||||
|
|
||||||
SonicBoom = false;
|
SonicBoom = false;
|
||||||
Resonance_Timer = 1500;
|
Resonance_Timer = 1500;
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
|||||||
cell.SetNoCreate();
|
cell.SetNoCreate();
|
||||||
|
|
||||||
Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG);
|
Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG);
|
||||||
Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(m_creature, FlagList, go_check);
|
Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(m_creature, FlagList, go_check);
|
||||||
TypeContainerVisitor
|
TypeContainerVisitor
|
||||||
<Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
|
<Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
|
||||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ EndContentData */
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
//Support for quest: You're Fired! (10821)
|
//Support for quest: You're Fired! (10821)
|
||||||
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
|
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
|
||||||
|
|
||||||
#define LEGION_OBELISK_ONE 185193
|
#define LEGION_OBELISK_ONE 185193
|
||||||
#define LEGION_OBELISK_TWO 185195
|
#define LEGION_OBELISK_TWO 185195
|
||||||
@@ -335,40 +335,40 @@ bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uin
|
|||||||
|
|
||||||
bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
|
bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
|
||||||
{
|
{
|
||||||
if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE )
|
if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE )
|
||||||
{
|
{
|
||||||
switch( _GO->GetEntry() )
|
switch( _GO->GetEntry() )
|
||||||
{
|
{
|
||||||
case LEGION_OBELISK_ONE:
|
case LEGION_OBELISK_ONE:
|
||||||
obelisk_one = true;
|
obelisk_one = true;
|
||||||
break;
|
break;
|
||||||
case LEGION_OBELISK_TWO:
|
case LEGION_OBELISK_TWO:
|
||||||
obelisk_two = true;
|
obelisk_two = true;
|
||||||
break;
|
break;
|
||||||
case LEGION_OBELISK_THREE:
|
case LEGION_OBELISK_THREE:
|
||||||
obelisk_three = true;
|
obelisk_three = true;
|
||||||
break;
|
break;
|
||||||
case LEGION_OBELISK_FOUR:
|
case LEGION_OBELISK_FOUR:
|
||||||
obelisk_four = true;
|
obelisk_four = true;
|
||||||
break;
|
break;
|
||||||
case LEGION_OBELISK_FIVE:
|
case LEGION_OBELISK_FIVE:
|
||||||
obelisk_five = true;
|
obelisk_five = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true )
|
if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true )
|
||||||
{
|
{
|
||||||
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
||||||
//reset global var
|
//reset global var
|
||||||
obelisk_one = false;
|
obelisk_one = false;
|
||||||
obelisk_two = false;
|
obelisk_two = false;
|
||||||
obelisk_three = false;
|
obelisk_three = false;
|
||||||
obelisk_four = false;
|
obelisk_four = false;
|
||||||
obelisk_five = false;
|
obelisk_five = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*######
|
/*######
|
||||||
|
|||||||
+3
-3
@@ -188,7 +188,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
InnderDemon_Count = 0;
|
InnderDemon_Count = 0;
|
||||||
m_creature->SetSpeed( MOVE_RUN, 2.0f, true);
|
m_creature->SetSpeed( MOVE_RUN, 2.0f, true);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
|
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
||||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
||||||
m_creature->SetCorpseDelay(1000*60*60);
|
m_creature->SetCorpseDelay(1000*60*60);
|
||||||
@@ -459,8 +459,8 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
|
m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
|
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
|
||||||
DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
|
DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
||||||
DemonForm = true;
|
DemonForm = true;
|
||||||
NeedThreatReset = true;
|
NeedThreatReset = true;
|
||||||
SwitchToDemon_Timer = 45000;
|
SwitchToDemon_Timer = 45000;
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
|||||||
|
|
||||||
uint32 GreaterPowerWordShield_Timer;
|
uint32 GreaterPowerWordShield_Timer;
|
||||||
uint32 Heal_Timer;
|
uint32 Heal_Timer;
|
||||||
uint32 PrayerofHealing_Timer;
|
uint32 PrayerofHealing_Timer;
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
@@ -529,7 +529,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
GreaterPowerWordShield_Timer = 5000;
|
GreaterPowerWordShield_Timer = 5000;
|
||||||
Heal_Timer = 25000 + rand()%15000;
|
Heal_Timer = 25000 + rand()%15000;
|
||||||
PrayerofHealing_Timer = 45000 + rand()%10000;
|
PrayerofHealing_Timer = 45000 + rand()%10000;
|
||||||
|
|
||||||
//reset encounter
|
//reset encounter
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
|
|||||||
@@ -111,14 +111,14 @@ struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
||||||
{
|
{
|
||||||
if (close == 1)
|
if (close == 1)
|
||||||
Doors->SetGoState(GO_STATE_READY); // Closed
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
else
|
else
|
||||||
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -261,14 +261,14 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
||||||
{
|
{
|
||||||
if (close == 1)
|
if (close == 1)
|
||||||
Doors->SetGoState(GO_STATE_READY); // Closed
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
else
|
else
|
||||||
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -139,14 +139,14 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
||||||
{
|
{
|
||||||
if (close == 1)
|
if (close == 1)
|
||||||
Doors->SetGoState(GO_STATE_READY); // Closed
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
else
|
else
|
||||||
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -337,7 +337,7 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI
|
|||||||
else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS);
|
else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
|
|||||||
@@ -139,9 +139,9 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
void HandleTerraceDoors(bool open)
|
void HandleTerraceDoors(bool open)
|
||||||
{
|
{
|
||||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
||||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
||||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
|
|||||||
@@ -905,7 +905,7 @@ void Resurrect(Creature* target)
|
|||||||
{
|
{
|
||||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
target->SetHealth(target->GetMaxHealth());
|
target->SetHealth(target->GetMaxHealth());
|
||||||
target->SetStandState(UNIT_STAND_STATE_STAND);
|
target->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
target->CastSpell(target, SPELL_RES_VISUAL, true);
|
target->CastSpell(target, SPELL_RES_VISUAL, true);
|
||||||
if(target->getVictim())
|
if(target->getVictim())
|
||||||
{
|
{
|
||||||
@@ -1140,7 +1140,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
DoCast(m_creature, SPELL_DRINK_POISON);
|
DoCast(m_creature, SPELL_DRINK_POISON);
|
||||||
|
|
||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
//IS THIS USEFULL? Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID));
|
//IS THIS USEFULL? Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1322,7 +1322,7 @@ void boss_julianneAI::UpdateAI(const uint32 diff)
|
|||||||
DoScriptText(SAY_JULIANNE_RESURRECT, m_creature);
|
DoScriptText(SAY_JULIANNE_RESURRECT, m_creature);
|
||||||
Resurrect(Romulo);
|
Resurrect(Romulo);
|
||||||
CAST_AI(boss_romuloAI, Romulo->AI())->IsFakingDeath = false;
|
CAST_AI(boss_romuloAI, Romulo->AI())->IsFakingDeath = false;
|
||||||
RomuloDead = false;
|
RomuloDead = false;
|
||||||
ResurrectTimer = 10000;
|
ResurrectTimer = 10000;
|
||||||
}
|
}
|
||||||
}else ResurrectTimer -= diff;
|
}else ResurrectTimer -= diff;
|
||||||
@@ -1376,7 +1376,7 @@ void boss_romuloAI::UpdateAI(const uint32 diff)
|
|||||||
DoScriptText(SAY_ROMULO_RESURRECT, m_creature);
|
DoScriptText(SAY_ROMULO_RESURRECT, m_creature);
|
||||||
Resurrect(Julianne);
|
Resurrect(Julianne);
|
||||||
CAST_AI(boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
|
CAST_AI(boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
|
||||||
JulianneDead = false;
|
JulianneDead = false;
|
||||||
ResurrectTimer = 10000;
|
ResurrectTimer = 10000;
|
||||||
}
|
}
|
||||||
}else ResurrectTimer -= diff;
|
}else ResurrectTimer -= diff;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
|||||||
instance_karazhan(Map* map) : ScriptedInstance(map) {Initialize();}
|
instance_karazhan(Map* map) : ScriptedInstance(map) {Initialize();}
|
||||||
|
|
||||||
uint32 Encounters[ENCOUNTERS];
|
uint32 Encounters[ENCOUNTERS];
|
||||||
std::string str_data;
|
std::string str_data;
|
||||||
|
|
||||||
uint32 OperaEvent;
|
uint32 OperaEvent;
|
||||||
uint32 OzDeathCount;
|
uint32 OzDeathCount;
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
|
|||||||
cell.SetNoCreate();
|
cell.SetNoCreate();
|
||||||
|
|
||||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*m_creature, entry, true, range);
|
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*m_creature, entry, true, range);
|
||||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_creature, pCreature, creature_check);
|
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_creature, pCreature, creature_check);
|
||||||
|
|
||||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
||||||
|
|
||||||
@@ -439,8 +439,8 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
|
|||||||
ardonis->SendUpdateToPlayer(player);
|
ardonis->SendUpdateToPlayer(player);
|
||||||
|
|
||||||
//Set them to kneel
|
//Set them to kneel
|
||||||
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||||
ardonis->SetStandState(UNIT_STAND_STATE_KNEEL);
|
ardonis->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set them back to each other
|
//Set them back to each other
|
||||||
@@ -464,8 +464,8 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
|
|||||||
ardonis->SendUpdateToPlayer(player);
|
ardonis->SendUpdateToPlayer(player);
|
||||||
|
|
||||||
//Set state
|
//Set state
|
||||||
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
ardonis->SetStandState(UNIT_STAND_STATE_STAND);
|
ardonis->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,7 +637,7 @@ Creature* SearchDawnforge(Player *source, uint32 entry, float range)
|
|||||||
cell.SetNoCreate();
|
cell.SetNoCreate();
|
||||||
|
|
||||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*source, entry, true, range);
|
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*source, entry, true, range);
|
||||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(source, pCreature, creature_check);
|
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(source, pCreature, creature_check);
|
||||||
|
|
||||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
||||||
|
|
||||||
|
|||||||
@@ -57,32 +57,32 @@ float RiftLocation[6][3]=
|
|||||||
struct TRINITY_DLL_DECL boss_anomalusAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_anomalusAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_anomalusAI(Creature *c) : ScriptedAI(c)
|
boss_anomalusAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
Reset();
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
uint8 Phase;
|
uint8 Phase;
|
||||||
uint32 SPELL_SPARK_Timer;
|
uint32 SPELL_SPARK_Timer;
|
||||||
uint32 SPELL_CREATE_RIFT_Timer;
|
uint32 SPELL_CREATE_RIFT_Timer;
|
||||||
uint64 ChaoticRiftGUID;
|
uint64 ChaoticRiftGUID;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
Phase = 0;
|
Phase = 0;
|
||||||
SPELL_SPARK_Timer = 5000;
|
SPELL_SPARK_Timer = 5000;
|
||||||
SPELL_CREATE_RIFT_Timer = 25000;
|
SPELL_CREATE_RIFT_Timer = 25000;
|
||||||
ChaoticRiftGUID = 0;
|
ChaoticRiftGUID = 0;
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void Aggro(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
@@ -94,90 +94,90 @@ struct TRINITY_DLL_DECL boss_anomalusAI : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_creature->HasAura(SPELL_RIFT_SHIELD))
|
if (m_creature->HasAura(SPELL_RIFT_SHIELD))
|
||||||
{
|
{
|
||||||
Unit* Rift;
|
Unit* Rift;
|
||||||
if (ChaoticRiftGUID)
|
if (ChaoticRiftGUID)
|
||||||
Rift = Unit::GetUnit((*m_creature), ChaoticRiftGUID);
|
Rift = Unit::GetUnit((*m_creature), ChaoticRiftGUID);
|
||||||
if (Rift && Rift->isDead())
|
if (Rift && Rift->isDead())
|
||||||
{
|
{
|
||||||
m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD);
|
m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD);
|
||||||
ChaoticRiftGUID = 0;
|
ChaoticRiftGUID = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
ChaoticRiftGUID = 0;
|
ChaoticRiftGUID = 0;
|
||||||
|
|
||||||
if ((Phase == 0) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.75))
|
if ((Phase == 0) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.75))
|
||||||
{
|
{
|
||||||
Phase = 1;
|
Phase = 1;
|
||||||
DoScriptText(SAY_SHIELD, m_creature);
|
DoScriptText(SAY_SHIELD, m_creature);
|
||||||
DoCast(m_creature, SPELL_RIFT_SHIELD);
|
DoCast(m_creature, SPELL_RIFT_SHIELD);
|
||||||
|
|
||||||
int tmp = rand()%(2);
|
int tmp = rand()%(2);
|
||||||
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||||
if (Rift)
|
if (Rift)
|
||||||
{
|
{
|
||||||
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
Rift->AI()->AttackStart(target);
|
Rift->AI()->AttackStart(target);
|
||||||
ChaoticRiftGUID = Rift->GetGUID();
|
ChaoticRiftGUID = Rift->GetGUID();
|
||||||
DoScriptText(SAY_RIFT , m_creature);
|
DoScriptText(SAY_RIFT , m_creature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Phase == 1) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.50))
|
if ((Phase == 1) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.50))
|
||||||
{
|
{
|
||||||
Phase = 2;
|
Phase = 2;
|
||||||
DoScriptText(SAY_SHIELD , m_creature);
|
DoScriptText(SAY_SHIELD , m_creature);
|
||||||
DoCast(m_creature,SPELL_RIFT_SHIELD);
|
DoCast(m_creature,SPELL_RIFT_SHIELD);
|
||||||
|
|
||||||
int tmp = rand()%(2);
|
int tmp = rand()%(2);
|
||||||
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||||
if (Rift)
|
if (Rift)
|
||||||
{
|
{
|
||||||
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
Rift->AI()->AttackStart(target);
|
Rift->AI()->AttackStart(target);
|
||||||
ChaoticRiftGUID = Rift->GetGUID();
|
ChaoticRiftGUID = Rift->GetGUID();
|
||||||
DoScriptText(SAY_RIFT , m_creature);
|
DoScriptText(SAY_RIFT , m_creature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Phase == 2) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
if ((Phase == 2) && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
||||||
{
|
{
|
||||||
Phase = 3;
|
Phase = 3;
|
||||||
DoScriptText(SAY_SHIELD , m_creature);
|
DoScriptText(SAY_SHIELD , m_creature);
|
||||||
DoCast(m_creature,SPELL_RIFT_SHIELD);
|
DoCast(m_creature,SPELL_RIFT_SHIELD);
|
||||||
|
|
||||||
int tmp = rand()%(2);
|
int tmp = rand()%(2);
|
||||||
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||||
if (Rift)
|
if (Rift)
|
||||||
{
|
{
|
||||||
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
Rift->AI()->AttackStart(target);
|
Rift->AI()->AttackStart(target);
|
||||||
ChaoticRiftGUID = Rift->GetGUID();
|
ChaoticRiftGUID = Rift->GetGUID();
|
||||||
DoScriptText(SAY_RIFT , m_creature);
|
DoScriptText(SAY_RIFT , m_creature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SPELL_SPARK_Timer < diff)
|
if (SPELL_SPARK_Timer < diff)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
DoCast(target, HeroicMode ? SPELL_SPARK_H : SPELL_SPARK_N);
|
DoCast(target, HeroicMode ? SPELL_SPARK_H : SPELL_SPARK_N);
|
||||||
SPELL_SPARK_Timer = 5000;
|
SPELL_SPARK_Timer = 5000;
|
||||||
}else SPELL_SPARK_Timer -=diff;
|
}else SPELL_SPARK_Timer -=diff;
|
||||||
|
|
||||||
if (SPELL_CREATE_RIFT_Timer < diff)
|
if (SPELL_CREATE_RIFT_Timer < diff)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_RIFT , m_creature);
|
DoScriptText(SAY_RIFT , m_creature);
|
||||||
|
|
||||||
int tmp = rand()%(2);
|
int tmp = rand()%(2);
|
||||||
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp][0], RiftLocation[tmp][1], RiftLocation[tmp][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||||
if (Rift)
|
if (Rift)
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
Rift->AI()->AttackStart(target);
|
Rift->AI()->AttackStart(target);
|
||||||
SPELL_CREATE_RIFT_Timer = 25000;
|
SPELL_CREATE_RIFT_Timer = 25000;
|
||||||
}else SPELL_CREATE_RIFT_Timer -=diff;
|
}else SPELL_CREATE_RIFT_Timer -=diff;
|
||||||
|
|
||||||
@@ -187,33 +187,33 @@ struct TRINITY_DLL_DECL boss_anomalusAI : public ScriptedAI
|
|||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_ANOMALUS_EVENT, DONE);
|
pInstance->SetData(DATA_ANOMALUS_EVENT, DONE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI
|
struct TRINITY_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI
|
||||||
{
|
{
|
||||||
mob_chaotic_riftAI(Creature *c) : Scripted_NoMovementAI(c)
|
mob_chaotic_riftAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
uint32 SPELL_CHAOTIC_ENERGY_BURST_Timer;
|
uint32 SPELL_CHAOTIC_ENERGY_BURST_Timer;
|
||||||
uint32 SUMMON_CRAZED_MANA_WRAITH_Timer;
|
uint32 SUMMON_CRAZED_MANA_WRAITH_Timer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
SPELL_CHAOTIC_ENERGY_BURST_Timer = 1000;
|
SPELL_CHAOTIC_ENERGY_BURST_Timer = 1000;
|
||||||
SUMMON_CRAZED_MANA_WRAITH_Timer = 5000;
|
SUMMON_CRAZED_MANA_WRAITH_Timer = 5000;
|
||||||
m_creature->SetDisplayId(25206); //For some reason in DB models for ally and horde are different.
|
m_creature->SetDisplayId(25206); //For some reason in DB models for ally and horde are different.
|
||||||
//Model for ally (1126) does not show auras. Horde model works perfect.
|
//Model for ally (1126) does not show auras. Horde model works perfect.
|
||||||
//Set model to horde number
|
//Set model to horde number
|
||||||
DoCast(m_creature, SPELL_ARCANEFORM, false);
|
DoCast(m_creature, SPELL_ARCANEFORM, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
@@ -222,30 +222,30 @@ struct TRINITY_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
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->GetData64(DATA_ANOMALUS));
|
||||||
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);
|
||||||
else
|
else
|
||||||
DoCast(target, SPELL_CHAOTIC_ENERGY_BURST);
|
DoCast(target, SPELL_CHAOTIC_ENERGY_BURST);
|
||||||
SPELL_CHAOTIC_ENERGY_BURST_Timer = 1000;
|
SPELL_CHAOTIC_ENERGY_BURST_Timer = 1000;
|
||||||
}else SPELL_CHAOTIC_ENERGY_BURST_Timer -=diff;
|
}else SPELL_CHAOTIC_ENERGY_BURST_Timer -=diff;
|
||||||
|
|
||||||
if (SUMMON_CRAZED_MANA_WRAITH_Timer < diff)
|
if (SUMMON_CRAZED_MANA_WRAITH_Timer < diff)
|
||||||
{
|
{
|
||||||
Creature* Wraith = m_creature->SummonCreature(MOB_CRAZED_MANA_WRAITH, m_creature->GetPositionX()+1, m_creature->GetPositionY()+1, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
Creature* Wraith = m_creature->SummonCreature(MOB_CRAZED_MANA_WRAITH, m_creature->GetPositionX()+1, m_creature->GetPositionY()+1, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||||
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->GetData64(DATA_ANOMALUS));
|
||||||
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
|
||||||
SUMMON_CRAZED_MANA_WRAITH_Timer = 10000;
|
SUMMON_CRAZED_MANA_WRAITH_Timer = 10000;
|
||||||
}else SUMMON_CRAZED_MANA_WRAITH_Timer -=diff;
|
}else SUMMON_CRAZED_MANA_WRAITH_Timer -=diff;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_mob_chaotic_rift(Creature *_Creature)
|
CreatureAI* GetAI_mob_chaotic_rift(Creature *_Creature)
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
|
|||||||
boss_keristraszaAI(Creature *c) : ScriptedAI(c)
|
boss_keristraszaAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
uint32 CRYSTALFIRE_BREATH_Timer;
|
uint32 CRYSTALFIRE_BREATH_Timer;
|
||||||
uint32 CRYSTAL_CHAINS_CRYSTALIZE_Timer;
|
uint32 CRYSTAL_CHAINS_CRYSTALIZE_Timer;
|
||||||
@@ -63,41 +63,41 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
|
|||||||
CRYSTALFIRE_BREATH_Timer = 14000;
|
CRYSTALFIRE_BREATH_Timer = 14000;
|
||||||
CRYSTAL_CHAINS_CRYSTALIZE_Timer = HeroicMode ? 30000 : 11000;
|
CRYSTAL_CHAINS_CRYSTALIZE_Timer = HeroicMode ? 30000 : 11000;
|
||||||
TAIL_SWEEP_Timer = 5000;
|
TAIL_SWEEP_Timer = 5000;
|
||||||
Enrage = false;
|
Enrage = false;
|
||||||
m_creature->RemoveAurasDueToSpell(SPELL_INTENSE_COLD);
|
m_creature->RemoveAurasDueToSpell(SPELL_INTENSE_COLD);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||||
if (pInstance && pInstance->GetData(DATA_KERISTRASZA_FREED) == DONE)
|
if (pInstance && pInstance->GetData(DATA_KERISTRASZA_FREED) == DONE)
|
||||||
{
|
{
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
}else{
|
}else{
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
m_creature->CastSpell(m_creature, SPELL_FROZEN_PRISON, false);
|
m_creature->CastSpell(m_creature, SPELL_FROZEN_PRISON, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit *who)
|
void MoveInLineOfSight(Unit *who)
|
||||||
{
|
{
|
||||||
if (pInstance && pInstance->GetData(DATA_KERISTRASZA_FREED) != DONE && pInstance->GetData(DATA_MAGUS_TELESTRA_EVENT) == DONE &&
|
if (pInstance && pInstance->GetData(DATA_KERISTRASZA_FREED) != DONE && pInstance->GetData(DATA_MAGUS_TELESTRA_EVENT) == DONE &&
|
||||||
pInstance->GetData(DATA_ANOMALUS_EVENT) == DONE && pInstance->GetData(DATA_ORMOROK_EVENT) == DONE &&
|
pInstance->GetData(DATA_ANOMALUS_EVENT) == DONE && pInstance->GetData(DATA_ORMOROK_EVENT) == DONE &&
|
||||||
m_creature->IsHostileTo(who) && m_creature->IsWithinDist(who, 15.0f, false))
|
m_creature->IsHostileTo(who) && m_creature->IsWithinDist(who, 15.0f, false))
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_KERISTRASZA_FREED, DONE);
|
pInstance->SetData(DATA_KERISTRASZA_FREED, DONE);
|
||||||
}
|
}
|
||||||
if (pInstance->GetData(DATA_KERISTRASZA_FREED) == DONE)
|
if (pInstance->GetData(DATA_KERISTRASZA_FREED) == DONE)
|
||||||
{
|
{
|
||||||
m_creature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON);
|
m_creature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
ScriptedAI::MoveInLineOfSight(who);
|
ScriptedAI::MoveInLineOfSight(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void Aggro(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
DoCast(m_creature, SPELL_INTENSE_COLD);
|
DoCast(m_creature, SPELL_INTENSE_COLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -107,22 +107,22 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Enrage && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
if (!Enrage && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_ENRAGE , m_creature);
|
DoScriptText(SAY_ENRAGE , m_creature);
|
||||||
DoCast(m_creature, SPELL_ENRAGE);
|
DoCast(m_creature, SPELL_ENRAGE);
|
||||||
Enrage = true;
|
Enrage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CRYSTALFIRE_BREATH_Timer < diff)
|
if (CRYSTALFIRE_BREATH_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), HeroicMode ? SPELL_CRYSTALFIRE_BREATH_H : SPELL_CRYSTALFIRE_BREATH_N);
|
DoCast(m_creature->getVictim(), HeroicMode ? SPELL_CRYSTALFIRE_BREATH_H : SPELL_CRYSTALFIRE_BREATH_N);
|
||||||
CRYSTALFIRE_BREATH_Timer = 14000;
|
CRYSTALFIRE_BREATH_Timer = 14000;
|
||||||
}else CRYSTALFIRE_BREATH_Timer -=diff;
|
}else CRYSTALFIRE_BREATH_Timer -=diff;
|
||||||
|
|
||||||
if (TAIL_SWEEP_Timer < diff)
|
if (TAIL_SWEEP_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_TAIL_SWEEP);
|
DoCast(m_creature, SPELL_TAIL_SWEEP);
|
||||||
TAIL_SWEEP_Timer = 5000;
|
TAIL_SWEEP_Timer = 5000;
|
||||||
}else TAIL_SWEEP_Timer -=diff;
|
}else TAIL_SWEEP_Timer -=diff;
|
||||||
|
|
||||||
@@ -130,11 +130,11 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_CRYSTAL_NOVA , m_creature);
|
DoScriptText(SAY_CRYSTAL_NOVA , m_creature);
|
||||||
if (HeroicMode)
|
if (HeroicMode)
|
||||||
DoCast(m_creature, SPELL_CRYSTALIZE);
|
DoCast(m_creature, SPELL_CRYSTALIZE);
|
||||||
else
|
else
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
DoCast(target, SPELL_CRYSTAL_CHAINS);
|
DoCast(target, SPELL_CRYSTAL_CHAINS);
|
||||||
CRYSTAL_CHAINS_CRYSTALIZE_Timer = HeroicMode ? 30000 : 11000;
|
CRYSTAL_CHAINS_CRYSTALIZE_Timer = HeroicMode ? 30000 : 11000;
|
||||||
}else CRYSTAL_CHAINS_CRYSTALIZE_Timer -= diff;
|
}else CRYSTAL_CHAINS_CRYSTALIZE_Timer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|||||||
@@ -63,19 +63,19 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
Reset();
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
uint64 FireMagusGUID;
|
uint64 FireMagusGUID;
|
||||||
uint64 FrostMagusGUID;
|
uint64 FrostMagusGUID;
|
||||||
uint64 ArcaneMagusGUID;
|
uint64 ArcaneMagusGUID;
|
||||||
bool FireMagusDead;
|
bool FireMagusDead;
|
||||||
bool FrostMagusDead;
|
bool FrostMagusDead;
|
||||||
bool ArcaneMagusDead;
|
bool ArcaneMagusDead;
|
||||||
|
|
||||||
uint32 AppearDelay_Timer;
|
uint32 AppearDelay_Timer;
|
||||||
bool AppearDelay;
|
bool AppearDelay;
|
||||||
|
|
||||||
uint8 Phase;
|
uint8 Phase;
|
||||||
@@ -96,10 +96,10 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
FrostMagusGUID = 0;
|
FrostMagusGUID = 0;
|
||||||
ArcaneMagusGUID = 0;
|
ArcaneMagusGUID = 0;
|
||||||
|
|
||||||
AppearDelay = false;
|
AppearDelay = false;
|
||||||
|
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetVisibility(VISIBILITY_ON);
|
m_creature->SetVisibility(VISIBILITY_ON);
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED);
|
||||||
@@ -116,28 +116,28 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
if (Summoned)
|
if (Summoned)
|
||||||
{
|
{
|
||||||
switch (entry)
|
switch (entry)
|
||||||
{
|
{
|
||||||
case MOB_FIRE_MAGUS:
|
case MOB_FIRE_MAGUS:
|
||||||
{
|
{
|
||||||
Summoned->CastSpell(Summoned, SPELL_FIRE_MAGUS_VISUAL, false);
|
Summoned->CastSpell(Summoned, SPELL_FIRE_MAGUS_VISUAL, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MOB_FROST_MAGUS:
|
case MOB_FROST_MAGUS:
|
||||||
{
|
{
|
||||||
Summoned->CastSpell(Summoned, SPELL_FROST_MAGUS_VISUAL, false);
|
Summoned->CastSpell(Summoned, SPELL_FROST_MAGUS_VISUAL, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MOB_ARCANE_MAGUS:
|
case MOB_ARCANE_MAGUS:
|
||||||
{
|
{
|
||||||
Summoned->CastSpell(Summoned, SPELL_ARCANE_MAGUS_VISUAL, false);
|
Summoned->CastSpell(Summoned, SPELL_ARCANE_MAGUS_VISUAL, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
Summoned->AI()->AttackStart(target);
|
Summoned->AI()->AttackStart(target);
|
||||||
return Summoned->GetGUID();
|
return Summoned->GetGUID();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -157,90 +157,90 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
AppearDelay = false;
|
AppearDelay = false;
|
||||||
}else AppearDelay_Timer -= diff;
|
}else AppearDelay_Timer -= diff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((Phase == 1)||(Phase == 3))
|
if ((Phase == 1)||(Phase == 3))
|
||||||
{
|
{
|
||||||
Unit* FireMagus;
|
Unit* FireMagus;
|
||||||
Unit* FrostMagus;
|
Unit* FrostMagus;
|
||||||
Unit* ArcaneMagus;
|
Unit* ArcaneMagus;
|
||||||
if (FireMagusGUID)
|
if (FireMagusGUID)
|
||||||
FireMagus = Unit::GetUnit((*m_creature), FireMagusGUID);
|
FireMagus = Unit::GetUnit((*m_creature), FireMagusGUID);
|
||||||
if (FrostMagusGUID)
|
if (FrostMagusGUID)
|
||||||
FrostMagus = Unit::GetUnit((*m_creature), FrostMagusGUID);
|
FrostMagus = Unit::GetUnit((*m_creature), FrostMagusGUID);
|
||||||
if (ArcaneMagusGUID)
|
if (ArcaneMagusGUID)
|
||||||
ArcaneMagus = Unit::GetUnit((*m_creature), ArcaneMagusGUID);
|
ArcaneMagus = Unit::GetUnit((*m_creature), ArcaneMagusGUID);
|
||||||
if (FireMagus && FireMagus->isDead())
|
if (FireMagus && FireMagus->isDead())
|
||||||
FireMagusDead = true;
|
FireMagusDead = true;
|
||||||
if (FrostMagus && FrostMagus->isDead())
|
if (FrostMagus && FrostMagus->isDead())
|
||||||
FrostMagusDead = true;
|
FrostMagusDead = true;
|
||||||
if (ArcaneMagus && ArcaneMagus->isDead())
|
if (ArcaneMagus && ArcaneMagus->isDead())
|
||||||
ArcaneMagusDead = true;
|
ArcaneMagusDead = true;
|
||||||
if (FireMagusDead && FrostMagusDead && ArcaneMagusDead)
|
if (FireMagusDead && FrostMagusDead && ArcaneMagusDead)
|
||||||
{
|
{
|
||||||
m_creature->GetMotionMaster()->Clear();
|
m_creature->GetMotionMaster()->Clear();
|
||||||
m_creature->Relocate(CenterOfRoom[0][0], CenterOfRoom[0][1], CenterOfRoom[0][2], CenterOfRoom[0][3]);
|
m_creature->Relocate(CenterOfRoom[0][0], CenterOfRoom[0][1], CenterOfRoom[0][2], CenterOfRoom[0][3]);
|
||||||
DoCast(m_creature, SPELL_TELESTRA_BACK);
|
DoCast(m_creature, SPELL_TELESTRA_BACK);
|
||||||
m_creature->SetVisibility(VISIBILITY_ON);
|
m_creature->SetVisibility(VISIBILITY_ON);
|
||||||
if (Phase == 1)
|
if (Phase == 1)
|
||||||
Phase = 2;
|
Phase = 2;
|
||||||
if (Phase == 3)
|
if (Phase == 3)
|
||||||
Phase = 4;
|
Phase = 4;
|
||||||
FireMagusGUID = 0;
|
FireMagusGUID = 0;
|
||||||
FrostMagusGUID = 0;
|
FrostMagusGUID = 0;
|
||||||
ArcaneMagusGUID = 0;
|
ArcaneMagusGUID = 0;
|
||||||
AppearDelay = true;
|
AppearDelay = true;
|
||||||
AppearDelay_Timer = 4000;
|
AppearDelay_Timer = 4000;
|
||||||
DoScriptText(SAY_MERGE, m_creature);
|
DoScriptText(SAY_MERGE, m_creature);
|
||||||
}else
|
}else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Phase == 0) && (m_creature->GetHealth() <= (m_creature->GetMaxHealth() * 0.5)))
|
if ((Phase == 0) && (m_creature->GetHealth() <= (m_creature->GetMaxHealth() * 0.5)))
|
||||||
{
|
{
|
||||||
Phase = 1;
|
Phase = 1;
|
||||||
m_creature->CastStop();
|
m_creature->CastStop();
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
||||||
FrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
FrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
||||||
ArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
ArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
||||||
FireMagusDead = false;
|
FireMagusDead = false;
|
||||||
FrostMagusDead = false;
|
FrostMagusDead = false;
|
||||||
ArcaneMagusDead = false;
|
ArcaneMagusDead = false;
|
||||||
switch(rand()%2)
|
switch(rand()%2)
|
||||||
{
|
{
|
||||||
case 0: DoScriptText(SAY_SPLIT_1, m_creature); break;
|
case 0: DoScriptText(SAY_SPLIT_1, m_creature); break;
|
||||||
case 1: DoScriptText(SAY_SPLIT_2, m_creature); break;
|
case 1: DoScriptText(SAY_SPLIT_2, m_creature); break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HeroicMode && (Phase == 2) && (m_creature->GetHealth() <= (m_creature->GetMaxHealth() * 0.1)))
|
if (HeroicMode && (Phase == 2) && (m_creature->GetHealth() <= (m_creature->GetMaxHealth() * 0.1)))
|
||||||
{
|
{
|
||||||
Phase = 3;
|
Phase = 3;
|
||||||
m_creature->CastStop();
|
m_creature->CastStop();
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
||||||
FrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
FrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
||||||
ArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
ArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
||||||
FireMagusDead = false;
|
FireMagusDead = false;
|
||||||
FrostMagusDead = false;
|
FrostMagusDead = false;
|
||||||
ArcaneMagusDead = false;
|
ArcaneMagusDead = false;
|
||||||
switch(rand()%2)
|
switch(rand()%2)
|
||||||
{
|
{
|
||||||
case 0: DoScriptText(SAY_SPLIT_1, m_creature); break;
|
case 0: DoScriptText(SAY_SPLIT_1, m_creature); break;
|
||||||
case 1: DoScriptText(SAY_SPLIT_2, m_creature); break;
|
case 1: DoScriptText(SAY_SPLIT_2, m_creature); break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SPELL_ICE_NOVA_Timer < diff)
|
if (SPELL_ICE_NOVA_Timer < diff)
|
||||||
{
|
{
|
||||||
m_creature->CastStop();
|
m_creature->CastStop();
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
DoCast(target, HeroicMode ? SPELL_ICE_NOVA_H : SPELL_ICE_NOVA_N);
|
DoCast(target, HeroicMode ? SPELL_ICE_NOVA_H : SPELL_ICE_NOVA_N);
|
||||||
SPELL_ICE_NOVA_Timer = 15000;
|
SPELL_ICE_NOVA_Timer = 15000;
|
||||||
@@ -248,16 +248,16 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
|
|
||||||
if (SPELL_GRAVITY_WELL_Timer < diff)
|
if (SPELL_GRAVITY_WELL_Timer < diff)
|
||||||
{
|
{
|
||||||
m_creature->CastStop();
|
m_creature->CastStop();
|
||||||
if (Unit* target = m_creature->getVictim())
|
if (Unit* target = m_creature->getVictim())
|
||||||
DoCast(target, SPELL_GRAVITY_WELL);
|
DoCast(target, SPELL_GRAVITY_WELL);
|
||||||
SPELL_GRAVITY_WELL_Timer = 15000;
|
SPELL_GRAVITY_WELL_Timer = 15000;
|
||||||
}else SPELL_GRAVITY_WELL_Timer -=diff;
|
}else SPELL_GRAVITY_WELL_Timer -=diff;
|
||||||
|
|
||||||
if (SPELL_FIREBOMB_Timer < diff)
|
if (SPELL_FIREBOMB_Timer < diff)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
DoCast(target, HeroicMode ? SPELL_FIREBOMB_H : SPELL_FIREBOMB_N);
|
DoCast(target, HeroicMode ? SPELL_FIREBOMB_H : SPELL_FIREBOMB_N);
|
||||||
SPELL_FIREBOMB_Timer = 2000;
|
SPELL_FIREBOMB_Timer = 2000;
|
||||||
}else SPELL_FIREBOMB_Timer -=diff;
|
}else SPELL_FIREBOMB_Timer -=diff;
|
||||||
|
|
||||||
@@ -265,11 +265,11 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
|
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit *victim)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,159 +48,159 @@ EndScriptData */
|
|||||||
#define SAY_CRYSTAL_SPIKES -1576023
|
#define SAY_CRYSTAL_SPIKES -1576023
|
||||||
#define SAY_KILL -1576024
|
#define SAY_KILL -1576024
|
||||||
|
|
||||||
#define SPIKE_DISTANCE 5.0f
|
#define SPIKE_DISTANCE 5.0f
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_ormorokAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_ormorokAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_ormorokAI(Creature *c) : ScriptedAI(c)
|
boss_ormorokAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
Reset();
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
bool Frenzy;
|
bool Frenzy;
|
||||||
bool CrystalSpikes;
|
bool CrystalSpikes;
|
||||||
uint8 CrystalSpikes_Count;
|
uint8 CrystalSpikes_Count;
|
||||||
float BaseX;
|
float BaseX;
|
||||||
float BaseY;
|
float BaseY;
|
||||||
float BaseZ;
|
float BaseZ;
|
||||||
float BaseO;
|
float BaseO;
|
||||||
float SpikeXY[4][2];
|
float SpikeXY[4][2];
|
||||||
|
|
||||||
uint32 SPELL_CRYSTAL_SPIKES_Timer;
|
uint32 SPELL_CRYSTAL_SPIKES_Timer;
|
||||||
uint32 CRYSTAL_SPIKES_Timer;
|
uint32 CRYSTAL_SPIKES_Timer;
|
||||||
uint32 SPELL_TRAMPLE_Timer;
|
uint32 SPELL_TRAMPLE_Timer;
|
||||||
uint32 SPELL_FRENZY_Timer;
|
uint32 SPELL_FRENZY_Timer;
|
||||||
uint32 SPELL_SPELL_REFLECTION_Timer;
|
uint32 SPELL_SPELL_REFLECTION_Timer;
|
||||||
uint32 SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer;
|
uint32 SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
SPELL_CRYSTAL_SPIKES_Timer = 12000;
|
SPELL_CRYSTAL_SPIKES_Timer = 12000;
|
||||||
SPELL_TRAMPLE_Timer = 10000;
|
SPELL_TRAMPLE_Timer = 10000;
|
||||||
SPELL_SPELL_REFLECTION_Timer = 30000;
|
SPELL_SPELL_REFLECTION_Timer = 30000;
|
||||||
SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer = 17000;
|
SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer = 17000;
|
||||||
Frenzy = false;
|
Frenzy = false;
|
||||||
CrystalSpikes = false;
|
CrystalSpikes = false;
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_ORMOROK_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_ORMOROK_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void Aggro(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (CrystalSpikes)
|
if (CrystalSpikes)
|
||||||
if (CRYSTAL_SPIKES_Timer < diff)
|
if (CRYSTAL_SPIKES_Timer < diff)
|
||||||
{
|
{
|
||||||
SpikeXY[0][0] = BaseX+(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO));
|
SpikeXY[0][0] = BaseX+(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO));
|
||||||
SpikeXY[0][1] = BaseY+(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO));
|
SpikeXY[0][1] = BaseY+(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO));
|
||||||
SpikeXY[1][0] = BaseX-(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO));
|
SpikeXY[1][0] = BaseX-(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO));
|
||||||
SpikeXY[1][1] = BaseY-(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO));
|
SpikeXY[1][1] = BaseY-(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO));
|
||||||
SpikeXY[2][0] = BaseX+(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO-(M_PI/2)));
|
SpikeXY[2][0] = BaseX+(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO-(M_PI/2)));
|
||||||
SpikeXY[2][1] = BaseY+(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO-(M_PI/2)));
|
SpikeXY[2][1] = BaseY+(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO-(M_PI/2)));
|
||||||
SpikeXY[3][0] = BaseX-(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO-(M_PI/2)));
|
SpikeXY[3][0] = BaseX-(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO-(M_PI/2)));
|
||||||
SpikeXY[3][1] = BaseY-(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO-(M_PI/2)));
|
SpikeXY[3][1] = BaseY-(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO-(M_PI/2)));
|
||||||
for (uint8 i = 0; i < 4; i++)
|
for (uint8 i = 0; i < 4; i++)
|
||||||
Creature* Spike = m_creature->SummonCreature(MOB_CRYSTAL_SPIKE, SpikeXY[i][0], SpikeXY[i][1], BaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7000);
|
Creature* Spike = m_creature->SummonCreature(MOB_CRYSTAL_SPIKE, SpikeXY[i][0], SpikeXY[i][1], BaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7000);
|
||||||
if (++CrystalSpikes_Count >= 13)
|
if (++CrystalSpikes_Count >= 13)
|
||||||
CrystalSpikes = false;
|
CrystalSpikes = false;
|
||||||
CRYSTAL_SPIKES_Timer = 200;
|
CRYSTAL_SPIKES_Timer = 200;
|
||||||
}else CRYSTAL_SPIKES_Timer -= diff;
|
}else CRYSTAL_SPIKES_Timer -= diff;
|
||||||
|
|
||||||
if (!Frenzy && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
if (!Frenzy && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_FRENZY);
|
DoCast(m_creature, SPELL_FRENZY);
|
||||||
Frenzy = true;
|
Frenzy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SPELL_TRAMPLE_Timer < diff)
|
if (SPELL_TRAMPLE_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, HeroicMode ? SPELL_TRAMPLE_H : SPELL_TRAMPLE_N);
|
DoCast(m_creature, HeroicMode ? SPELL_TRAMPLE_H : SPELL_TRAMPLE_N);
|
||||||
SPELL_TRAMPLE_Timer = 10000;
|
SPELL_TRAMPLE_Timer = 10000;
|
||||||
}else SPELL_TRAMPLE_Timer -= diff;
|
}else SPELL_TRAMPLE_Timer -= diff;
|
||||||
|
|
||||||
if (SPELL_SPELL_REFLECTION_Timer < diff)
|
if (SPELL_SPELL_REFLECTION_Timer < diff)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_REFLECT, m_creature);
|
DoScriptText(SAY_REFLECT, m_creature);
|
||||||
DoCast(m_creature, SPELL_SPELL_REFLECTION);
|
DoCast(m_creature, SPELL_SPELL_REFLECTION);
|
||||||
SPELL_SPELL_REFLECTION_Timer = 30000;
|
SPELL_SPELL_REFLECTION_Timer = 30000;
|
||||||
}else SPELL_SPELL_REFLECTION_Timer -= diff;
|
}else SPELL_SPELL_REFLECTION_Timer -= diff;
|
||||||
|
|
||||||
if (SPELL_CRYSTAL_SPIKES_Timer < diff)
|
if (SPELL_CRYSTAL_SPIKES_Timer < diff)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_CRYSTAL_SPIKES, m_creature);
|
DoScriptText(SAY_CRYSTAL_SPIKES, m_creature);
|
||||||
CrystalSpikes = true;
|
CrystalSpikes = true;
|
||||||
CrystalSpikes_Count = 1;
|
CrystalSpikes_Count = 1;
|
||||||
CRYSTAL_SPIKES_Timer = 0;
|
CRYSTAL_SPIKES_Timer = 0;
|
||||||
BaseX = m_creature->GetPositionX();
|
BaseX = m_creature->GetPositionX();
|
||||||
BaseY = m_creature->GetPositionY();
|
BaseY = m_creature->GetPositionY();
|
||||||
BaseZ = m_creature->GetPositionZ();
|
BaseZ = m_creature->GetPositionZ();
|
||||||
BaseO = m_creature->GetOrientation();
|
BaseO = m_creature->GetOrientation();
|
||||||
SPELL_CRYSTAL_SPIKES_Timer = 20000;
|
SPELL_CRYSTAL_SPIKES_Timer = 20000;
|
||||||
}else SPELL_CRYSTAL_SPIKES_Timer -=diff;
|
}else SPELL_CRYSTAL_SPIKES_Timer -=diff;
|
||||||
|
|
||||||
if (HeroicMode && (SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer < diff))
|
if (HeroicMode && (SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer < diff))
|
||||||
{
|
{
|
||||||
Creature* Crystalline_Tangler = m_creature->SummonCreature(MOB_CRYSTALLINE_TANGLER, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
Creature* Crystalline_Tangler = m_creature->SummonCreature(MOB_CRYSTALLINE_TANGLER, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||||
if (Crystalline_Tangler)
|
if (Crystalline_Tangler)
|
||||||
{
|
{
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
uint8 Healer = 0;
|
uint8 Healer = 0;
|
||||||
for (uint8 j = 1; j<=4; j++)
|
for (uint8 j = 1; j<=4; j++)
|
||||||
{
|
{
|
||||||
switch (j)
|
switch (j)
|
||||||
{
|
{
|
||||||
case 1: Healer = CLASS_PRIEST; break;
|
case 1: Healer = CLASS_PRIEST; break;
|
||||||
case 2: Healer = CLASS_PALADIN; break;
|
case 2: Healer = CLASS_PALADIN; break;
|
||||||
case 3: Healer = CLASS_DRUID; break;
|
case 3: Healer = CLASS_DRUID; break;
|
||||||
case 4: Healer = CLASS_SHAMAN; break;
|
case 4: Healer = CLASS_SHAMAN; break;
|
||||||
}
|
}
|
||||||
std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin();
|
std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin();
|
||||||
for (; i != m_creature->getThreatManager().getThreatList().end(); ++i)
|
for (; i != m_creature->getThreatManager().getThreatList().end(); ++i)
|
||||||
{
|
{
|
||||||
Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid());
|
Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid());
|
||||||
if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && pTemp->getClass() == Healer)
|
if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && pTemp->getClass() == Healer)
|
||||||
{
|
{
|
||||||
target = pTemp;
|
target = pTemp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (target)
|
if (target)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!target)
|
if (!target)
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
Crystalline_Tangler->AI()->AttackStart(target);
|
Crystalline_Tangler->AI()->AttackStart(target);
|
||||||
Crystalline_Tangler->getThreatManager().addThreat(target, 1000000000.0f);
|
Crystalline_Tangler->getThreatManager().addThreat(target, 1000000000.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer = 17000;
|
SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer = 17000;
|
||||||
}else SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer -=diff;
|
}else SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer -=diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_ORMOROK_EVENT, DONE);
|
pInstance->SetData(DATA_ORMOROK_EVENT, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit *victim)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_KILL, m_creature);
|
DoScriptText(SAY_KILL, m_creature);
|
||||||
}
|
}
|
||||||
@@ -210,67 +210,67 @@ struct TRINITY_DLL_DECL boss_ormorokAI : public ScriptedAI
|
|||||||
struct TRINITY_DLL_DECL mob_crystal_spikeAI : public Scripted_NoMovementAI
|
struct TRINITY_DLL_DECL mob_crystal_spikeAI : public Scripted_NoMovementAI
|
||||||
{
|
{
|
||||||
mob_crystal_spikeAI(Creature *c) : Scripted_NoMovementAI(c)
|
mob_crystal_spikeAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HeroicMode;
|
bool HeroicMode;
|
||||||
|
|
||||||
uint32 SPELL_CRYSTALL_SPIKE_DAMAGE_Timer;
|
uint32 SPELL_CRYSTALL_SPIKE_DAMAGE_Timer;
|
||||||
uint32 SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer;
|
uint32 SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
SPELL_CRYSTALL_SPIKE_DAMAGE_Timer = 3700;
|
SPELL_CRYSTALL_SPIKE_DAMAGE_Timer = 3700;
|
||||||
SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer = 1000;
|
SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer = 1000;
|
||||||
m_creature->SetLevel(80); //
|
m_creature->SetLevel(80); //
|
||||||
m_creature->setFaction(16); //Walkaround to be independent from data in DB
|
m_creature->setFaction(16); //Walkaround to be independent from data in DB
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); //
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); //
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer < diff)
|
if (SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_CRYSTAL_SPIKE_PREVISUAL);
|
DoCast(m_creature, SPELL_CRYSTAL_SPIKE_PREVISUAL);
|
||||||
SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer = 10000;
|
SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer = 10000;
|
||||||
}else SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer -=diff;
|
}else SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer -=diff;
|
||||||
|
|
||||||
if (SPELL_CRYSTALL_SPIKE_DAMAGE_Timer < diff)
|
if (SPELL_CRYSTALL_SPIKE_DAMAGE_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, HeroicMode ? SPELL_CRYSTALL_SPIKE_DAMAGE_H : SPELL_CRYSTALL_SPIKE_DAMAGE_N);
|
DoCast(m_creature, HeroicMode ? SPELL_CRYSTALL_SPIKE_DAMAGE_H : SPELL_CRYSTALL_SPIKE_DAMAGE_N);
|
||||||
SPELL_CRYSTALL_SPIKE_DAMAGE_Timer = 10000;
|
SPELL_CRYSTALL_SPIKE_DAMAGE_Timer = 10000;
|
||||||
}else SPELL_CRYSTALL_SPIKE_DAMAGE_Timer -=diff;
|
}else SPELL_CRYSTALL_SPIKE_DAMAGE_Timer -=diff;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_crystalline_tanglerAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_crystalline_tanglerAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_crystalline_tanglerAI(Creature *c) : ScriptedAI(c)
|
mob_crystalline_tanglerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 SPELL_ROOTS_Timer;
|
uint32 SPELL_ROOTS_Timer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
SPELL_ROOTS_Timer = 1000;
|
SPELL_ROOTS_Timer = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (SPELL_ROOTS_Timer < diff)
|
if (SPELL_ROOTS_Timer < diff)
|
||||||
{
|
{
|
||||||
if (m_creature->IsWithinDist(m_creature->getVictim(), 5.0f, false))
|
if (m_creature->IsWithinDist(m_creature->getVictim(), 5.0f, false))
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_ROOTS);
|
DoCast(m_creature->getVictim(), SPELL_ROOTS);
|
||||||
SPELL_ROOTS_Timer = 15000;
|
SPELL_ROOTS_Timer = 15000;
|
||||||
}
|
}
|
||||||
}else SPELL_ROOTS_Timer -=diff;
|
}else SPELL_ROOTS_Timer -=diff;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_mob_crystal_spike(Creature *_Creature)
|
CreatureAI* GetAI_mob_crystal_spike(Creature *_Creature)
|
||||||
|
|||||||
@@ -31,71 +31,71 @@ struct TRINITY_DLL_DECL instance_nexus : public ScriptedInstance
|
|||||||
instance_nexus(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
instance_nexus(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
||||||
|
|
||||||
std::string strInstData;
|
std::string strInstData;
|
||||||
uint64 Anomalus;
|
uint64 Anomalus;
|
||||||
uint32 Encounters[NUMBER_OF_ENCOUNTERS];
|
uint32 Encounters[NUMBER_OF_ENCOUNTERS];
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
Anomalus = 0;
|
Anomalus = 0;
|
||||||
for(uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; i++)
|
for(uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; i++)
|
||||||
Encounters[i] = NOT_STARTED;
|
Encounters[i] = NOT_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnCreatureCreate(Creature* pCreature, bool add)
|
void OnCreatureCreate(Creature* pCreature, bool add)
|
||||||
{
|
{
|
||||||
Map::PlayerList const& players = instance->GetPlayers();
|
Map::PlayerList const& players = instance->GetPlayers();
|
||||||
uint32 TeamInInstance;
|
uint32 TeamInInstance;
|
||||||
|
|
||||||
if (!players.isEmpty())
|
if (!players.isEmpty())
|
||||||
{
|
{
|
||||||
if (Player* pPlayer = players.begin()->getSource())
|
if (Player* pPlayer = players.begin()->getSource())
|
||||||
{
|
{
|
||||||
TeamInInstance = pPlayer->GetTeam();
|
TeamInInstance = pPlayer->GetTeam();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch(pCreature->GetEntry())
|
switch(pCreature->GetEntry())
|
||||||
{
|
{
|
||||||
case 26763: Anomalus = pCreature->GetGUID(); break;
|
case 26763: Anomalus = pCreature->GetGUID(); break;
|
||||||
case 26800:
|
case 26800:
|
||||||
{
|
{
|
||||||
//26799
|
//26799
|
||||||
pCreature->setFaction(16);
|
pCreature->setFaction(16);
|
||||||
if (TeamInInstance == ALLIANCE)
|
if (TeamInInstance == ALLIANCE)
|
||||||
pCreature->SetDisplayId(24358);
|
pCreature->SetDisplayId(24358);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 26802:
|
case 26802:
|
||||||
{
|
{
|
||||||
//26801
|
//26801
|
||||||
pCreature->setFaction(16);
|
pCreature->setFaction(16);
|
||||||
if (TeamInInstance == ALLIANCE)
|
if (TeamInInstance == ALLIANCE)
|
||||||
pCreature->SetDisplayId(24354);
|
pCreature->SetDisplayId(24354);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 26805:
|
case 26805:
|
||||||
{
|
{
|
||||||
//26803
|
//26803
|
||||||
pCreature->setFaction(16);
|
pCreature->setFaction(16);
|
||||||
if (TeamInInstance == ALLIANCE)
|
if (TeamInInstance == ALLIANCE)
|
||||||
pCreature->SetDisplayId(24357);
|
pCreature->SetDisplayId(24357);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 27949:
|
case 27949:
|
||||||
{
|
{
|
||||||
//27947
|
//27947
|
||||||
pCreature->setFaction(16);
|
pCreature->setFaction(16);
|
||||||
if (TeamInInstance == ALLIANCE)
|
if (TeamInInstance == ALLIANCE)
|
||||||
pCreature->SetDisplayId(24352);
|
pCreature->SetDisplayId(24352);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 26796:
|
case 26796:
|
||||||
{
|
{
|
||||||
//26798
|
//26798
|
||||||
pCreature->setFaction(16);
|
pCreature->setFaction(16);
|
||||||
if (TeamInInstance == ALLIANCE)
|
if (TeamInInstance == ALLIANCE)
|
||||||
pCreature->SetDisplayId(24352);
|
pCreature->SetDisplayId(24352);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,14 +109,14 @@ struct TRINITY_DLL_DECL instance_nexus : public ScriptedInstance
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GetData(uint32 identifier)
|
uint32 GetData(uint32 identifier)
|
||||||
{
|
{
|
||||||
switch(identifier)
|
switch(identifier)
|
||||||
{
|
{
|
||||||
case DATA_MAGUS_TELESTRA_EVENT: return Encounters[0];
|
case DATA_MAGUS_TELESTRA_EVENT: return Encounters[0];
|
||||||
case DATA_ANOMALUS_EVENT: return Encounters[1];
|
case DATA_ANOMALUS_EVENT: return Encounters[1];
|
||||||
case DATA_ORMOROK_EVENT: return Encounters[2];
|
case DATA_ORMOROK_EVENT: return Encounters[2];
|
||||||
case DATA_KERISTRASZA_FREED: return Encounters[3];
|
case DATA_KERISTRASZA_FREED: return Encounters[3];
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -128,10 +128,10 @@ struct TRINITY_DLL_DECL instance_nexus : public ScriptedInstance
|
|||||||
case DATA_MAGUS_TELESTRA_EVENT: Encounters[0] = data; break;
|
case DATA_MAGUS_TELESTRA_EVENT: Encounters[0] = data; break;
|
||||||
case DATA_ANOMALUS_EVENT: Encounters[1] = data; break;
|
case DATA_ANOMALUS_EVENT: Encounters[1] = data; break;
|
||||||
case DATA_ORMOROK_EVENT: Encounters[2] = data; break;
|
case DATA_ORMOROK_EVENT: Encounters[2] = data; break;
|
||||||
case DATA_KERISTRASZA_FREED: Encounters[3] = data; break;
|
case DATA_KERISTRASZA_FREED: Encounters[3] = data; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data == DONE)
|
if (data == DONE)
|
||||||
{
|
{
|
||||||
OUT_SAVE_INST_DATA;
|
OUT_SAVE_INST_DATA;
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL instance_nexus : public ScriptedInstance
|
|||||||
|
|
||||||
SaveToDB();
|
SaveToDB();
|
||||||
OUT_SAVE_INST_DATA_COMPLETE;
|
OUT_SAVE_INST_DATA_COMPLETE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetSaveData()
|
std::string GetSaveData()
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
|
|||||||
|
|
||||||
MograineGUID = 0;
|
MograineGUID = 0;
|
||||||
WhitemaneGUID = 0;
|
WhitemaneGUID = 0;
|
||||||
VorrelGUID = 0;
|
VorrelGUID = 0;
|
||||||
DoorHighInquisitorGUID = 0;
|
DoorHighInquisitorGUID = 0;
|
||||||
|
|
||||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||||
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
|
|||||||
case ENTRY_PUMPKIN: HorsemanAdds.insert(creature->GetGUID());break;
|
case ENTRY_PUMPKIN: HorsemanAdds.insert(creature->GetGUID());break;
|
||||||
case 3976: MograineGUID = creature->GetGUID(); break;
|
case 3976: MograineGUID = creature->GetGUID(); break;
|
||||||
case 3977: WhitemaneGUID = creature->GetGUID(); break;
|
case 3977: WhitemaneGUID = creature->GetGUID(); break;
|
||||||
case 3981: VorrelGUID = creature->GetGUID(); break;
|
case 3981: VorrelGUID = creature->GetGUID(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
|
|||||||
{
|
{
|
||||||
GameObject *Shrine = instance->GetGameObject(PumpkinShrineGUID);
|
GameObject *Shrine = instance->GetGameObject(PumpkinShrineGUID);
|
||||||
if(Shrine)
|
if(Shrine)
|
||||||
Shrine->SetGoState(GO_STATE_READY);
|
Shrine->SetGoState(GO_STATE_READY);
|
||||||
}break;
|
}break;
|
||||||
case DATA_HORSEMAN_EVENT:
|
case DATA_HORSEMAN_EVENT:
|
||||||
if (data == DONE)
|
if (data == DONE)
|
||||||
@@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
|
|||||||
HorsemanAdds.clear();
|
HorsemanAdds.clear();
|
||||||
GameObject *Shrine = instance->GetGameObject(PumpkinShrineGUID);
|
GameObject *Shrine = instance->GetGameObject(PumpkinShrineGUID);
|
||||||
if(Shrine)
|
if(Shrine)
|
||||||
Shrine->SetGoState(GO_STATE_READY);
|
Shrine->SetGoState(GO_STATE_READY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_huhuranAI : public ScriptedAI
|
|||||||
if (!Frenzy && Frenzy_Timer < diff)
|
if (!Frenzy && Frenzy_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_FRENZY);
|
DoCast(m_creature, SPELL_FRENZY);
|
||||||
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature);
|
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature);
|
||||||
Frenzy = true;
|
Frenzy = true;
|
||||||
PoisonBolt_Timer = 3000;
|
PoisonBolt_Timer = 3000;
|
||||||
Frenzy_Timer = 25000 + rand()%10000;
|
Frenzy_Timer = 25000 + rand()%10000;
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ UPDATE `creature_template` SET `ScriptName`='mob_archavon_warder' WHERE `entry`=
|
|||||||
#define SPELL_CRUSHING_LEAP HEROIC(58960,60894)//Instant (10-80yr range) -- Leaps at an enemy, inflicting 8000 Physical damage, knocking all nearby enemies away, and creating a cloud of choking debris.
|
#define SPELL_CRUSHING_LEAP HEROIC(58960,60894)//Instant (10-80yr range) -- Leaps at an enemy, inflicting 8000 Physical damage, knocking all nearby enemies away, and creating a cloud of choking debris.
|
||||||
#define SPELL_STOMP HEROIC(58663,60880)
|
#define SPELL_STOMP HEROIC(58663,60880)
|
||||||
#define SPELL_IMPALE HEROIC(58666,60882) //Lifts an enemy off the ground with a spiked fist, inflicting 47125 to 52875 Physical damage and 9425 to 10575 additional damage each second for 8 sec.
|
#define SPELL_IMPALE HEROIC(58666,60882) //Lifts an enemy off the ground with a spiked fist, inflicting 47125 to 52875 Physical damage and 9425 to 10575 additional damage each second for 8 sec.
|
||||||
#define SPELL_BERSERK 47008
|
#define SPELL_BERSERK 47008
|
||||||
//Spells Archavon Warders
|
//Spells Archavon Warders
|
||||||
#define SPELL_ROCK_SHOWER HEROIC(60919,60923)
|
#define SPELL_ROCK_SHOWER HEROIC(60919,60923)
|
||||||
#define SPELL_SHIELD_CRUSH HEROIC(60897,60899)
|
#define SPELL_SHIELD_CRUSH HEROIC(60897,60899)
|
||||||
#define SPELL_WHIRL HEROIC(60902,60916)
|
#define SPELL_WHIRL HEROIC(60902,60916)
|
||||||
|
|
||||||
//4 Warders spawned
|
//4 Warders spawned
|
||||||
#define ARCHAVON_WARDER 32353 //npc 32353
|
#define ARCHAVON_WARDER 32353 //npc 32353
|
||||||
@@ -30,16 +30,16 @@ UPDATE `creature_template` SET `ScriptName`='mob_archavon_warder' WHERE `entry`=
|
|||||||
//Yell
|
//Yell
|
||||||
#define SAY_LEAP "Archavon the Stone Watcher lunges for $N!" //$N should be the target
|
#define SAY_LEAP "Archavon the Stone Watcher lunges for $N!" //$N should be the target
|
||||||
|
|
||||||
#define EVENT_ROCK_SHARDS 1 //15s cd
|
#define EVENT_ROCK_SHARDS 1 //15s cd
|
||||||
#define EVENT_CHOKING_CLOUD 2 //30s cd
|
#define EVENT_CHOKING_CLOUD 2 //30s cd
|
||||||
#define EVENT_STOMP 3 //45s cd
|
#define EVENT_STOMP 3 //45s cd
|
||||||
#define EVENT_IMPALE 4
|
#define EVENT_IMPALE 4
|
||||||
#define EVENT_BERSERK 5 //300s cd
|
#define EVENT_BERSERK 5 //300s cd
|
||||||
|
|
||||||
//mob
|
//mob
|
||||||
#define EVENT_ROCK_SHOWER 5 //set = 20s cd,unkown cd
|
#define EVENT_ROCK_SHOWER 5 //set = 20s cd,unkown cd
|
||||||
#define EVENT_SHIELD_CRUSH 6 //set = 30s cd
|
#define EVENT_SHIELD_CRUSH 6 //set = 30s cd
|
||||||
#define EVENT_WHIRL 8 //set= 10s cd
|
#define EVENT_WHIRL 8 //set= 10s cd
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_archavonAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_archavonAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user