*Use dynamic cast for ai cast.
--HG-- branch : trunk
This commit is contained in:
@@ -17,9 +17,11 @@
|
|||||||
#ifdef USE_DYNAMIC_CAST
|
#ifdef USE_DYNAMIC_CAST
|
||||||
#define CAST_PLR(a) (dynamic_cast<Player*>(a))
|
#define CAST_PLR(a) (dynamic_cast<Player*>(a))
|
||||||
#define CAST_CRE(a) (dynamic_cast<Creature*>(a))
|
#define CAST_CRE(a) (dynamic_cast<Creature*>(a))
|
||||||
|
#define CAST_AI(a,b) (dynamic_cast<a*>(b))
|
||||||
#else
|
#else
|
||||||
#define CAST_PLR(a) (static_cast<Player*>(a))
|
#define CAST_PLR(a) (static_cast<Player*>(a))
|
||||||
#define CAST_CRE(a) (static_cast<Creature*>(a))
|
#define CAST_CRE(a) (static_cast<Creature*>(a))
|
||||||
|
#define CAST_AI(a,b) (static_cast<a*>(b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class ScriptedInstance;
|
class ScriptedInstance;
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ bool GossipSelect_example_escort(Player *player, Creature *_Creature, uint32 sen
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(true, true, true, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, true, player->GetGUID());
|
||||||
|
|
||||||
return true; // prevent mangos core handling
|
return true; // prevent mangos core handling
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ bool GossipSelect_example_escort(Player *player, Creature *_Creature, uint32 sen
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, false, false, player->GetGUID());
|
||||||
|
|
||||||
return true; // prevent mangos core handling
|
return true; // prevent mangos core handling
|
||||||
}
|
}
|
||||||
@@ -202,7 +202,7 @@ bool GossipSelect_example_escort(Player *player, Creature *_Creature, uint32 sen
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF+3)
|
if (action == GOSSIP_ACTION_INFO_DEF+3)
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(false, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, false, player->GetGUID());
|
||||||
|
|
||||||
return true; // prevent mangos core handling
|
return true; // prevent mangos core handling
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ CreatureAI* GetAI_npc_chicken_cluck(Creature *_Creature)
|
|||||||
bool QuestAccept_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest )
|
bool QuestAccept_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest )
|
||||||
{
|
{
|
||||||
if(_Quest->GetQuestId() == QUEST_CLUCK)
|
if(_Quest->GetQuestId() == QUEST_CLUCK)
|
||||||
((npc_chicken_cluckAI*)_Creature->AI())->Reset();
|
CAST_AI(npc_chicken_cluckAI, _Creature->AI())->Reset();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@ bool QuestAccept_npc_chicken_cluck(Player *player, Creature *_Creature, const Qu
|
|||||||
bool QuestComplete_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest)
|
bool QuestComplete_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest)
|
||||||
{
|
{
|
||||||
if(_Quest->GetQuestId() == QUEST_CLUCK)
|
if(_Quest->GetQuestId() == QUEST_CLUCK)
|
||||||
((npc_chicken_cluckAI*)_Creature->AI())->Reset();
|
CAST_AI(npc_chicken_cluckAI, _Creature->AI())->Reset();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -366,7 +366,7 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
|
|||||||
if (Doctorguid)
|
if (Doctorguid)
|
||||||
{
|
{
|
||||||
if(Creature* Doctor = Unit::GetCreature(*m_creature, Doctorguid))
|
if(Creature* Doctor = Unit::GetCreature(*m_creature, Doctorguid))
|
||||||
((npc_doctorAI*)Doctor->AI())->PatientSaved(m_creature, CAST_PLR(caster), Coord);
|
CAST_AI(npc_doctorAI, Doctor->AI())->PatientSaved(m_creature, CAST_PLR(caster), Coord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,7 +424,7 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
|
|||||||
if (Doctorguid)
|
if (Doctorguid)
|
||||||
{
|
{
|
||||||
if(Creature* Doctor = Unit::GetCreature((*m_creature), Doctorguid))
|
if(Creature* Doctor = Unit::GetCreature((*m_creature), Doctorguid))
|
||||||
((npc_doctorAI*)Doctor->AI())->PatientDied(Coord);
|
CAST_AI(npc_doctorAI, Doctor->AI())->PatientDied(Coord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -561,10 +561,10 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
|
|||||||
Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||||
|
|
||||||
Patients.push_back(Patient->GetGUID());
|
Patients.push_back(Patient->GetGUID());
|
||||||
((npc_injured_patientAI*)Patient->AI())->Doctorguid = m_creature->GetGUID();
|
CAST_AI(npc_injured_patientAI, Patient->AI())->Doctorguid = m_creature->GetGUID();
|
||||||
|
|
||||||
if (Point)
|
if (Point)
|
||||||
((npc_injured_patientAI*)Patient->AI())->Coord = Point;
|
CAST_AI(npc_injured_patientAI, Patient->AI())->Coord = Point;
|
||||||
|
|
||||||
Coordinates.erase(itr);
|
Coordinates.erase(itr);
|
||||||
}
|
}
|
||||||
@@ -577,7 +577,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
|
|||||||
bool QuestAccept_npc_doctor(Player *player, Creature *creature, Quest const *quest )
|
bool QuestAccept_npc_doctor(Player *player, Creature *creature, Quest const *quest )
|
||||||
{
|
{
|
||||||
if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
|
if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
|
||||||
((npc_doctorAI*)creature->AI())->BeginEvent(player);
|
CAST_AI(npc_doctorAI, creature->AI())->BeginEvent(player);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ bool QuestAccept_npc_professor_phizzlethorpe(Player* player, Creature* creature,
|
|||||||
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_PROGRESS_1, creature, player);
|
DoScriptText(SAY_PROGRESS_1, creature, player);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(false, false, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, false, player->GetGUID());
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ bool QuestAccept_npc_torek(Player* player, Creature* creature, Quest const* ques
|
|||||||
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
||||||
{
|
{
|
||||||
//TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?)
|
//TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?)
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, true, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, true, player->GetGUID());
|
||||||
DoScriptText(SAY_READY, creature, player);
|
DoScriptText(SAY_READY, creature, player);
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
}
|
}
|
||||||
@@ -244,7 +244,7 @@ bool QuestAccept_npc_ruul_snowhoof(Player* player, Creature* creature, Quest con
|
|||||||
if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
|
if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
|
||||||
{
|
{
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -206,7 +206,7 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
|||||||
if (Unit *target = Unit::GetUnit(*m_creature,soulholder))
|
if (Unit *target = Unit::GetUnit(*m_creature,soulholder))
|
||||||
{
|
{
|
||||||
|
|
||||||
((mob_stolen_soulAI*)summoned->AI())->SetMyClass(soulclass);
|
CAST_AI(mob_stolen_soulAI, summoned->AI())->SetMyClass(soulclass);
|
||||||
summoned->AI()->AttackStart(target);
|
summoned->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -291,7 +291,7 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit *Shaffar = me->FindNearestCreature(ENTRY_SHAFFAR, 100);
|
Unit *Shaffar = me->FindNearestCreature(ENTRY_SHAFFAR, 100);
|
||||||
if(Shaffar)
|
if(Shaffar)
|
||||||
((boss_nexusprince_shaffarAI*)(CAST_CRE(Shaffar)->AI()))->RemoveBeaconFromList(m_creature);
|
CAST_AI(boss_nexusprince_shaffarAI, (CAST_CRE(Shaffar)->AI()))->RemoveBeaconFromList(m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
|
|||||||
+1
-1
@@ -203,7 +203,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
void JustSummoned(Creature *summoned)
|
void JustSummoned(Creature *summoned)
|
||||||
{
|
{
|
||||||
if (summoned && summoned->GetEntry() == MOB_VOID_TRAVELER)
|
if (summoned && summoned->GetEntry() == MOB_VOID_TRAVELER)
|
||||||
((mob_voidtravelerAI*)summoned->AI())->Vorpil = m_creature;
|
CAST_AI(mob_voidtravelerAI, summoned->AI())->Vorpil = m_creature;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit *victim)
|
||||||
|
|||||||
@@ -417,8 +417,8 @@ bool GossipSelect_mob_rizzle_sprysprocket(Player *player, Creature *_Creature, u
|
|||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
_Creature->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true);
|
_Creature->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true);
|
||||||
((mob_rizzle_sprysprocketAI*)_Creature->AI())->Must_Die_Timer = 3000;
|
CAST_AI(mob_rizzle_sprysprocketAI, _Creature->AI())->Must_Die_Timer = 3000;
|
||||||
((mob_rizzle_sprysprocketAI*)_Creature->AI())->Must_Die = true;
|
CAST_AI(mob_rizzle_sprysprocketAI, _Creature->AI())->Must_Die = true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ bool GossipSelect_npc_engineer_spark_overgrind(Player *player, Creature *_Creatu
|
|||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
_Creature->setFaction(FACTION_HOSTILE);
|
_Creature->setFaction(FACTION_HOSTILE);
|
||||||
((npc_engineer_spark_overgrindAI*)_Creature->AI())->AttackStart(player);
|
CAST_AI(npc_engineer_spark_overgrindAI, _Creature->AI())->AttackStart(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -401,7 +401,7 @@ bool QuestAccept_npc_magwin(Player* player, Creature* creature, Quest const* que
|
|||||||
if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP)
|
if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP)
|
||||||
{
|
{
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ bool QuestAccept_npc_wizzlecrank_shredder(Player* player, Creature* creature, Qu
|
|||||||
if (quest->GetQuestId() == QUEST_ESCAPE)
|
if (quest->GetQuestId() == QUEST_ESCAPE)
|
||||||
{
|
{
|
||||||
creature->setFaction(FACTION_RATCHET);
|
creature->setFaction(FACTION_RATCHET);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1086,8 +1086,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
Illidan->SetInFront(m_creature);
|
Illidan->SetInFront(m_creature);
|
||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
Illidan->GetMotionMaster()->MoveIdle();
|
Illidan->GetMotionMaster()->MoveIdle();
|
||||||
((boss_illidan_stormrageAI*)Illidan->AI())->AkamaGUID = m_creature->GetGUID();
|
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->AkamaGUID = m_creature->GetGUID();
|
||||||
((boss_illidan_stormrageAI*)Illidan->AI())->EnterPhase(PHASE_TALK_SEQUENCE);
|
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->EnterPhase(PHASE_TALK_SEQUENCE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1138,7 +1138,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
else if(Phase == PHASE_TALK)
|
else if(Phase == PHASE_TALK)
|
||||||
{
|
{
|
||||||
if(GETCRE(Illidan, IllidanGUID))
|
if(GETCRE(Illidan, IllidanGUID))
|
||||||
((boss_illidan_stormrageAI*)Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
|
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
WalkCount++;
|
WalkCount++;
|
||||||
@@ -1191,7 +1191,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
case 0:
|
case 0:
|
||||||
if(GETCRE(Illidan, IllidanGUID))
|
if(GETCRE(Illidan, IllidanGUID))
|
||||||
{
|
{
|
||||||
((boss_illidan_stormrageAI*)Illidan->AI())->Timer[EVENT_TAUNT] += 30000;
|
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->Timer[EVENT_TAUNT] += 30000;
|
||||||
Illidan->MonsterYell(SAY_AKAMA_MINION, LANG_UNIVERSAL, 0);
|
Illidan->MonsterYell(SAY_AKAMA_MINION, LANG_UNIVERSAL, 0);
|
||||||
DoPlaySoundToSet(Illidan, SOUND_AKAMA_MINION);
|
DoPlaySoundToSet(Illidan, SOUND_AKAMA_MINION);
|
||||||
}
|
}
|
||||||
@@ -1481,7 +1481,7 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(GETCRE(Illidan, IllidanGUID))
|
if(GETCRE(Illidan, IllidanGUID))
|
||||||
{
|
{
|
||||||
Unit* target = ((boss_illidan_stormrageAI*)Illidan->AI())->SelectUnit(SELECT_TARGET_RANDOM, 0);
|
Unit* target = CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
|
||||||
if(!target || !m_creature->IsWithinDistInMap(target, 80) || Illidan->IsWithinDistInMap(target, 20))
|
if(!target || !m_creature->IsWithinDistInMap(target, 80) || Illidan->IsWithinDistInMap(target, 20))
|
||||||
{
|
{
|
||||||
@@ -1560,7 +1560,7 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
|
|||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
if(GETCRE(Illidan, IllidanGUID))
|
if(GETCRE(Illidan, IllidanGUID))
|
||||||
((boss_illidan_stormrageAI*)Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
|
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
|
||||||
m_creature->AttackStop();
|
m_creature->AttackStop();
|
||||||
Timer[EVENT_MAIEV_STEALTH] = 60000; //reappear after 1 minute
|
Timer[EVENT_MAIEV_STEALTH] = 60000; //reappear after 1 minute
|
||||||
MaxTimer = 1;
|
MaxTimer = 1;
|
||||||
@@ -1577,7 +1577,7 @@ bool GossipSelect_npc_akama_at_illidan(Player *player, Creature *_Creature, uint
|
|||||||
if(action == GOSSIP_ACTION_INFO_DEF) // Time to begin the Event
|
if(action == GOSSIP_ACTION_INFO_DEF) // Time to begin the Event
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_akama_illidanAI*)_Creature->AI())->EnterPhase(PHASE_CHANNEL);
|
CAST_AI(npc_akama_illidanAI, _Creature->AI())->EnterPhase(PHASE_CHANNEL);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1676,7 +1676,7 @@ bool GOHello_cage_trap(Player* plr, GameObject* go)
|
|||||||
cell_lock->Visit(cell_lock, cSearcher, *(plr->GetMap()));
|
cell_lock->Visit(cell_lock, cSearcher, *(plr->GetMap()));
|
||||||
|
|
||||||
if(trigger)
|
if(trigger)
|
||||||
((cage_trap_triggerAI*)trigger->AI())->Active = true;
|
CAST_AI(cage_trap_triggerAI, trigger->AI())->Active = true;
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
go->SetGoState(GO_STATE_ACTIVE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1812,9 +1812,9 @@ void boss_illidan_stormrageAI::Reset()
|
|||||||
Akama->Respawn();
|
Akama->Respawn();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
((npc_akama_illidanAI*)Akama->AI())->EnterEvadeMode();
|
CAST_AI(npc_akama_illidanAI, Akama->AI())->EnterEvadeMode();
|
||||||
Akama->GetMotionMaster()->MoveTargetedHome();
|
Akama->GetMotionMaster()->MoveTargetedHome();
|
||||||
((npc_akama_illidanAI*)Akama->AI())->Reset();
|
CAST_AI(npc_akama_illidanAI, Akama->AI())->Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AkamaGUID = 0;
|
AkamaGUID = 0;
|
||||||
@@ -1877,7 +1877,7 @@ void boss_illidan_stormrageAI::JustSummoned(Creature* summon)
|
|||||||
summon->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk
|
summon->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk
|
||||||
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
MaievGUID = summon->GetGUID();
|
MaievGUID = summon->GetGUID();
|
||||||
((boss_maievAI*)summon->AI())->GetIllidanGUID(m_creature->GetGUID());
|
CAST_AI(boss_maievAI, summon->AI())->GetIllidanGUID(m_creature->GetGUID());
|
||||||
summon->AI()->DoAction(PHASE_TALK_SEQUENCE);
|
summon->AI()->DoAction(PHASE_TALK_SEQUENCE);
|
||||||
}break;
|
}break;
|
||||||
case FLAME_OF_AZZINOTH:
|
case FLAME_OF_AZZINOTH:
|
||||||
@@ -1907,7 +1907,7 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
|
|||||||
{
|
{
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->AddThreat(Akama, 100.0f);
|
m_creature->AddThreat(Akama, 100.0f);
|
||||||
((npc_akama_illidanAI*)Akama->AI())->EnterPhase(PHASE_FIGHT_ILLIDAN);
|
CAST_AI(npc_akama_illidanAI, Akama->AI())->EnterPhase(PHASE_FIGHT_ILLIDAN);
|
||||||
EnterPhase(PHASE_NORMAL);
|
EnterPhase(PHASE_NORMAL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2026,7 +2026,7 @@ void boss_illidan_stormrageAI::SummonFlamesOfAzzinoth()
|
|||||||
Flame->setFaction(m_creature->getFaction()); // Just in case the database has it as a different faction
|
Flame->setFaction(m_creature->getFaction()); // Just in case the database has it as a different faction
|
||||||
Flame->SetMeleeDamageSchool(SPELL_SCHOOL_FIRE);
|
Flame->SetMeleeDamageSchool(SPELL_SCHOOL_FIRE);
|
||||||
FlameGUID[i] = Flame->GetGUID(); // Record GUID in order to check if they're dead later on to move to the next phase
|
FlameGUID[i] = Flame->GetGUID(); // Record GUID in order to check if they're dead later on to move to the next phase
|
||||||
((flame_of_azzinothAI*)Flame->AI())->SetGlaiveGUID(GlaiveGUID[i]);
|
CAST_AI(flame_of_azzinothAI, Flame->AI())->SetGlaiveGUID(GlaiveGUID[i]);
|
||||||
Glaive->CastSpell(Flame, SPELL_AZZINOTH_CHANNEL, false); // Glaives do some random Beam type channel on it.
|
Glaive->CastSpell(Flame, SPELL_AZZINOTH_CHANNEL, false); // Glaives do some random Beam type channel on it.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
if(!Soul) return false;
|
if(!Soul) return false;
|
||||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
{
|
{
|
||||||
((npc_enslaved_soulAI*)Soul->AI())->ReliquaryGUID = m_creature->GetGUID();
|
CAST_AI(npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = m_creature->GetGUID();
|
||||||
Soul->AI()->AttackStart(target);
|
Soul->AI()->AttackStart(target);
|
||||||
}else EnterEvadeMode();
|
}else EnterEvadeMode();
|
||||||
return true;
|
return true;
|
||||||
@@ -629,7 +629,7 @@ void npc_enslaved_soulAI::JustDied(Unit *killer)
|
|||||||
{
|
{
|
||||||
Creature* Reliquary = (Unit::GetCreature((*m_creature), ReliquaryGUID));
|
Creature* Reliquary = (Unit::GetCreature((*m_creature), ReliquaryGUID));
|
||||||
if(Reliquary)
|
if(Reliquary)
|
||||||
((boss_reliquary_of_soulsAI*)Reliquary->AI())->SoulDeathCount++;
|
CAST_AI(boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount++;
|
||||||
}
|
}
|
||||||
DoCast(m_creature, SPELL_SOUL_RELEASE, true);
|
DoCast(m_creature, SPELL_SOUL_RELEASE, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
Creature* Sorcerer = m_creature->SummonCreature(CREATURE_SORCERER, X, Y, Z_SPAWN, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
Creature* Sorcerer = m_creature->SummonCreature(CREATURE_SORCERER, X, Y, Z_SPAWN, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||||
if(Sorcerer)
|
if(Sorcerer)
|
||||||
{
|
{
|
||||||
((mob_ashtongue_sorcererAI*)Sorcerer->AI())->ShadeGUID = m_creature->GetGUID();
|
CAST_AI(mob_ashtongue_sorcererAI, Sorcerer->AI())->ShadeGUID = m_creature->GetGUID();
|
||||||
Sorcerer->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
Sorcerer->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
Sorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
|
Sorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
|
||||||
Sorcerer->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
|
Sorcerer->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
|
||||||
@@ -354,7 +354,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
for(std::list<Creature*>::iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
|
for(std::list<Creature*>::iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
|
||||||
{
|
{
|
||||||
((mob_ashtongue_channelerAI*)(*itr)->AI())->ShadeGUID = m_creature->GetGUID();
|
CAST_AI(mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = m_creature->GetGUID();
|
||||||
Channelers.push_back((*itr)->GetGUID());
|
Channelers.push_back((*itr)->GetGUID());
|
||||||
debug_log("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
|
debug_log("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
|
||||||
}
|
}
|
||||||
@@ -489,7 +489,7 @@ void mob_ashtongue_channelerAI::JustDied(Unit* killer)
|
|||||||
{
|
{
|
||||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||||
if(Shade && Shade->isAlive())
|
if(Shade && Shade->isAlive())
|
||||||
((boss_shade_of_akamaAI*)Shade->AI())->IncrementDeathCount();
|
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount();
|
||||||
else error_log("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
|
else error_log("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ void mob_ashtongue_sorcererAI::JustDied(Unit* killer)
|
|||||||
{
|
{
|
||||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||||
if(Shade && Shade->isAlive())
|
if(Shade && Shade->isAlive())
|
||||||
((boss_shade_of_akamaAI*)Shade->AI())->IncrementDeathCount(m_creature->GetGUID());
|
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(m_creature->GetGUID());
|
||||||
else error_log("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
|
else error_log("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,8 +572,8 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, IN_PROGRESS);
|
||||||
// Prevent players from trying to restart event
|
// Prevent players from trying to restart event
|
||||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
((boss_shade_of_akamaAI*)Shade->AI())->SetAkamaGUID(m_creature->GetGUID());
|
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->SetAkamaGUID(m_creature->GetGUID());
|
||||||
((boss_shade_of_akamaAI*)Shade->AI())->SetSelectableChannelers();
|
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->SetSelectableChannelers();
|
||||||
Shade->AddThreat(m_creature, 1000000.0f);
|
Shade->AddThreat(m_creature, 1000000.0f);
|
||||||
m_creature->CombatStart(Shade);
|
m_creature->CombatStart(Shade);
|
||||||
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||||
@@ -621,7 +621,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
HasYelledOnce = false;
|
HasYelledOnce = false;
|
||||||
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
||||||
if(Shade && Shade->isAlive())
|
if(Shade && Shade->isAlive())
|
||||||
((boss_shade_of_akamaAI*)Shade->AI())->HasKilledAkama = true;
|
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -640,7 +640,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||||
if(Shade && Shade->isAlive())
|
if(Shade && Shade->isAlive())
|
||||||
{
|
{
|
||||||
if(((boss_shade_of_akamaAI*)Shade->AI())->IsBanished)
|
if(CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IsBanished)
|
||||||
{
|
{
|
||||||
if(CastSoulRetrieveTimer < diff)
|
if(CastSoulRetrieveTimer < diff)
|
||||||
{
|
{
|
||||||
@@ -816,7 +816,7 @@ bool GossipSelect_npc_akama(Player *player, Creature *_Creature, uint32 sender,
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_akamaAI*)_Creature->AI())->BeginEvent(player);
|
CAST_AI(npc_akamaAI, _Creature->AI())->BeginEvent(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true);
|
Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true);
|
||||||
SetThreatList(Construct); // Use same function as Doom Blossom to set Threat List.
|
SetThreatList(Construct); // Use same function as Doom Blossom to set Threat List.
|
||||||
((mob_shadowy_constructAI*)Construct->AI())->GhostGUID = GhostGUID;
|
CAST_AI(mob_shadowy_constructAI, Construct->AI())->GhostGUID = GhostGUID;
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||||
if(!target) // someone's trying to solo.
|
if(!target) // someone's trying to solo.
|
||||||
target = m_creature->getVictim();
|
target = m_creature->getVictim();
|
||||||
@@ -430,7 +430,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
|||||||
DoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
DoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
DoomBlossom->setFaction(m_creature->getFaction());
|
DoomBlossom->setFaction(m_creature->getFaction());
|
||||||
DoomBlossom->AddThreat(target, 1.0f);
|
DoomBlossom->AddThreat(target, 1.0f);
|
||||||
((mob_doom_blossomAI*)DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID());
|
CAST_AI(mob_doom_blossomAI, DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID());
|
||||||
target->CombatStart(DoomBlossom);
|
target->CombatStart(DoomBlossom);
|
||||||
SetThreatList(DoomBlossom);
|
SetThreatList(DoomBlossom);
|
||||||
SummonDoomBlossomTimer = 35000;
|
SummonDoomBlossomTimer = 35000;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ bool GOHello_go_najentus_spine(Player *player, GameObject* _GO)
|
|||||||
{
|
{
|
||||||
if(ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData())
|
if(ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData())
|
||||||
if(Creature* Najentus = Unit::GetCreature(*_GO, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
|
if(Creature* Najentus = Unit::GetCreature(*_GO, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
|
||||||
if(((boss_najentusAI*)Najentus->AI())->RemoveImpalingSpine())
|
if(CAST_AI(boss_najentusAI, Najentus->AI())->RemoveImpalingSpine())
|
||||||
{
|
{
|
||||||
player->CastSpell(player, SPELL_CREATE_NAJENTUS_SPINE, true);
|
player->CastSpell(player, SPELL_CREATE_NAJENTUS_SPINE, true);
|
||||||
_GO->SetLootState(GO_NOT_READY);
|
_GO->SetLootState(GO_NOT_READY);
|
||||||
|
|||||||
@@ -261,8 +261,8 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
|||||||
// Start the event for the Voice Trigger
|
// Start the event for the Voice Trigger
|
||||||
if(Creature* VoiceTrigger = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
|
if(Creature* VoiceTrigger = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
|
||||||
{
|
{
|
||||||
((mob_blood_elf_council_voice_triggerAI*)VoiceTrigger->AI())->LoadCouncilGUIDs();
|
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->LoadCouncilGUIDs();
|
||||||
((mob_blood_elf_council_voice_triggerAI*)VoiceTrigger->AI())->EventStarted = true;
|
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->EventStarted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
@@ -366,7 +366,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Creature* Controller = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ILLIDARICOUNCIL)));
|
Creature* Controller = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ILLIDARICOUNCIL)));
|
||||||
if(Controller)
|
if(Controller)
|
||||||
((mob_illidari_councilAI*)Controller->AI())->StartEvent(who);
|
CAST_AI(mob_illidari_councilAI, Controller->AI())->StartEvent(who);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, true, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, false, true, player->GetGUID());
|
||||||
_Creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
_Creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
||||||
}
|
}
|
||||||
@@ -751,7 +751,7 @@ bool QuestAccept_npc_marshal_windsor(Player *player, Creature *creature, Quest c
|
|||||||
{PlayerStart = player;
|
{PlayerStart = player;
|
||||||
if( pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED )
|
if( pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED )
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
||||||
creature->setFaction(11);
|
creature->setFaction(11);
|
||||||
}
|
}
|
||||||
@@ -1059,7 +1059,7 @@ bool GossipSelect_npc_tobias_seecher(Player *player, Creature *_Creature, uint32
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, true, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, false, true, player->GetGUID());
|
||||||
_Creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
_Creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_IN_PROGRESS);
|
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_IN_PROGRESS);
|
||||||
}
|
}
|
||||||
@@ -1197,7 +1197,7 @@ bool ChooseReward_npc_rocknot(Player *player, Creature *_Creature, const Quest *
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_GOT_BEER, _Creature);
|
DoScriptText(SAY_GOT_BEER, _Creature);
|
||||||
_Creature->CastSpell(_Creature,SPELL_DRUNKEN_RAGE,false);
|
_Creature->CastSpell(_Creature,SPELL_DRUNKEN_RAGE,false);
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, false);
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ void SendDefaultMenu_boss_vael(Player *player, Creature *_Creature, uint32 actio
|
|||||||
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((boss_vaelAI*)_Creature->AI())->BeginSpeach((Unit*)player);
|
CAST_AI(boss_vaelAI, _Creature->AI())->BeginSpeach((Unit*)player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ bool GossipSelect_boss_victor_nefarius(Player *player, Creature *_Creature, uint
|
|||||||
case GOSSIP_ACTION_INFO_DEF+3:
|
case GOSSIP_ACTION_INFO_DEF+3:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
DoScriptText(SAY_GAMESBEGIN_1, _Creature);
|
DoScriptText(SAY_GAMESBEGIN_1, _Creature);
|
||||||
((boss_victor_nefariusAI*)_Creature->AI())->BeginEvent(player);
|
CAST_AI(boss_victor_nefariusAI, _Creature->AI())->BeginEvent(player);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
|
|||||||
if (Wisp)
|
if (Wisp)
|
||||||
{
|
{
|
||||||
Wisp->AI()->AttackStart(m_creature);
|
Wisp->AI()->AttackStart(m_creature);
|
||||||
((mob_ancient_wispAI*)Wisp->AI())->ArchimondeGUID = m_creature->GetGUID();
|
CAST_AI(mob_ancient_wispAI, Wisp->AI())->ArchimondeGUID = m_creature->GetGUID();
|
||||||
}
|
}
|
||||||
SummonWispTimer = 1500;
|
SummonWispTimer = 1500;
|
||||||
++WispCount;
|
++WispCount;
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
|||||||
{//summon at tower
|
{//summon at tower
|
||||||
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_NEAR_TOWER][0]+irand(-20,20), SpawnPointSpecial[SPAWN_NEAR_TOWER][1]+irand(-20,20), SpawnPointSpecial[SPAWN_NEAR_TOWER][2]+irand(-10,10), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_NEAR_TOWER][0]+irand(-20,20), SpawnPointSpecial[SPAWN_NEAR_TOWER][1]+irand(-20,20), SpawnPointSpecial[SPAWN_NEAR_TOWER][2]+irand(-10,10), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||||
if(pCreature)
|
if(pCreature)
|
||||||
((hyjal_trashAI*)pCreature->AI())->useFlyPath = true;
|
CAST_AI(hyjal_trashAI, pCreature->AI())->useFlyPath = true;
|
||||||
}else{//summon at gate
|
}else{//summon at gate
|
||||||
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_GARG_GATE][0]+irand(-10,10), SpawnPointSpecial[SPAWN_GARG_GATE][1]+irand(-10,10), SpawnPointSpecial[SPAWN_GARG_GATE][2]+irand(-10,10), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_GARG_GATE][0]+irand(-10,10), SpawnPointSpecial[SPAWN_GARG_GATE][1]+irand(-10,10), SpawnPointSpecial[SPAWN_GARG_GATE][2]+irand(-10,10), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||||
}
|
}
|
||||||
@@ -474,7 +474,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
|||||||
}else{
|
}else{
|
||||||
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_NEAR_TOWER][0], SpawnPointSpecial[SPAWN_NEAR_TOWER][1],SpawnPointSpecial[SPAWN_NEAR_TOWER][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_NEAR_TOWER][0], SpawnPointSpecial[SPAWN_NEAR_TOWER][1],SpawnPointSpecial[SPAWN_NEAR_TOWER][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||||
if(pCreature)
|
if(pCreature)
|
||||||
((hyjal_trashAI*)pCreature->AI())->useFlyPath = true;
|
CAST_AI(hyjal_trashAI, pCreature->AI())->useFlyPath = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 17908: //GIANT_INFERNAL
|
case 17908: //GIANT_INFERNAL
|
||||||
@@ -510,7 +510,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
|||||||
case ANETHERON:
|
case ANETHERON:
|
||||||
case KAZROGAL:
|
case KAZROGAL:
|
||||||
case AZGALOR:
|
case AZGALOR:
|
||||||
((hyjal_trashAI*)pCreature->AI())->IsEvent = true;
|
CAST_AI(hyjal_trashAI, pCreature->AI())->IsEvent = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
@@ -682,7 +682,7 @@ void hyjalAI::Retreat()
|
|||||||
if(JainaDummy)
|
if(JainaDummy)
|
||||||
{
|
{
|
||||||
JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
((hyjalAI*)JainaDummy->AI())->IsDummy = true;
|
CAST_AI(hyjalAI, JainaDummy->AI())->IsDummy = true;
|
||||||
DummyGuid = JainaDummy->GetGUID();
|
DummyGuid = JainaDummy->GetGUID();
|
||||||
}
|
}
|
||||||
AddWaypoint(0,JainaDummySpawn[1][0],JainaDummySpawn[1][1],JainaDummySpawn[1][2]);
|
AddWaypoint(0,JainaDummySpawn[1][0],JainaDummySpawn[1][1],JainaDummySpawn[1][2]);
|
||||||
@@ -1000,8 +1000,8 @@ void hyjalAI::WaypointReached(uint32 i)
|
|||||||
Unit* Dummy = Unit::GetUnit((*m_creature),DummyGuid);
|
Unit* Dummy = Unit::GetUnit((*m_creature),DummyGuid);
|
||||||
if(Dummy)
|
if(Dummy)
|
||||||
{
|
{
|
||||||
((hyjalAI*)CAST_CRE(Dummy)->AI())->DoMassTeleport = true;
|
CAST_AI(hyjalAI, CAST_CRE(Dummy)->AI())->DoMassTeleport = true;
|
||||||
((hyjalAI*)CAST_CRE(Dummy)->AI())->MassTeleportTimer = 20000;
|
CAST_AI(hyjalAI, CAST_CRE(Dummy)->AI())->MassTeleportTimer = 20000;
|
||||||
Dummy->CastSpell(m_creature,SPELL_MASS_TELEPORT,false);
|
Dummy->CastSpell(m_creature,SPELL_MASS_TELEPORT,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1100,9 +1100,9 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
Creature* pUnit = m_creature->SummonCreature(GHOUL, AllianceBase[r][0]+irand(-15,15), AllianceBase[r][1]+irand(-15,15), AllianceBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
Creature* pUnit = m_creature->SummonCreature(GHOUL, AllianceBase[r][0]+irand(-15,15), AllianceBase[r][1]+irand(-15,15), AllianceBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
||||||
if(pUnit)
|
if(pUnit)
|
||||||
{
|
{
|
||||||
((hyjal_trashAI*)pUnit->AI())->faction = Faction;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->faction = Faction;
|
||||||
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->IsOverrun = true;
|
||||||
((hyjal_trashAI*)pUnit->AI())->OverrunType = i;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->OverrunType = i;
|
||||||
pUnit->setActive(true);
|
pUnit->setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1112,9 +1112,9 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
Creature* pUnit = m_creature->SummonCreature(ABOMINATION, AllianceBase[r][0]+irand(-15,15), AllianceBase[r][1]+irand(-15,15), AllianceBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
Creature* pUnit = m_creature->SummonCreature(ABOMINATION, AllianceBase[r][0]+irand(-15,15), AllianceBase[r][1]+irand(-15,15), AllianceBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
||||||
if(pUnit)
|
if(pUnit)
|
||||||
{
|
{
|
||||||
((hyjal_trashAI*)pUnit->AI())->faction = Faction;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->faction = Faction;
|
||||||
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->IsOverrun = true;
|
||||||
((hyjal_trashAI*)pUnit->AI())->OverrunType = i;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->OverrunType = i;
|
||||||
pUnit->setActive(true);
|
pUnit->setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1124,9 +1124,9 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
if(pUnit)
|
if(pUnit)
|
||||||
{
|
{
|
||||||
pUnit->SetHomePosition(AllianceOverrunGargPos[i][0], AllianceOverrunGargPos[i][1], AllianceOverrunGargPos[i][2], AllianceOverrunGargPos[i][3]);
|
pUnit->SetHomePosition(AllianceOverrunGargPos[i][0], AllianceOverrunGargPos[i][1], AllianceOverrunGargPos[i][2], AllianceOverrunGargPos[i][3]);
|
||||||
((hyjal_trashAI*)pUnit->AI())->faction = Faction;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->faction = Faction;
|
||||||
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->IsOverrun = true;
|
||||||
((hyjal_trashAI*)pUnit->AI())->OverrunType = i;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->OverrunType = i;
|
||||||
pUnit->setActive(true);
|
pUnit->setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1141,9 +1141,9 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
if(pUnit)
|
if(pUnit)
|
||||||
{
|
{
|
||||||
pUnit->SetHomePosition(InfernalSPWP[i][0], InfernalSPWP[i][1], InfernalSPWP[i][2], InfernalSPWP[i][3]);
|
pUnit->SetHomePosition(InfernalSPWP[i][0], InfernalSPWP[i][1], InfernalSPWP[i][2], InfernalSPWP[i][3]);
|
||||||
((hyjal_trashAI*)pUnit->AI())->faction = Faction;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->faction = Faction;
|
||||||
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->IsOverrun = true;
|
||||||
((hyjal_trashAI*)pUnit->AI())->OverrunType = i;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->OverrunType = i;
|
||||||
pUnit->setActive(true);
|
pUnit->setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1153,9 +1153,9 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
Creature* pUnit = m_creature->SummonCreature(GHOUL, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
Creature* pUnit = m_creature->SummonCreature(GHOUL, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
||||||
if(pUnit)
|
if(pUnit)
|
||||||
{
|
{
|
||||||
((hyjal_trashAI*)pUnit->AI())->faction = Faction;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->faction = Faction;
|
||||||
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->IsOverrun = true;
|
||||||
((hyjal_trashAI*)pUnit->AI())->OverrunType = i;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->OverrunType = i;
|
||||||
pUnit->setActive(true);
|
pUnit->setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1165,9 +1165,9 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
|||||||
Creature* pUnit = m_creature->SummonCreature(ABOMINATION, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
Creature* pUnit = m_creature->SummonCreature(ABOMINATION, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
|
||||||
if(pUnit)
|
if(pUnit)
|
||||||
{
|
{
|
||||||
((hyjal_trashAI*)pUnit->AI())->faction = Faction;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->faction = Faction;
|
||||||
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->IsOverrun = true;
|
||||||
((hyjal_trashAI*)pUnit->AI())->OverrunType = i;
|
CAST_AI(hyjal_trashAI, pUnit->AI())->OverrunType = i;
|
||||||
pUnit->setActive(true);
|
pUnit->setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1147,7 +1147,7 @@ struct mob_frost_wyrmAI : public hyjal_trashAI
|
|||||||
hyjal_trashAI::UpdateAI(diff);
|
hyjal_trashAI::UpdateAI(diff);
|
||||||
if(IsEvent || IsOverrun)
|
if(IsEvent || IsOverrun)
|
||||||
{
|
{
|
||||||
((hyjal_trashAI*)m_creature->AI())->SetCanMelee(false);
|
CAST_AI(hyjal_trashAI, m_creature->AI())->SetCanMelee(false);
|
||||||
npc_escortAI::UpdateAI(diff);
|
npc_escortAI::UpdateAI(diff);
|
||||||
}
|
}
|
||||||
if (IsEvent)
|
if (IsEvent)
|
||||||
@@ -1259,7 +1259,7 @@ struct mob_gargoyleAI : public hyjal_trashAI
|
|||||||
hyjal_trashAI::UpdateAI(diff);
|
hyjal_trashAI::UpdateAI(diff);
|
||||||
if(IsEvent || IsOverrun)
|
if(IsEvent || IsOverrun)
|
||||||
{
|
{
|
||||||
((hyjal_trashAI*)m_creature->AI())->SetCanMelee(false);
|
CAST_AI(hyjal_trashAI, m_creature->AI())->SetCanMelee(false);
|
||||||
npc_escortAI::UpdateAI(diff);
|
npc_escortAI::UpdateAI(diff);
|
||||||
}
|
}
|
||||||
if (IsEvent)
|
if (IsEvent)
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
|||||||
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
||||||
{
|
{
|
||||||
if (Creature* Taretha = (Unit::GetCreature(*m_creature, TarethaGUID)))
|
if (Creature* Taretha = (Unit::GetCreature(*m_creature, TarethaGUID)))
|
||||||
((npc_escortAI*)(Taretha->AI()))->Start(false, false, true, PlayerGUID);
|
CAST_AI(npc_escortAI, (Taretha->AI()))->Start(false, false, true, PlayerGUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
//kill credit creature for quest
|
//kill credit creature for quest
|
||||||
@@ -536,10 +536,10 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature,
|
|||||||
|
|
||||||
DoScriptText(SAY_TH_START_EVENT_PART1, _Creature);
|
DoScriptText(SAY_TH_START_EVENT_PART1, _Creature);
|
||||||
|
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(true, true, true, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, true, player->GetGUID());
|
||||||
((npc_escortAI*)(_Creature->AI()))->SetMaxPlayerDistance(100.0f);//not really needed, because it will not despawn if player is too far
|
CAST_AI(npc_escortAI, (_Creature->AI()))->SetMaxPlayerDistance(100.0f);//not really needed, because it will not despawn if player is too far
|
||||||
((npc_escortAI*)(_Creature->AI()))->SetDespawnAtEnd(false);
|
CAST_AI(npc_escortAI, (_Creature->AI()))->SetDespawnAtEnd(false);
|
||||||
((npc_escortAI*)(_Creature->AI()))->SetDespawnAtFar(false);
|
CAST_AI(npc_escortAI, (_Creature->AI()))->SetDespawnAtFar(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GOSSIP_ACTION_INFO_DEF+2:
|
case GOSSIP_ACTION_INFO_DEF+2:
|
||||||
@@ -555,14 +555,14 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature,
|
|||||||
|
|
||||||
DoScriptText(SAY_TH_START_EVENT_PART2, _Creature);
|
DoScriptText(SAY_TH_START_EVENT_PART2, _Creature);
|
||||||
|
|
||||||
((npc_thrall_old_hillsbradAI*)_Creature->AI())->StartWP();
|
CAST_AI(npc_thrall_old_hillsbradAI, _Creature->AI())->StartWP();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GOSSIP_ACTION_INFO_DEF+3:
|
case GOSSIP_ACTION_INFO_DEF+3:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(TYPE_THRALL_PART3,IN_PROGRESS);
|
pInstance->SetData(TYPE_THRALL_PART3,IN_PROGRESS);
|
||||||
((npc_thrall_old_hillsbradAI*)_Creature->AI())->StartWP();
|
CAST_AI(npc_thrall_old_hillsbradAI, _Creature->AI())->StartWP();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -649,7 +649,7 @@ bool GossipSelect_npc_taretha(Player *player, Creature *_Creature, uint32 sender
|
|||||||
{
|
{
|
||||||
Creature* Thrall = (Unit::GetCreature((*_Creature), ThrallGUID));
|
Creature* Thrall = (Unit::GetCreature((*_Creature), ThrallGUID));
|
||||||
if(Thrall)
|
if(Thrall)
|
||||||
((npc_thrall_old_hillsbradAI*)Thrall->AI())->StartWP();
|
CAST_AI(npc_thrall_old_hillsbradAI, Thrall->AI())->StartWP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -349,8 +349,8 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
|||||||
Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
||||||
|
|
||||||
if (Karathress)
|
if (Karathress)
|
||||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath();
|
||||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
|||||||
|
|
||||||
if (Karathress)
|
if (Karathress)
|
||||||
if(!m_creature->isAlive() && Karathress)
|
if(!m_creature->isAlive() && Karathress)
|
||||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventTidalvessDeath();
|
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -594,7 +594,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
|||||||
|
|
||||||
if (Karathress)
|
if (Karathress)
|
||||||
if(!m_creature->isAlive() && Karathress)
|
if(!m_creature->isAlive() && Karathress)
|
||||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventCaribdisDeath();
|
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -590,7 +590,7 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
|||||||
uint32 move;
|
uint32 move;
|
||||||
uint32 phase;
|
uint32 phase;
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
Unit *Vashj;
|
Creature *Vashj;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -619,7 +619,7 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
Vashj = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who) { return; }
|
void EnterCombat(Unit *who) { return; }
|
||||||
@@ -672,7 +672,7 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
|||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(((boss_lady_vashjAI*)CAST_CRE(Vashj)->AI())->InCombat == false || ((boss_lady_vashjAI*)CAST_CRE(Vashj)->AI())->Phase != 2 || Vashj->isDead())
|
if(CAST_AI(boss_lady_vashjAI, Vashj->AI())->InCombat == false || CAST_AI(boss_lady_vashjAI, Vashj->AI())->Phase != 2 || Vashj->isDead())
|
||||||
{
|
{
|
||||||
//call Unsummon()
|
//call Unsummon()
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
@@ -710,7 +710,7 @@ struct TRINITY_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
|
|||||||
Vashj = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)));
|
Vashj = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||||
|
|
||||||
if(Vashj)
|
if(Vashj)
|
||||||
((boss_lady_vashjAI*)Vashj->AI())->EventTaintedElementalDeath();
|
CAST_AI(boss_lady_vashjAI, Vashj->AI())->EventTaintedElementalDeath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -827,7 +827,7 @@ struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
|
|||||||
//check if vashj is death
|
//check if vashj is death
|
||||||
Unit *Vashj = NULL;
|
Unit *Vashj = NULL;
|
||||||
Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
||||||
if(!Vashj || (Vashj && !Vashj->isAlive()) || (Vashj && ((boss_lady_vashjAI*)CAST_CRE(Vashj)->AI())->Phase != 3))
|
if(!Vashj || (Vashj && !Vashj->isAlive()) || (Vashj && CAST_AI(boss_lady_vashjAI, CAST_CRE(Vashj)->AI())->Phase != 3))
|
||||||
{
|
{
|
||||||
//remove
|
//remove
|
||||||
m_creature->setDeathState(DEAD);
|
m_creature->setDeathState(DEAD);
|
||||||
@@ -938,7 +938,7 @@ bool ItemUse_item_tainted_core(Player *player, Item* _Item, SpellCastTargets con
|
|||||||
|
|
||||||
Creature *Vashj = NULL;
|
Creature *Vashj = NULL;
|
||||||
Vashj = (Unit::GetCreature((*player), pInstance->GetData64(DATA_LADYVASHJ)));
|
Vashj = (Unit::GetCreature((*player), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||||
if(Vashj && ((boss_lady_vashjAI*)Vashj->AI())->Phase == 2)
|
if(Vashj && CAST_AI(boss_lady_vashjAI, Vashj->AI())->Phase == 2)
|
||||||
{
|
{
|
||||||
if(targets.getGOTarget() && targets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT)
|
if(targets.getGOTarget() && targets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT)
|
||||||
{
|
{
|
||||||
@@ -974,7 +974,7 @@ bool ItemUse_item_tainted_core(Player *player, Item* _Item, SpellCastTargets con
|
|||||||
|
|
||||||
//get and remove channel
|
//get and remove channel
|
||||||
Unit *Channel = NULL;
|
Unit *Channel = NULL;
|
||||||
Channel = Unit::GetUnit((*Vashj), ((boss_lady_vashjAI*)Vashj->AI())->ShieldGeneratorChannel[channel_identifier]);
|
Channel = Unit::GetCreature(*Vashj, CAST_AI(boss_lady_vashjAI, Vashj->AI())->ShieldGeneratorChannel[channel_identifier]);
|
||||||
if(Channel)
|
if(Channel)
|
||||||
{
|
{
|
||||||
//call Unsummon()
|
//call Unsummon()
|
||||||
|
|||||||
+1
-1
@@ -664,7 +664,7 @@ struct TRINITY_DLL_DECL mob_greyheart_spellbinderAI : public ScriptedAI
|
|||||||
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
|
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
|
||||||
Creature *leotheras = (Creature *)Unit::GetUnit(*m_creature, leotherasGUID);
|
Creature *leotheras = (Creature *)Unit::GetUnit(*m_creature, leotherasGUID);
|
||||||
if(leotheras && leotheras->isAlive())
|
if(leotheras && leotheras->isAlive())
|
||||||
((boss_leotheras_the_blindAI*)leotheras->AI())->CheckChannelers(false);
|
CAST_AI(boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -182,7 +182,7 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_REGEN, m_creature);
|
DoScriptText(SAY_REGEN, m_creature);
|
||||||
DoCast(m_creature,SPELL_WARLORDS_RAGE);
|
DoCast(m_creature,SPELL_WARLORDS_RAGE);
|
||||||
((mob_naga_distillerAI*)distiller->AI())->StartRageGen(m_creature);
|
CAST_AI(mob_naga_distillerAI, distiller->AI())->StartRageGen(m_creature);
|
||||||
}
|
}
|
||||||
Rage_Timer = 3000+rand()%15000;
|
Rage_Timer = 3000+rand()%15000;
|
||||||
}else Rage_Timer -= diff;
|
}else Rage_Timer -= diff;
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
|
|||||||
if(go_prison)
|
if(go_prison)
|
||||||
go_prison->ResetDoorOrButton();
|
go_prison->ResetDoorOrButton();
|
||||||
|
|
||||||
((npc_unworthy_initiate_anchorAI*)trigger->AI())->SetTarget(m_creature->GetGUID());
|
CAST_AI(npc_unworthy_initiate_anchorAI, trigger->AI())->SetTarget(m_creature->GetGUID());
|
||||||
trigger->CastSpell(m_creature,SPELL_SOUL_PRISON_CHAIN,true);
|
trigger->CastSpell(m_creature,SPELL_SOUL_PRISON_CHAIN,true);
|
||||||
anchor = trigger->GetGUID();
|
anchor = trigger->GetGUID();
|
||||||
}
|
}
|
||||||
@@ -367,12 +367,12 @@ bool GOHello_go_acherus_soul_prison(Player *player, GameObject* _GO)
|
|||||||
Unit* prison_anchor = finder->FindNearestCreature(29521, 15);
|
Unit* prison_anchor = finder->FindNearestCreature(29521, 15);
|
||||||
if(!prison_anchor) return false;
|
if(!prison_anchor) return false;
|
||||||
|
|
||||||
uint64 owner = ((npc_unworthy_initiate_anchorAI*)CAST_CRE(prison_anchor)->AI())->GetTarget();
|
uint64 owner = CAST_AI(npc_unworthy_initiate_anchorAI, CAST_CRE(prison_anchor)->AI())->GetTarget();
|
||||||
|
|
||||||
Creature* prisoner = Creature::GetCreature((*player),owner);
|
Creature* prisoner = Creature::GetCreature((*player),owner);
|
||||||
if(prisoner)
|
if(prisoner)
|
||||||
{
|
{
|
||||||
((npc_unworthy_initiateAI*)(prisoner->AI()))->EventStart(CAST_CRE(prison_anchor),player);
|
CAST_AI(npc_unworthy_initiateAI, (prisoner->AI()))->EventStart(CAST_CRE(prison_anchor),player);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ bool GossipSelect_npc_prospector_anvilward(Player *player, Creature *_Creature,
|
|||||||
break;
|
break;
|
||||||
case GOSSIP_ACTION_INFO_DEF+2:
|
case GOSSIP_ACTION_INFO_DEF+2:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(_Creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -343,7 +343,7 @@ struct TRINITY_DLL_DECL master_kelerun_bloodmournAI : public ScriptedAI
|
|||||||
Creature* paladinSpawn;
|
Creature* paladinSpawn;
|
||||||
paladinSpawn = (Unit::GetCreature((*m_creature), paladinGuid[paladinPhase]));
|
paladinSpawn = (Unit::GetCreature((*m_creature), paladinGuid[paladinPhase]));
|
||||||
if ( paladinSpawn ) {
|
if ( paladinSpawn ) {
|
||||||
((npc_secondTrialAI*)paladinSpawn->AI())->Activate(m_creature->GetGUID());
|
CAST_AI(npc_secondTrialAI, paladinSpawn->AI())->Activate(m_creature->GetGUID());
|
||||||
|
|
||||||
switch(paladinPhase) {
|
switch(paladinPhase) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -405,7 +405,7 @@ bool GossipHello_master_kelerun_bloodmourn(Player *player, Creature *_Creature)
|
|||||||
// Escort quests or any other event-driven quests. If player in party, all players that can accept this quest will receive confirmation box to accept quest.
|
// Escort quests or any other event-driven quests. If player in party, all players that can accept this quest will receive confirmation box to accept quest.
|
||||||
// !not sure if this really works!
|
// !not sure if this really works!
|
||||||
|
|
||||||
if ( ((master_kelerun_bloodmournAI*)_Creature->AI())->questPhase == 0 ) {
|
if ( CAST_AI(master_kelerun_bloodmournAI, _Creature->AI())->questPhase == 0 ) {
|
||||||
player->PrepareQuestMenu(_Creature->GetGUID());
|
player->PrepareQuestMenu(_Creature->GetGUID());
|
||||||
player->SendPreparedQuest(_Creature->GetGUID());
|
player->SendPreparedQuest(_Creature->GetGUID());
|
||||||
}
|
}
|
||||||
@@ -418,7 +418,7 @@ bool QuestAccept_master_kelerun_bloodmourn(Player *player, Creature *creature, Q
|
|||||||
{
|
{
|
||||||
// One Player exclusive quest, wait for user go activation
|
// One Player exclusive quest, wait for user go activation
|
||||||
if(quest->GetQuestId() == QUEST_SECOND_TRIAL )
|
if(quest->GetQuestId() == QUEST_SECOND_TRIAL )
|
||||||
((master_kelerun_bloodmournAI*)creature->AI())->questPhase = 1;
|
CAST_AI(master_kelerun_bloodmournAI, creature->AI())->questPhase = 1;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -444,7 +444,7 @@ void npc_secondTrialAI::JustDied(Unit* Killer) {
|
|||||||
Summoner = (Unit::GetCreature((*m_creature), summonerGuid));
|
Summoner = (Unit::GetCreature((*m_creature), summonerGuid));
|
||||||
|
|
||||||
if ( Summoner )
|
if ( Summoner )
|
||||||
((master_kelerun_bloodmournAI*)Summoner->AI())->SecondTrialKill();
|
CAST_AI(master_kelerun_bloodmournAI, Summoner->AI())->SecondTrialKill();
|
||||||
|
|
||||||
// last kill quest complete for group
|
// last kill quest complete for group
|
||||||
if ( m_creature->GetEntry() == CHAMPION_SUNSTRIKER ) {
|
if ( m_creature->GetEntry() == CHAMPION_SUNSTRIKER ) {
|
||||||
@@ -514,7 +514,7 @@ bool GOHello_go_second_trial(Player *player, GameObject* _GO)
|
|||||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *(_GO->GetMap()));
|
cell_lock->Visit(cell_lock, grid_unit_searcher, *(_GO->GetMap()));
|
||||||
|
|
||||||
if ( event_controller )
|
if ( event_controller )
|
||||||
((master_kelerun_bloodmournAI*)event_controller->AI())->StartEvent();
|
CAST_AI(master_kelerun_bloodmournAI, event_controller->AI())->StartEvent();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -594,8 +594,8 @@ bool QuestAccept_npc_apprentice_mirveda(Player* player, Creature* creature, Ques
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
|
if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
|
||||||
{
|
{
|
||||||
((npc_apprentice_mirvedaAI*)creature->AI())->Summon = true;
|
CAST_AI(npc_apprentice_mirvedaAI, creature->AI())->Summon = true;
|
||||||
((npc_apprentice_mirvedaAI*)creature->AI())->PlayerGUID = player->GetGUID();
|
CAST_AI(npc_apprentice_mirvedaAI, creature->AI())->PlayerGUID = player->GetGUID();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest*
|
|||||||
if (pPlayer->GetTeam() == HORDE)
|
if (pPlayer->GetTeam() == HORDE)
|
||||||
pCreature->setFaction(FACTION_ESCORTEE_H);
|
pCreature->setFaction(FACTION_ESCORTEE_H);
|
||||||
|
|
||||||
((npc_escortAI*)(pCreature->AI()))->Start(true, true, false, pPlayer->GetGUID());
|
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, true, false, pPlayer->GetGUID());
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ bool QuestAccept_npc_ranger_lilatha(Player* player, Creature* creature, Quest co
|
|||||||
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS)
|
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS)
|
||||||
{
|
{
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
|||||||
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
|
||||||
|
|
||||||
if(CheckAllBossDied(pInstance, m_creature))
|
if(CheckAllBossDied(pInstance, m_creature))
|
||||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||||
@@ -445,7 +445,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
|||||||
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
|
||||||
|
|
||||||
if(CheckAllBossDied(pInstance, m_creature))
|
if(CheckAllBossDied(pInstance, m_creature))
|
||||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||||
@@ -553,7 +553,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
|||||||
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
|
||||||
|
|
||||||
if(CheckAllBossDied(pInstance, m_creature))
|
if(CheckAllBossDied(pInstance, m_creature))
|
||||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||||
@@ -651,7 +651,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
|||||||
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
|
||||||
|
|
||||||
if(CheckAllBossDied(pInstance, m_creature))
|
if(CheckAllBossDied(pInstance, m_creature))
|
||||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||||
|
|||||||
+3
-3
@@ -292,7 +292,7 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
|||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
if(Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
if(Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||||
((boss_kelidan_the_breakerAI*)Kelidan->AI())->ChannelerEngaged(who);
|
CAST_AI(boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerEngaged(who);
|
||||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||||
m_creature->InterruptNonMeleeSpells(true);
|
m_creature->InterruptNonMeleeSpells(true);
|
||||||
DoStartMovement(who);
|
DoStartMovement(who);
|
||||||
@@ -301,7 +301,7 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
|||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
if(Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
if(Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||||
((boss_kelidan_the_breakerAI*)Kelidan->AI())->ChannelerDied(Killer);
|
CAST_AI(boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(Killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -313,7 +313,7 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
|||||||
if (!m_creature->IsNonMeleeSpellCasted(false))
|
if (!m_creature->IsNonMeleeSpellCasted(false))
|
||||||
if(Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
if(Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||||
{
|
{
|
||||||
uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature);
|
uint64 channeler = CAST_AI(boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(m_creature);
|
||||||
if(Unit *channeled = Unit::GetUnit(*m_creature, channeler))
|
if(Unit *channeled = Unit::GetUnit(*m_creature, channeler))
|
||||||
DoCast(channeled,SPELL_CHANNELING);
|
DoCast(channeled,SPELL_CHANNELING);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -368,7 +368,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI
|
|||||||
Creature *summon = m_creature->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Creature *summon = m_creature->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
if(summon)
|
if(summon)
|
||||||
{
|
{
|
||||||
((mob_abyssalAI*)summon->AI())->SetTrigger(2);
|
CAST_AI(mob_abyssalAI, summon->AI())->SetTrigger(2);
|
||||||
m_creature->CastSpell(summon, SPELL_BLAZE_TARGET, true);
|
m_creature->CastSpell(summon, SPELL_BLAZE_TARGET, true);
|
||||||
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
@@ -398,7 +398,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI
|
|||||||
float x, y, z;
|
float x, y, z;
|
||||||
target->GetPosition(x, y, z);
|
target->GetPosition(x, y, z);
|
||||||
Creature *summon = m_creature->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Creature *summon = m_creature->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
if(summon) ((mob_abyssalAI*)summon->AI())->SetTrigger(1);
|
if(summon) CAST_AI(mob_abyssalAI, summon->AI())->SetTrigger(1);
|
||||||
}
|
}
|
||||||
Debris_Timer = 10000;
|
Debris_Timer = 10000;
|
||||||
}else Debris_Timer -= diff;
|
}else Debris_Timer -= diff;
|
||||||
@@ -516,7 +516,7 @@ bool GOHello_go_Manticron_Cube(Player *player, GameObject* _GO)
|
|||||||
player->InterruptNonMeleeSpells(false);
|
player->InterruptNonMeleeSpells(false);
|
||||||
player->CastSpell(player, SPELL_SHADOW_GRASP, true);
|
player->CastSpell(player, SPELL_SHADOW_GRASP, true);
|
||||||
player->CastSpell(player, SPELL_SHADOW_GRASP_VISUAL, false);
|
player->CastSpell(player, SPELL_SHADOW_GRASP_VISUAL, false);
|
||||||
((boss_magtheridonAI*)Magtheridon->AI())->SetClicker(_GO->GetGUID(), player->GetGUID());
|
CAST_AI(boss_magtheridonAI, Magtheridon->AI())->SetClicker(_GO->GetGUID(), player->GetGUID());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -330,7 +330,7 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI
|
|||||||
Creature *pKurse = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_NETHEKURSE));
|
Creature *pKurse = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_NETHEKURSE));
|
||||||
if (pKurse && m_creature->GetDistance(pKurse) < 45.0f)
|
if (pKurse && m_creature->GetDistance(pKurse) < 45.0f)
|
||||||
{
|
{
|
||||||
((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonAggro();
|
CAST_AI(boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonAggro();
|
||||||
|
|
||||||
if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS )
|
if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS )
|
||||||
return;
|
return;
|
||||||
@@ -350,7 +350,7 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Creature *pKurse = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_NETHEKURSE));
|
Creature *pKurse = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_NETHEKURSE));
|
||||||
if (pKurse)
|
if (pKurse)
|
||||||
((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonDeath();
|
CAST_AI(boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonDeath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -274,7 +274,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI
|
|||||||
|
|
||||||
DoScriptText(YELL_DIE_L, Left);
|
DoScriptText(YELL_DIE_L, Left);
|
||||||
|
|
||||||
((mob_omrogg_headsAI*)CAST_CRE(Right)->AI())->DoDeathYell();
|
CAST_AI(mob_omrogg_headsAI, CAST_CRE(Right)->AI())->DoDeathYell();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ bool QuestAccept_npc_wounded_blood_elf(Player* player, Creature* creature, Quest
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
|
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
// Change faction so mobs attack
|
// Change faction so mobs attack
|
||||||
creature->setFaction(775);
|
creature->setFaction(775);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
|
|||||||
Creature *pMidnight = Unit::GetCreature(*m_creature, Midnight);
|
Creature *pMidnight = Unit::GetCreature(*m_creature, Midnight);
|
||||||
if(pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
|
if(pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
|
||||||
{
|
{
|
||||||
((boss_midnightAI*)(pMidnight->AI()))->Mount(m_creature);
|
CAST_AI(boss_midnightAI, (pMidnight->AI()))->Mount(m_creature);
|
||||||
m_creature->SetHealth(pMidnight->GetHealth());
|
m_creature->SetHealth(pMidnight->GetHealth());
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
}
|
}
|
||||||
@@ -303,7 +303,7 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
|
|||||||
|
|
||||||
void boss_midnightAI::SetMidnight(Creature *pAttumen, uint64 value)
|
void boss_midnightAI::SetMidnight(Creature *pAttumen, uint64 value)
|
||||||
{
|
{
|
||||||
((boss_attumenAI*)pAttumen->AI())->Midnight = value;
|
CAST_AI(boss_attumenAI, pAttumen->AI())->Midnight = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_attumen(Creature *_Creature)
|
CreatureAI* GetAI_boss_attumen(Creature *_Creature)
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ struct TRINITY_DLL_DECL boss_moroes_guestAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
for(uint8 i = 0; i < 3; ++i)
|
for(uint8 i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
uint64 GUID = ((boss_moroesAI*)Moroes->AI())->AddGUID[i];
|
uint64 GUID = CAST_AI(boss_moroesAI, Moroes->AI())->AddGUID[i];
|
||||||
if(GUID && GUID != m_creature->GetGUID())
|
if(GUID && GUID != m_creature->GetGUID())
|
||||||
GuestGUID[i+1] = GUID;
|
GuestGUID[i+1] = GUID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -380,8 +380,8 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
Infernal->SetUInt32Value(UNIT_FIELD_DISPLAYID, INFERNAL_MODEL_INVISIBLE);
|
Infernal->SetUInt32Value(UNIT_FIELD_DISPLAYID, INFERNAL_MODEL_INVISIBLE);
|
||||||
Infernal->setFaction(m_creature->getFaction());
|
Infernal->setFaction(m_creature->getFaction());
|
||||||
if(point)
|
if(point)
|
||||||
((netherspite_infernalAI*)Infernal->AI())->point=point;
|
CAST_AI(netherspite_infernalAI, Infernal->AI())->point=point;
|
||||||
((netherspite_infernalAI*)Infernal->AI())->malchezaar=m_creature->GetGUID();
|
CAST_AI(netherspite_infernalAI, Infernal->AI())->malchezaar=m_creature->GetGUID();
|
||||||
|
|
||||||
infernals.push_back(Infernal->GetGUID());
|
infernals.push_back(Infernal->GetGUID());
|
||||||
DoCast(Infernal, SPELL_INFERNAL_RELAY);
|
DoCast(Infernal, SPELL_INFERNAL_RELAY);
|
||||||
@@ -621,7 +621,7 @@ void netherspite_infernalAI::Cleanup()
|
|||||||
Unit *pMalchezaar = Unit::GetUnit(*m_creature, malchezaar);
|
Unit *pMalchezaar = Unit::GetUnit(*m_creature, malchezaar);
|
||||||
|
|
||||||
if(pMalchezaar && pMalchezaar->isAlive())
|
if(pMalchezaar && pMalchezaar->isAlive())
|
||||||
((boss_malchezaarAI*)CAST_CRE(pMalchezaar)->AI())->Cleanup(m_creature, point);
|
CAST_AI(boss_malchezaarAI, CAST_CRE(pMalchezaar)->AI())->Cleanup(m_creature, point);
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureAI* GetAI_netherspite_infernal(Creature *_Creature)
|
CreatureAI* GetAI_netherspite_infernal(Creature *_Creature)
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
|||||||
Creature* Chains = m_creature->SummonCreature(CREATURE_DEMONCHAINS, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 21000);
|
Creature* Chains = m_creature->SummonCreature(CREATURE_DEMONCHAINS, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 21000);
|
||||||
if(Chains)
|
if(Chains)
|
||||||
{
|
{
|
||||||
((mob_demon_chainAI*)Chains->AI())->SacrificeGUID = target->GetGUID();
|
CAST_AI(mob_demon_chainAI, Chains->AI())->SacrificeGUID = target->GetGUID();
|
||||||
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
|
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
|
||||||
switch(rand()%2)
|
switch(rand()%2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL mob_titoAI : public ScriptedAI
|
|||||||
Creature* Dorothee = (Unit::GetCreature((*m_creature), DorotheeGUID));
|
Creature* Dorothee = (Unit::GetCreature((*m_creature), DorotheeGUID));
|
||||||
if(Dorothee && Dorothee->isAlive())
|
if(Dorothee && Dorothee->isAlive())
|
||||||
{
|
{
|
||||||
((boss_dorotheeAI*)Dorothee->AI())->TitoDied = true;
|
CAST_AI(boss_dorotheeAI, Dorothee->AI())->TitoDied = true;
|
||||||
DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee);
|
DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,7 +247,7 @@ void boss_dorotheeAI::SummonTito()
|
|||||||
if(Tito)
|
if(Tito)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DOROTHEE_SUMMON, m_creature);
|
DoScriptText(SAY_DOROTHEE_SUMMON, m_creature);
|
||||||
((mob_titoAI*)Tito->AI())->DorotheeGUID = m_creature->GetGUID();
|
CAST_AI(mob_titoAI, Tito->AI())->DorotheeGUID = m_creature->GetGUID();
|
||||||
Tito->AI()->AttackStart(m_creature->getVictim());
|
Tito->AI()->AttackStart(m_creature->getVictim());
|
||||||
SummonedTito = true;
|
SummonedTito = true;
|
||||||
TitoDied = false;
|
TitoDied = false;
|
||||||
@@ -1174,8 +1174,8 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
{
|
{
|
||||||
PretendToDie(m_creature);
|
PretendToDie(m_creature);
|
||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
((boss_romuloAI*)Romulo->AI())->ResurrectTimer = 10000;
|
CAST_AI(boss_romuloAI, Romulo->AI())->ResurrectTimer = 10000;
|
||||||
((boss_romuloAI*)Romulo->AI())->JulianneDead = true;
|
CAST_AI(boss_romuloAI, Romulo->AI())->JulianneDead = true;
|
||||||
damage = 0;
|
damage = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1199,8 +1199,8 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
|
|
||||||
if (Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID)))
|
if (Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID)))
|
||||||
{
|
{
|
||||||
((boss_julianneAI*)Julianne->AI())->RomuloDead = true;
|
CAST_AI(boss_julianneAI, Julianne->AI())->RomuloDead = true;
|
||||||
((boss_julianneAI*)Julianne->AI())->ResurrectSelfTimer = 10000;
|
CAST_AI(boss_julianneAI, Julianne->AI())->ResurrectSelfTimer = 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
damage = 0;
|
damage = 0;
|
||||||
@@ -1227,8 +1227,8 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
{
|
{
|
||||||
PretendToDie(m_creature);
|
PretendToDie(m_creature);
|
||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
((boss_julianneAI*)Julianne->AI())->ResurrectTimer = 10000;
|
CAST_AI(boss_julianneAI, Julianne->AI())->ResurrectTimer = 10000;
|
||||||
((boss_julianneAI*)Julianne->AI())->RomuloDead = true;
|
CAST_AI(boss_julianneAI, Julianne->AI())->RomuloDead = true;
|
||||||
damage = 0;
|
damage = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1279,8 +1279,8 @@ void boss_julianneAI::UpdateAI(const uint32 diff)
|
|||||||
if(Romulo)
|
if(Romulo)
|
||||||
{
|
{
|
||||||
RomuloGUID = Romulo->GetGUID();
|
RomuloGUID = Romulo->GetGUID();
|
||||||
((boss_romuloAI*)Romulo->AI())->JulianneGUID = m_creature->GetGUID();
|
CAST_AI(boss_romuloAI, Romulo->AI())->JulianneGUID = m_creature->GetGUID();
|
||||||
((boss_romuloAI*)Romulo->AI())->Phase = PHASE_ROMULO;
|
CAST_AI(boss_romuloAI, Romulo->AI())->Phase = PHASE_ROMULO;
|
||||||
Romulo->setFaction(16);
|
Romulo->setFaction(16);
|
||||||
|
|
||||||
if(m_creature->getVictim())
|
if(m_creature->getVictim())
|
||||||
@@ -1317,11 +1317,11 @@ void boss_julianneAI::UpdateAI(const uint32 diff)
|
|||||||
if(ResurrectTimer < diff)
|
if(ResurrectTimer < diff)
|
||||||
{
|
{
|
||||||
Creature* Romulo = (Unit::GetCreature((*m_creature), RomuloGUID));
|
Creature* Romulo = (Unit::GetCreature((*m_creature), RomuloGUID));
|
||||||
if(Romulo && ((boss_romuloAI*)Romulo->AI())->IsFakingDeath)
|
if(Romulo && CAST_AI(boss_romuloAI, Romulo->AI())->IsFakingDeath)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_JULIANNE_RESURRECT, m_creature);
|
DoScriptText(SAY_JULIANNE_RESURRECT, m_creature);
|
||||||
Resurrect(Romulo);
|
Resurrect(Romulo);
|
||||||
((boss_romuloAI*)Romulo->AI())->IsFakingDeath = false;
|
CAST_AI(boss_romuloAI, Romulo->AI())->IsFakingDeath = false;
|
||||||
RomuloDead = false;
|
RomuloDead = false;
|
||||||
ResurrectTimer = 10000;
|
ResurrectTimer = 10000;
|
||||||
}
|
}
|
||||||
@@ -1371,11 +1371,11 @@ void boss_romuloAI::UpdateAI(const uint32 diff)
|
|||||||
if(ResurrectTimer < diff)
|
if(ResurrectTimer < diff)
|
||||||
{
|
{
|
||||||
Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID));
|
Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID));
|
||||||
if(Julianne && ((boss_julianneAI*)Julianne->AI())->IsFakingDeath)
|
if(Julianne && CAST_AI(boss_julianneAI, Julianne->AI())->IsFakingDeath)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_ROMULO_RESURRECT, m_creature);
|
DoScriptText(SAY_ROMULO_RESURRECT, m_creature);
|
||||||
Resurrect(Julianne);
|
Resurrect(Julianne);
|
||||||
((boss_julianneAI*)Julianne->AI())->IsFakingDeath = false;
|
CAST_AI(boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
|
||||||
JulianneDead = false;
|
JulianneDead = false;
|
||||||
ResurrectTimer = 10000;
|
ResurrectTimer = 10000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ bool GossipHello_npc_barnes(Player* player, Creature* _Creature)
|
|||||||
player->ADD_GOSSIP_ITEM(5, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
player->ADD_GOSSIP_ITEM(5, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!((npc_barnesAI*)_Creature->AI())->RaidWiped)
|
if(!CAST_AI(npc_barnesAI, _Creature->AI())->RaidWiped)
|
||||||
player->SEND_GOSSIP_MENU(8970, _Creature->GetGUID());
|
player->SEND_GOSSIP_MENU(8970, _Creature->GetGUID());
|
||||||
else
|
else
|
||||||
player->SEND_GOSSIP_MENU(8975, _Creature->GetGUID());
|
player->SEND_GOSSIP_MENU(8975, _Creature->GetGUID());
|
||||||
@@ -409,21 +409,21 @@ bool GossipSelect_npc_barnes(Player *player, Creature *_Creature, uint32 sender,
|
|||||||
break;
|
break;
|
||||||
case GOSSIP_ACTION_INFO_DEF+2:
|
case GOSSIP_ACTION_INFO_DEF+2:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_barnesAI*)_Creature->AI())->StartEvent();
|
CAST_AI(npc_barnesAI, _Creature->AI())->StartEvent();
|
||||||
break;
|
break;
|
||||||
case GOSSIP_ACTION_INFO_DEF+3:
|
case GOSSIP_ACTION_INFO_DEF+3:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_barnesAI*)_Creature->AI())->Event = EVENT_OZ;
|
CAST_AI(npc_barnesAI, _Creature->AI())->Event = EVENT_OZ;
|
||||||
outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",player->GetGUID());
|
outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",player->GetGUID());
|
||||||
break;
|
break;
|
||||||
case GOSSIP_ACTION_INFO_DEF+4:
|
case GOSSIP_ACTION_INFO_DEF+4:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_barnesAI*)_Creature->AI())->Event = EVENT_HOOD;
|
CAST_AI(npc_barnesAI, _Creature->AI())->Event = EVENT_HOOD;
|
||||||
outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",player->GetGUID());
|
outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",player->GetGUID());
|
||||||
break;
|
break;
|
||||||
case GOSSIP_ACTION_INFO_DEF+5:
|
case GOSSIP_ACTION_INFO_DEF+5:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
((npc_barnesAI*)_Creature->AI())->Event = EVENT_RAJ;
|
CAST_AI(npc_barnesAI, _Creature->AI())->Event = EVENT_RAJ;
|
||||||
outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",player->GetGUID());
|
outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",player->GetGUID());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 1);
|
pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 1);
|
||||||
|
|
||||||
((boss_priestess_delrissaAI*)Delrissa->AI())->KilledLackey();
|
CAST_AI(boss_priestess_delrissaAI, Delrissa->AI())->KilledLackey();
|
||||||
|
|
||||||
if (!Delrissa->isAlive() && pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) > 3)
|
if (!Delrissa->isAlive() && pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) > 3)
|
||||||
Delrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
Delrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
@@ -423,7 +423,7 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
|
|||||||
Creature* Delrissa = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA)));
|
Creature* Delrissa = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA)));
|
||||||
if (Delrissa)
|
if (Delrissa)
|
||||||
{
|
{
|
||||||
Group = ((boss_priestess_delrissaAI*)Delrissa->AI())->Adds;
|
Group = CAST_AI(boss_priestess_delrissaAI, Delrissa->AI())->Adds;
|
||||||
Add* dAdd = new Add(Delrissa->GetEntry(), Delrissa->GetGUID());
|
Add* dAdd = new Add(Delrissa->GetEntry(), Delrissa->GetGUID());
|
||||||
Group.push_back(dAdd);
|
Group.push_back(dAdd);
|
||||||
}
|
}
|
||||||
@@ -649,13 +649,13 @@ struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI
|
|||||||
/*void mob_fizzleAI::JustDied(Unit* killer)
|
/*void mob_fizzleAI::JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if(Creature* Ellris = (Unit::GetCreature(*m_creature, EllrisGUID)))
|
if(Creature* Ellris = (Unit::GetCreature(*m_creature, EllrisGUID)))
|
||||||
((boss_ellris_duskhallowAI*)Ellris->AI())->ImpGUID = 0;
|
CAST_AI(boss_ellris_duskhallowAI, Ellris->AI())->ImpGUID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mob_fizzleAI::KilledUnit(Unit* victim)
|
void mob_fizzleAI::KilledUnit(Unit* victim)
|
||||||
{
|
{
|
||||||
if(Creature* Ellris = (Unit::GetCreature(*m_creature, EllrisGUID)))
|
if(Creature* Ellris = (Unit::GetCreature(*m_creature, EllrisGUID)))
|
||||||
((boss_ellris_duskhallowAI*)Ellris->AI())->KilledUnit(victim);
|
CAST_AI(boss_ellris_duskhallowAI, Ellris->AI())->KilledUnit(victim);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#define SPELL_KNOCKDOWN 11428
|
#define SPELL_KNOCKDOWN 11428
|
||||||
@@ -984,7 +984,7 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
|
|||||||
Creature* Sliver = m_creature->SummonCreature(CREATURE_SLIVER, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Creature* Sliver = m_creature->SummonCreature(CREATURE_SLIVER, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
if (Sliver)
|
if (Sliver)
|
||||||
{
|
{
|
||||||
//((mob_sliverAI*)Sliver->AI())->GaraxxasGUID = m_creature->GetGUID();
|
//CAST_AI(mob_sliverAI, Sliver->AI())->GaraxxasGUID = m_creature->GetGUID();
|
||||||
//SliverGUID = Sliver->GetGUID();
|
//SliverGUID = Sliver->GetGUID();
|
||||||
HasSummonedSliver = true;
|
HasSummonedSliver = true;
|
||||||
}
|
}
|
||||||
@@ -1043,13 +1043,13 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
|
|||||||
/*void mob_sliverAI::JustDied(Unit* killer)
|
/*void mob_sliverAI::JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if(Creature* Garaxxas = (Unit::GetCreature(*m_creature, GaraxxasGUID)))
|
if(Creature* Garaxxas = (Unit::GetCreature(*m_creature, GaraxxasGUID)))
|
||||||
((boss_garaxxasAI*)Garaxxas->AI())->SliverGUID = 0;
|
CAST_AI(boss_garaxxasAI, Garaxxas->AI())->SliverGUID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mob_sliverAI::KilledUnit(Unit* victim)
|
void mob_sliverAI::KilledUnit(Unit* victim)
|
||||||
{
|
{
|
||||||
if(Creature* Garaxxas = (Unit::GetCreature(*m_creature, GaraxxasGUID)))
|
if(Creature* Garaxxas = (Unit::GetCreature(*m_creature, GaraxxasGUID)))
|
||||||
((boss_garaxxasAI*)Garaxxas->AI())->KilledUnit(victim);
|
CAST_AI(boss_garaxxasAI, Garaxxas->AI())->KilledUnit(victim);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#define SPELL_WINDFURY_TOTEM 27621
|
#define SPELL_WINDFURY_TOTEM 27621
|
||||||
|
|||||||
@@ -345,12 +345,12 @@ struct TRINITY_DLL_DECL mob_fel_crystalAI : public ScriptedAI
|
|||||||
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())
|
||||||
{
|
{
|
||||||
if (((boss_selin_fireheartAI*)Selin->AI())->CrystalGUID == m_creature->GetGUID())
|
if(CAST_AI(boss_selin_fireheartAI, Selin->AI())->CrystalGUID == m_creature->GetGUID())
|
||||||
{
|
{
|
||||||
// Set this to false if we are the creature that Selin is draining so his AI flows properly
|
// Set this to false if we are the creature that Selin is draining so his AI flows properly
|
||||||
((boss_selin_fireheartAI*)Selin->AI())->DrainingCrystal = false;
|
CAST_AI(boss_selin_fireheartAI, Selin->AI())->DrainingCrystal = false;
|
||||||
((boss_selin_fireheartAI*)Selin->AI())->IsDraining = false;
|
CAST_AI(boss_selin_fireheartAI, Selin->AI())->IsDraining = false;
|
||||||
((boss_selin_fireheartAI*)Selin->AI())->EmpowerTimer = 10000;
|
CAST_AI(boss_selin_fireheartAI, Selin->AI())->EmpowerTimer = 10000;
|
||||||
if (Selin->getVictim())
|
if (Selin->getVictim())
|
||||||
{
|
{
|
||||||
Selin->AI()->AttackStart(Selin->getVictim());
|
Selin->AI()->AttackStart(Selin->getVictim());
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ bool QuestAccept_npc_clintar_dreamwalker(Player *player, Creature *creature, Que
|
|||||||
{
|
{
|
||||||
Creature *clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, CLINTAR_SPIRIT_SUMMON_X, CLINTAR_SPIRIT_SUMMON_Y, CLINTAR_SPIRIT_SUMMON_Z, CLINTAR_SPIRIT_SUMMON_O, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000);
|
Creature *clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, CLINTAR_SPIRIT_SUMMON_X, CLINTAR_SPIRIT_SUMMON_Y, CLINTAR_SPIRIT_SUMMON_Z, CLINTAR_SPIRIT_SUMMON_O, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000);
|
||||||
if(clintar_spirit)
|
if(clintar_spirit)
|
||||||
((npc_clintar_spiritAI*)clintar_spirit->AI())->StartEvent(player);
|
CAST_AI(npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,8 +324,8 @@ bool GOHello_go_manaforge_control_console(Player *player, GameObject* _GO)
|
|||||||
|
|
||||||
if( manaforge )
|
if( manaforge )
|
||||||
{
|
{
|
||||||
((npc_manaforge_control_consoleAI*)manaforge->AI())->someplayer = player->GetGUID();
|
CAST_AI(npc_manaforge_control_consoleAI, manaforge->AI())->someplayer = player->GetGUID();
|
||||||
((npc_manaforge_control_consoleAI*)manaforge->AI())->goConsole = _GO->GetGUID();
|
CAST_AI(npc_manaforge_control_consoleAI, manaforge->AI())->goConsole = _GO->GetGUID();
|
||||||
_GO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
_GO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -660,7 +660,7 @@ bool AreaTrigger_at_commander_dawnforge(Player *player, AreaTriggerEntry *at)
|
|||||||
if (!Dawnforge)
|
if (!Dawnforge)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (((npc_commander_dawnforgeAI*)Dawnforge->AI())->CanStartEvent(player))
|
if(CAST_AI(npc_commander_dawnforgeAI, Dawnforge->AI())->CanStartEvent(player))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -917,7 +917,7 @@ bool QuestAccept_npc_bessy(Player* player, Creature* creature, Quest const* ques
|
|||||||
{
|
{
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,8 +137,8 @@ bool QuestAccept_npc_shenthul(Player* player, Creature* creature, Quest const* q
|
|||||||
{
|
{
|
||||||
if( quest->GetQuestId() == QUEST_2460 )
|
if( quest->GetQuestId() == QUEST_2460 )
|
||||||
{
|
{
|
||||||
((npc_shenthulAI*)creature->AI())->CanTalk = true;
|
CAST_AI(npc_shenthulAI, creature->AI())->CanTalk = true;
|
||||||
((npc_shenthulAI*)creature->AI())->playerGUID = player->GetGUID();
|
CAST_AI(npc_shenthulAI, creature->AI())->playerGUID = player->GetGUID();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ bool QuestAccept_npc_willix(Player* player, Creature* creature, Quest const* que
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
|
if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
DoScriptText(SAY_READY, creature, player);
|
DoScriptText(SAY_READY, creature, player);
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
case 1: {
|
case 1: {
|
||||||
Creature *smoke = m_creature->SummonCreature(HELPER,Spawn[1].x,Spawn[1].y,Spawn[1].z,0,TEMPSUMMON_TIMED_DESPAWN,20000);
|
Creature *smoke = m_creature->SummonCreature(HELPER,Spawn[1].x,Spawn[1].y,Spawn[1].z,0,TEMPSUMMON_TIMED_DESPAWN,20000);
|
||||||
if(smoke)
|
if(smoke)
|
||||||
((mob_wisp_invisAI*)smoke->AI())->SetType(3);
|
CAST_AI(mob_wisp_invisAI, smoke->AI())->SetType(3);
|
||||||
DoCast(m_creature,SPELL_RHYME_BIG);
|
DoCast(m_creature,SPELL_RHYME_BIG);
|
||||||
break;}
|
break;}
|
||||||
case 6:
|
case 6:
|
||||||
@@ -469,7 +469,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
else { //maybe possible when player dies from conflagration
|
else { //maybe possible when player dies from conflagration
|
||||||
Creature *Head = Unit::GetCreature((*m_creature), headGUID);
|
Creature *Head = Unit::GetCreature((*m_creature), headGUID);
|
||||||
if (Head)
|
if (Head)
|
||||||
((mob_headAI*)Head->AI())->SaySound(SAY_PLAYER_DEATH);
|
CAST_AI(mob_headAI, Head->AI())->SaySound(SAY_PLAYER_DEATH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -522,7 +522,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
flame->CastSpell(flame,SPELL_BODY_FLAME,false);
|
flame->CastSpell(flame,SPELL_BODY_FLAME,false);
|
||||||
Creature *wisp = DoSpawnCreature(WISP_INVIS,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
|
Creature *wisp = DoSpawnCreature(WISP_INVIS,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
|
||||||
if(wisp)
|
if(wisp)
|
||||||
((mob_wisp_invisAI*)wisp->AI())->SetType(4);
|
CAST_AI(mob_wisp_invisAI, wisp->AI())->SetType(4);
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
||||||
}
|
}
|
||||||
@@ -628,7 +628,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Creature *flame = m_creature->SummonCreature(HELPER,Spawn[0].x,Spawn[0].y,Spawn[0].z,0,TEMPSUMMON_TIMED_DESPAWN,17000);
|
Creature *flame = m_creature->SummonCreature(HELPER,Spawn[0].x,Spawn[0].y,Spawn[0].z,0,TEMPSUMMON_TIMED_DESPAWN,17000);
|
||||||
if(flame)
|
if(flame)
|
||||||
((mob_wisp_invisAI*)flame->AI())->SetType(2);
|
CAST_AI(mob_wisp_invisAI, flame->AI())->SetType(2);
|
||||||
burned = true;
|
burned = true;
|
||||||
}else burn -= diff;
|
}else burn -= diff;
|
||||||
break;
|
break;
|
||||||
@@ -679,8 +679,8 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
Creature* Head = Unit::GetCreature((*m_creature), headGUID);
|
Creature* Head = Unit::GetCreature((*m_creature), headGUID);
|
||||||
if (Head && Head->isAlive())
|
if (Head && Head->isAlive())
|
||||||
{
|
{
|
||||||
((mob_headAI*)Head->AI())->Phase = Phase;
|
CAST_AI(mob_headAI, Head->AI())->Phase = Phase;
|
||||||
((mob_headAI*)Head->AI())->Disappear();
|
CAST_AI(mob_headAI, Head->AI())->Disappear();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -718,7 +718,7 @@ void mob_headAI::Disappear()
|
|||||||
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);
|
||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
((boss_headless_horsemanAI*)body->AI())->returned = true;
|
CAST_AI(boss_headless_horsemanAI, body->AI())->returned = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -741,7 +741,7 @@ struct TRINITY_DLL_DECL mob_pulsing_pumpkinAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
debuff->SetDisplayId(m_creature->GetDisplayId());
|
debuff->SetDisplayId(m_creature->GetDisplayId());
|
||||||
debuff->CastSpell(debuff,SPELL_PUMPKIN_AURA_GREEN,false);
|
debuff->CastSpell(debuff,SPELL_PUMPKIN_AURA_GREEN,false);
|
||||||
((mob_wisp_invisAI*)debuff->AI())->SetType(1);
|
CAST_AI(mob_wisp_invisAI, debuff->AI())->SetType(1);
|
||||||
debuffGUID = debuff->GetGUID();
|
debuffGUID = debuff->GetGUID();
|
||||||
}
|
}
|
||||||
sprouted = false;
|
sprouted = false;
|
||||||
@@ -807,8 +807,8 @@ bool GOHello_go_loosely_turned_soil(Player *plr, GameObject* soil)
|
|||||||
Creature *horseman = soil->SummonCreature(HH_MOUNTED,FlightPoint[20].x,FlightPoint[20].y,FlightPoint[20].z,0,TEMPSUMMON_MANUAL_DESPAWN,0);
|
Creature *horseman = soil->SummonCreature(HH_MOUNTED,FlightPoint[20].x,FlightPoint[20].y,FlightPoint[20].z,0,TEMPSUMMON_MANUAL_DESPAWN,0);
|
||||||
if(horseman)
|
if(horseman)
|
||||||
{
|
{
|
||||||
((boss_headless_horsemanAI*)horseman->AI())->playerGUID = plr->GetGUID();
|
CAST_AI(boss_headless_horsemanAI, horseman->AI())->playerGUID = plr->GetGUID();
|
||||||
((boss_headless_horsemanAI*)horseman->AI())->FlyMode();
|
CAST_AI(boss_headless_horsemanAI, horseman->AI())->FlyMode();
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ bool GossipSelect_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature,
|
|||||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||||
{
|
{
|
||||||
pPlayer->CLOSE_GOSSIP_MENU();
|
pPlayer->CLOSE_GOSSIP_MENU();
|
||||||
((npc_escortAI*)(pCreature->AI()))->Start(false, true, false);
|
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(false, true, false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -832,8 +832,8 @@ bool QuestAccept_npc_overlord_morghor(Player *player, Creature *_Creature, const
|
|||||||
{
|
{
|
||||||
if(_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE)
|
if(_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE)
|
||||||
{
|
{
|
||||||
((npc_overlord_morghorAI*)_Creature->AI())->PlayerGUID = player->GetGUID();
|
CAST_AI(npc_overlord_morghorAI, _Creature->AI())->PlayerGUID = player->GetGUID();
|
||||||
((npc_overlord_morghorAI*)_Creature->AI())->StartEvent();
|
CAST_AI(npc_overlord_morghorAI, _Creature->AI())->StartEvent();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -1047,7 +1047,7 @@ bool QuestAccept_npc_earthmender_wilda(Player* player, Creature* creature, Quest
|
|||||||
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_COILSKAR_CISTERN)
|
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_COILSKAR_CISTERN)
|
||||||
{
|
{
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1490,14 +1490,14 @@ struct TRINITY_DLL_DECL npc_lord_illidan_stormrageAI : public ScriptedAI
|
|||||||
Spawn->GetMotionMaster()->MovePoint(0,x, y, z);
|
Spawn->GetMotionMaster()->MovePoint(0,x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
((mob_illidari_spawnAI*)Spawn->AI())->LordIllidanGUID = m_creature->GetGUID();
|
CAST_AI(mob_illidari_spawnAI, Spawn->AI())->LordIllidanGUID = m_creature->GetGUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(WavesInfo[WaveCount].CreatureId == 22076) // Torloth
|
if(WavesInfo[WaveCount].CreatureId == 22076) // Torloth
|
||||||
{
|
{
|
||||||
((mob_torloth_the_magnificentAI*)Spawn->AI())->LordIllidanGUID = m_creature->GetGUID();
|
CAST_AI(mob_torloth_the_magnificentAI, Spawn->AI())->LordIllidanGUID = m_creature->GetGUID();
|
||||||
if(PlayerGUID)
|
if(PlayerGUID)
|
||||||
((mob_torloth_the_magnificentAI*)Spawn->AI())->AggroTargetGUID = PlayerGUID;
|
CAST_AI(mob_torloth_the_magnificentAI, Spawn->AI())->AggroTargetGUID = PlayerGUID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1605,7 +1605,7 @@ void mob_illidari_spawnAI::JustDied(Unit *slayer)
|
|||||||
m_creature->RemoveCorpse();
|
m_creature->RemoveCorpse();
|
||||||
if(Creature* LordIllidan = (Unit::GetCreature(*m_creature, LordIllidanGUID)))
|
if(Creature* LordIllidan = (Unit::GetCreature(*m_creature, LordIllidanGUID)))
|
||||||
if(LordIllidan)
|
if(LordIllidan)
|
||||||
((npc_lord_illidan_stormrageAI*)LordIllidan->AI())->LiveCounter();
|
CAST_AI(npc_lord_illidan_stormrageAI, LordIllidan->AI())->LiveCounter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#####
|
/*#####
|
||||||
@@ -1616,13 +1616,13 @@ bool GOQuestAccept_GO_crystal_prison(Player* plr, GameObject* go, Quest const* q
|
|||||||
{
|
{
|
||||||
if(quest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH )
|
if(quest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH )
|
||||||
{
|
{
|
||||||
Unit* Illidan = plr->FindNearestCreature(22083, 50);
|
Creature* Illidan = plr->FindNearestCreature(22083, 50);
|
||||||
|
|
||||||
if(Illidan && !(((npc_lord_illidan_stormrageAI*)CAST_CRE(Illidan)->AI())->EventStarted))
|
if(Illidan && !CAST_AI(npc_lord_illidan_stormrageAI, Illidan->AI())->EventStarted)
|
||||||
{
|
{
|
||||||
((npc_lord_illidan_stormrageAI*)CAST_CRE(Illidan)->AI())->PlayerGUID = plr->GetGUID();
|
CAST_AI(npc_lord_illidan_stormrageAI, Illidan->AI())->PlayerGUID = plr->GetGUID();
|
||||||
((npc_lord_illidan_stormrageAI*)CAST_CRE(Illidan)->AI())->LiveCount = 0;
|
CAST_AI(npc_lord_illidan_stormrageAI, Illidan->AI())->LiveCount = 0;
|
||||||
((npc_lord_illidan_stormrageAI*)CAST_CRE(Illidan)->AI())->EventStarted=true;
|
CAST_AI(npc_lord_illidan_stormrageAI, Illidan->AI())->EventStarted=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -525,8 +525,8 @@ bool GossipSelect_npc_dirty_larry(Player *player, Creature *creature, uint32 sen
|
|||||||
{
|
{
|
||||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||||
{
|
{
|
||||||
((npc_dirty_larryAI*)creature->AI())->Event = true;
|
CAST_AI(npc_dirty_larryAI, creature->AI())->Event = true;
|
||||||
((npc_dirty_larryAI*)creature->AI())->PlayerGUID = player->GetGUID();
|
CAST_AI(npc_dirty_larryAI, creature->AI())->PlayerGUID = player->GetGUID();
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ bool GossipSelect_npc_astor_hadren(Player *player, Creature *_Creature, uint32 s
|
|||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
_Creature->setFaction(21);
|
_Creature->setFaction(21);
|
||||||
if(player)
|
if(player)
|
||||||
((npc_astor_hadrenAI*)_Creature->AI())->AttackStart(player);
|
CAST_AI(npc_astor_hadrenAI, _Creature->AI())->AttackStart(player);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -171,7 +171,7 @@ bool QuestAccept_npc_deathstalker_erland(Player* player, Creature* creature, Que
|
|||||||
if (quest->GetQuestId() == QUEST_ESCORTING)
|
if (quest->GetQuestId() == QUEST_ESCORTING)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_QUESTACCEPT, creature, player);
|
DoScriptText(SAY_QUESTACCEPT, creature, player);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest con
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_PK)
|
if (quest->GetQuestId() == QUEST_PK)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
DoScriptText(SAY_START, creature);
|
DoScriptText(SAY_START, creature);
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ bool QuestAccept_npc_bartleby(Player *player, Creature *_Creature, Quest const *
|
|||||||
if(_Quest->GetQuestId() == 1640)
|
if(_Quest->GetQuestId() == 1640)
|
||||||
{
|
{
|
||||||
_Creature->setFaction(168);
|
_Creature->setFaction(168);
|
||||||
((npc_bartlebyAI*)_Creature->AI())->PlayerGUID = player->GetGUID();
|
CAST_AI(npc_bartlebyAI, _Creature->AI())->PlayerGUID = player->GetGUID();
|
||||||
((npc_bartlebyAI*)_Creature->AI())->AttackStart(player);
|
CAST_AI(npc_bartlebyAI, _Creature->AI())->AttackStart(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -159,7 +159,7 @@ bool QuestAccept_npc_dashel_stonefist(Player *player, Creature *_Creature, Quest
|
|||||||
if(_Quest->GetQuestId() == 1447)
|
if(_Quest->GetQuestId() == 1447)
|
||||||
{
|
{
|
||||||
_Creature->setFaction(168);
|
_Creature->setFaction(168);
|
||||||
((npc_dashel_stonefistAI*)_Creature->AI())->AttackStart(player);
|
CAST_AI(npc_dashel_stonefistAI, _Creature->AI())->AttackStart(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -318,8 +318,8 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
|
|||||||
TeleportAllPlayersBack();
|
TeleportAllPlayersBack();
|
||||||
if(Unit *Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID))
|
if(Unit *Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID))
|
||||||
{
|
{
|
||||||
((boss_kalecgosAI*)CAST_CRE(Kalecgos)->AI())->TalkTimer = 1;
|
CAST_AI(boss_kalecgosAI, CAST_CRE(Kalecgos)->AI())->TalkTimer = 1;
|
||||||
((boss_kalecgosAI*)CAST_CRE(Kalecgos)->AI())->isFriendly = false;
|
CAST_AI(boss_kalecgosAI, CAST_CRE(Kalecgos)->AI())->isFriendly = false;
|
||||||
}
|
}
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
return;
|
return;
|
||||||
@@ -338,8 +338,8 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
|
|||||||
TeleportAllPlayersBack();
|
TeleportAllPlayersBack();
|
||||||
if(Unit *Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID))
|
if(Unit *Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID))
|
||||||
{
|
{
|
||||||
((boss_kalecgosAI*)CAST_CRE(Kalecgos)->AI())->TalkTimer = 1;
|
CAST_AI(boss_kalecgosAI, CAST_CRE(Kalecgos)->AI())->TalkTimer = 1;
|
||||||
((boss_kalecgosAI*)CAST_CRE(Kalecgos)->AI())->isFriendly = true;
|
CAST_AI(boss_kalecgosAI, CAST_CRE(Kalecgos)->AI())->isFriendly = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
@@ -371,7 +371,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
|
|||||||
if(Kalecgos)
|
if(Kalecgos)
|
||||||
{
|
{
|
||||||
Kalecgos->CastSpell(Kalecgos, SPELL_ENRAGE, true);
|
Kalecgos->CastSpell(Kalecgos, SPELL_ENRAGE, true);
|
||||||
((boss_kalecgosAI*)CAST_CRE(Kalecgos)->AI())->isEnraged = true;
|
CAST_AI(boss_kalecgosAI, CAST_CRE(Kalecgos)->AI())->isEnraged = true;
|
||||||
}
|
}
|
||||||
DoCast(m_creature, SPELL_ENRAGE, true);
|
DoCast(m_creature, SPELL_ENRAGE, true);
|
||||||
isEnraged = true;
|
isEnraged = true;
|
||||||
@@ -381,7 +381,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(Unit *Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID))
|
if(Unit *Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID))
|
||||||
{
|
{
|
||||||
if(((boss_kalecgosAI*)CAST_CRE(Kalecgos)->AI())->isBanished)
|
if(CAST_AI(boss_kalecgosAI, CAST_CRE(Kalecgos)->AI())->isBanished)
|
||||||
{
|
{
|
||||||
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);
|
||||||
return;
|
return;
|
||||||
@@ -570,7 +570,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff)
|
|||||||
if(Sath)
|
if(Sath)
|
||||||
{
|
{
|
||||||
Sath->CastSpell(Sath, SPELL_ENRAGE, true);
|
Sath->CastSpell(Sath, SPELL_ENRAGE, true);
|
||||||
((boss_sathrovarrAI*)CAST_CRE(Sath)->AI())->isEnraged = true;
|
CAST_AI(boss_sathrovarrAI, CAST_CRE(Sath)->AI())->isEnraged = true;
|
||||||
}
|
}
|
||||||
DoCast(m_creature, SPELL_ENRAGE, true);
|
DoCast(m_creature, SPELL_ENRAGE, true);
|
||||||
isEnraged = true;
|
isEnraged = true;
|
||||||
@@ -580,7 +580,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff)
|
|||||||
{
|
{
|
||||||
if(Unit *Sath = Unit::GetUnit(*m_creature, SathGUID))
|
if(Unit *Sath = Unit::GetUnit(*m_creature, SathGUID))
|
||||||
{
|
{
|
||||||
if(((boss_sathrovarrAI*)CAST_CRE(Sath)->AI())->isBanished)
|
if(CAST_AI(boss_sathrovarrAI, CAST_CRE(Sath)->AI())->isBanished)
|
||||||
{
|
{
|
||||||
Sath->DealDamage(Sath, Sath->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
Sath->DealDamage(Sath, Sath->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
|||||||
if(pInstance){
|
if(pInstance){
|
||||||
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)
|
||||||
((Scripted_NoMovementAI*)Control->AI())->Reset();
|
CAST_AI(Scripted_NoMovementAI, Control->AI())->Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -647,8 +647,8 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
|||||||
break;
|
break;
|
||||||
case TIMER_ORBS_EMPOWER: //Phase 3
|
case TIMER_ORBS_EMPOWER: //Phase 3
|
||||||
if(Phase == PHASE_SACRIFICE){
|
if(Phase == PHASE_SACRIFICE){
|
||||||
if(Kalec)((boss_kalecgos_kjAI*)Kalec->AI())->EmpowerOrb(true);
|
if(Kalec)CAST_AI(boss_kalecgos_kjAI, Kalec->AI())->EmpowerOrb(true);
|
||||||
}else if(Kalec)((boss_kalecgos_kjAI*)Kalec->AI())->EmpowerOrb(false);
|
}else if(Kalec)CAST_AI(boss_kalecgos_kjAI, Kalec->AI())->EmpowerOrb(false);
|
||||||
Timer[TIMER_ORBS_EMPOWER]= (Phase == PHASE_SACRIFICE) ? 45000 : 35000;
|
Timer[TIMER_ORBS_EMPOWER]= (Phase == PHASE_SACRIFICE) ? 45000 : 35000;
|
||||||
OrbActivated = true;
|
OrbActivated = true;
|
||||||
TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true;
|
TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true;
|
||||||
@@ -747,7 +747,7 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
|
|||||||
|
|
||||||
void Reset(){
|
void Reset(){
|
||||||
Phase = PHASE_DECEIVERS;
|
Phase = PHASE_DECEIVERS;
|
||||||
if(KalecKJ)((boss_kalecgos_kjAI*)KalecKJ->AI())->ResetOrbs();
|
if(KalecKJ)CAST_AI(boss_kalecgos_kjAI, KalecKJ->AI())->ResetOrbs();
|
||||||
DeceiverDeathCount = 0;
|
DeceiverDeathCount = 0;
|
||||||
SummonedDeceivers = false;
|
SummonedDeceivers = false;
|
||||||
KiljaedenDeath = false;
|
KiljaedenDeath = false;
|
||||||
@@ -767,7 +767,7 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
|
|||||||
break;
|
break;
|
||||||
case CREATURE_KILJAEDEN:
|
case CREATURE_KILJAEDEN:
|
||||||
summoned->CastSpell(summoned, SPELL_REBIRTH, false);
|
summoned->CastSpell(summoned, SPELL_REBIRTH, false);
|
||||||
((boss_kiljaedenAI*)summoned->AI())->Phase=PHASE_NORMAL;
|
CAST_AI(boss_kiljaedenAI, summoned->AI())->Phase=PHASE_NORMAL;
|
||||||
summoned->AddThreat(m_creature->getVictim(), 1.0f);
|
summoned->AddThreat(m_creature->getVictim(), 1.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -848,7 +848,7 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
|
|||||||
|
|
||||||
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)
|
||||||
((mob_kiljaeden_controllerAI*)Control->AI())->DeceiverDeathCount++;
|
CAST_AI(mob_kiljaeden_controllerAI, Control->AI())->DeceiverDeathCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff){
|
void UpdateAI(const uint32 diff){
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ bool QuestAccept_npc_OOX17(Player* player, Creature* creature, Quest const* ques
|
|||||||
creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
|
creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
|
||||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
DoScriptText(SAY_CHICKEN_ACC, creature);
|
DoScriptText(SAY_CHICKEN_ACC, creature);
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ CreatureAI* GetAI_npc_mist(Creature* pCreature)
|
|||||||
bool QuestAccept_npc_mist(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
|
bool QuestAccept_npc_mist(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
|
||||||
{
|
{
|
||||||
if (pQuest->GetQuestId() == QUEST_MIST)
|
if (pQuest->GetQuestId() == QUEST_MIST)
|
||||||
((npc_mistAI*)(pCreature->AI()))->DoStart(pPlayer->GetGUID());
|
CAST_AI(npc_mistAI, (pCreature->AI()))->DoStart(pPlayer->GetGUID());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
|
|||||||
float O = - m_creature->GetAngle(X,Y);
|
float O = - m_creature->GetAngle(X,Y);
|
||||||
|
|
||||||
if(Creature *pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000))
|
if(Creature *pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000))
|
||||||
((mob_treantAI*)pTreant->AI())->WarpGuid = m_creature->GetGUID();
|
CAST_AI(mob_treantAI, pTreant->AI())->WarpGuid = m_creature->GetGUID();
|
||||||
}
|
}
|
||||||
switch(rand()%2)
|
switch(rand()%2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ struct TRINITY_DLL_DECL eye_of_cthunAI : public Scripted_NoMovementAI
|
|||||||
void SpawnEyeTentacle(float x, float y)
|
void SpawnEyeTentacle(float x, float y)
|
||||||
{
|
{
|
||||||
Creature* Spawned;
|
Creature* Spawned;
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
Spawned = me->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
||||||
if (Spawned)
|
if (Spawned)
|
||||||
{
|
{
|
||||||
Unit* target;
|
Unit* target;
|
||||||
@@ -244,7 +244,7 @@ struct TRINITY_DLL_DECL eye_of_cthunAI : public Scripted_NoMovementAI
|
|||||||
Creature* Spawned = NULL;
|
Creature* Spawned = NULL;
|
||||||
|
|
||||||
//Spawn claw tentacle on the random target
|
//Spawn claw tentacle on the random target
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
Spawned = me->SummonCreature(MOB_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
||||||
|
|
||||||
if (Spawned)
|
if (Spawned)
|
||||||
Spawned->AI()->AttackStart(target);
|
Spawned->AI()->AttackStart(target);
|
||||||
@@ -506,7 +506,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
|||||||
void SpawnEyeTentacle(float x, float y)
|
void SpawnEyeTentacle(float x, float y)
|
||||||
{
|
{
|
||||||
Creature* Spawned;
|
Creature* Spawned;
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
Spawned = me->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
||||||
if (Spawned)
|
if (Spawned)
|
||||||
{
|
{
|
||||||
Unit* target;
|
Unit* target;
|
||||||
@@ -629,20 +629,20 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
|||||||
Creature* Spawned;
|
Creature* Spawned;
|
||||||
|
|
||||||
//Spawn flesh tentacle
|
//Spawn flesh tentacle
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Spawned = me->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
|
||||||
if (!Spawned)
|
if (!Spawned)
|
||||||
FleshTentaclesKilled++;
|
FleshTentaclesKilled++;
|
||||||
else
|
else
|
||||||
((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
CAST_AI(flesh_tentacleAI, (Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
||||||
|
|
||||||
//Spawn flesh tentacle
|
//Spawn flesh tentacle
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Spawned = me->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
|
||||||
if (!Spawned)
|
if (!Spawned)
|
||||||
FleshTentaclesKilled++;
|
FleshTentaclesKilled++;
|
||||||
else
|
else
|
||||||
((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
CAST_AI(flesh_tentacleAI, (Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
||||||
|
|
||||||
PhaseTimer = 0;
|
PhaseTimer = 0;
|
||||||
}else PhaseTimer -= diff;
|
}else PhaseTimer -= diff;
|
||||||
@@ -775,7 +775,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
|||||||
Creature* Spawned = NULL;
|
Creature* Spawned = NULL;
|
||||||
|
|
||||||
//Spawn claw tentacle on the random target
|
//Spawn claw tentacle on the random target
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_GIANT_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
Spawned = me->SummonCreature(MOB_GIANT_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
||||||
|
|
||||||
if (Spawned)
|
if (Spawned)
|
||||||
Spawned->AI()->AttackStart(target);
|
Spawned->AI()->AttackStart(target);
|
||||||
@@ -796,7 +796,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
|||||||
Creature* Spawned = NULL;
|
Creature* Spawned = NULL;
|
||||||
|
|
||||||
//Spawn claw tentacle on the random target
|
//Spawn claw tentacle on the random target
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_GIANT_EYE_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
Spawned = me->SummonCreature(MOB_GIANT_EYE_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500);
|
||||||
|
|
||||||
if (Spawned)
|
if (Spawned)
|
||||||
Spawned->AI()->AttackStart(target);
|
Spawned->AI()->AttackStart(target);
|
||||||
@@ -844,20 +844,20 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
|||||||
Creature* Spawned;
|
Creature* Spawned;
|
||||||
|
|
||||||
//Spawn flesh tentacle
|
//Spawn flesh tentacle
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Spawned = me->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
|
||||||
if (!Spawned)
|
if (!Spawned)
|
||||||
FleshTentaclesKilled++;
|
FleshTentaclesKilled++;
|
||||||
else
|
else
|
||||||
((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
CAST_AI(flesh_tentacleAI, (Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
||||||
|
|
||||||
//Spawn flesh tentacle
|
//Spawn flesh tentacle
|
||||||
Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Spawned = me->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
|
||||||
if (!Spawned)
|
if (!Spawned)
|
||||||
FleshTentaclesKilled++;
|
FleshTentaclesKilled++;
|
||||||
else
|
else
|
||||||
((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
CAST_AI(flesh_tentacleAI, (Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
||||||
|
|
||||||
PhaseTimer = 0;
|
PhaseTimer = 0;
|
||||||
}else PhaseTimer -= diff;
|
}else PhaseTimer -= diff;
|
||||||
@@ -1258,7 +1258,7 @@ void flesh_tentacleAI::JustDied(Unit* killer)
|
|||||||
Creature* Cthun = Unit::GetCreature(*m_creature, Parent);
|
Creature* Cthun = Unit::GetCreature(*m_creature, Parent);
|
||||||
|
|
||||||
if (Cthun)
|
if (Cthun)
|
||||||
((cthunAI*)(Cthun->AI()))->FleshTentcleKilled();
|
CAST_AI(cthunAI, (Cthun->AI()))->FleshTentcleKilled();
|
||||||
else error_log("TSCR: flesh_tentacle: No Cthun");
|
else error_log("TSCR: flesh_tentacle: No Cthun");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
|
|||||||
Image1->SetHealth(m_creature->GetHealth() / 5);
|
Image1->SetHealth(m_creature->GetHealth() / 5);
|
||||||
if (target)
|
if (target)
|
||||||
Image1->AI()->AttackStart(target);
|
Image1->AI()->AttackStart(target);
|
||||||
((boss_skeramAI*)Image1->AI())->IsImage = true;
|
CAST_AI(boss_skeramAI, Image1->AI())->IsImage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Image2 = m_creature->SummonCreature(15263,i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
|
Image2 = m_creature->SummonCreature(15263,i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
|
||||||
@@ -293,7 +293,7 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
|
|||||||
Image2->SetHealth(m_creature->GetHealth() / 5);
|
Image2->SetHealth(m_creature->GetHealth() / 5);
|
||||||
if (target)
|
if (target)
|
||||||
Image2->AI()->AttackStart(target);
|
Image2->AI()->AttackStart(target);
|
||||||
((boss_skeramAI*)Image2->AI())->IsImage = true;
|
CAST_AI(boss_skeramAI, Image2->AI())->IsImage = true;
|
||||||
}
|
}
|
||||||
Invisible = true;
|
Invisible = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
thismap->CreatureRelocation(m_creature, other_x, other_y, other_z, other_o);
|
thismap->CreatureRelocation(m_creature, other_x, other_y, other_z, other_o);
|
||||||
|
|
||||||
SetAfterTeleport();
|
SetAfterTeleport();
|
||||||
((boss_twinemperorsAI*) pOtherBoss->AI())->SetAfterTeleport();
|
CAST_AI(boss_twinemperorsAI, pOtherBoss->AI())->SetAfterTeleport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ bool GossipSelect_npc_floon(Player *player, Creature *_Creature, uint32 sender,
|
|||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
_Creature->setFaction(FACTION_HOSTILE_FL);
|
_Creature->setFaction(FACTION_HOSTILE_FL);
|
||||||
DoScriptText(SAY_FLOON_ATTACK, _Creature, player);
|
DoScriptText(SAY_FLOON_ATTACK, _Creature, player);
|
||||||
((npc_floonAI*)_Creature->AI())->AttackStart(player);
|
CAST_AI(npc_floonAI, _Creature->AI())->AttackStart(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -413,7 +413,7 @@ bool QuestAccept_npc_isla_starmane(Player* player, Creature* creature, Quest con
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_EFTW_H || quest->GetQuestId() == QUEST_EFTW_A)
|
if (quest->GetQuestId() == QUEST_EFTW_H || quest->GetQuestId() == QUEST_EFTW_A)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ bool QuestAccept_npc_swiftmountain(Player* player, Creature* creature, Quest con
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_HOMEWARD_BOUND)
|
if (quest->GetQuestId() == QUEST_HOMEWARD_BOUND)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
DoScriptText(SAY_READY, creature, player);
|
DoScriptText(SAY_READY, creature, player);
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ bool QuestAccept_npc_calvin_montague(Player* player, Creature* creature, Quest c
|
|||||||
{
|
{
|
||||||
creature->setFaction(FACTION_HOSTILE);
|
creature->setFaction(FACTION_HOSTILE);
|
||||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
((npc_calvin_montagueAI*)creature->AI())->AttackStart(player);
|
CAST_AI(npc_calvin_montagueAI, creature->AI())->AttackStart(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ bool ChooseReward_npc_lady_sylvanas_windrunner(Player *player, Creature *_Creatu
|
|||||||
{
|
{
|
||||||
if( _Quest->GetQuestId() == 9180 )
|
if( _Quest->GetQuestId() == 9180 )
|
||||||
{
|
{
|
||||||
((npc_lady_sylvanas_windrunnerAI*)_Creature->AI())->LamentEvent = true;
|
CAST_AI(npc_lady_sylvanas_windrunnerAI, _Creature->AI())->LamentEvent = true;
|
||||||
((npc_lady_sylvanas_windrunnerAI*)_Creature->AI())->DoPlaySoundToSet(_Creature,SOUND_CREDIT);
|
CAST_AI(npc_lady_sylvanas_windrunnerAI, _Creature->AI())->DoPlaySoundToSet(_Creature,SOUND_CREDIT);
|
||||||
_Creature->CastSpell(_Creature,SPELL_SYLVANAS_CAST,false);
|
_Creature->CastSpell(_Creature,SPELL_SYLVANAS_CAST,false);
|
||||||
|
|
||||||
for( uint8 i = 0; i < 4; ++i)
|
for( uint8 i = 0; i < 4; ++i)
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ bool QuestAccept_npc_ame(Player* player, Creature* creature, Quest const* quest)
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_CHASING_AME)
|
if (quest->GetQuestId() == QUEST_CHASING_AME)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(false, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, true, false, player->GetGUID());
|
||||||
DoScriptText(SAY_READY, creature, player);
|
DoScriptText(SAY_READY, creature, player);
|
||||||
creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
|
creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
|
||||||
// Change faction so mobs attack
|
// Change faction so mobs attack
|
||||||
|
|||||||
+1
-1
@@ -365,7 +365,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
|
|||||||
ingvar->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INGVAR_UNDEAD); // Visual Hack - when he dies he becomes human model -> wrong
|
ingvar->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INGVAR_UNDEAD); // Visual Hack - when he dies he becomes human model -> wrong
|
||||||
Creature* c_ingvar = (Creature*)ingvar;
|
Creature* c_ingvar = (Creature*)ingvar;
|
||||||
|
|
||||||
((boss_ingvar_the_plundererAI*)(c_ingvar->AI()))->StartZombiePhase();
|
CAST_AI(boss_ingvar_the_plundererAI, (c_ingvar->AI()))->StartZombiePhase();
|
||||||
|
|
||||||
m_creature->GetMotionMaster()->MovePoint(2,x+1,y,z+30);
|
m_creature->GetMotionMaster()->MovePoint(2,x+1,y,z+30);
|
||||||
Resurect_Phase++;
|
Resurect_Phase++;
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ struct TRINITY_DLL_DECL boss_kelesethAI : public ScriptedAI
|
|||||||
Creature* Chains = m_creature->SummonCreature(CREATURE_FROSTTOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000);
|
Creature* Chains = m_creature->SummonCreature(CREATURE_FROSTTOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000);
|
||||||
if(Chains)
|
if(Chains)
|
||||||
{
|
{
|
||||||
((mob_frost_tombAI*)Chains->AI())->SetPrisoner(target);
|
CAST_AI(mob_frost_tombAI, Chains->AI())->SetPrisoner(target);
|
||||||
Chains->CastSpell(target, SPELL_FROST_TOMB, true);
|
Chains->CastSpell(target, SPELL_FROST_TOMB, true);
|
||||||
|
|
||||||
DoScriptText(SAY_FROST_TOMB, m_creature);
|
DoScriptText(SAY_FROST_TOMB, m_creature);
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ bool QuestAccept_npc_daphne_stilwell(Player* pPlayer, Creature* pCreature, const
|
|||||||
if (pQuest->GetQuestId() == QUEST_TOME_VALOR)
|
if (pQuest->GetQuestId() == QUEST_TOME_VALOR)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DS_START, pCreature);
|
DoScriptText(SAY_DS_START, pCreature);
|
||||||
((npc_escortAI*)(pCreature->AI()))->Start(true, true, true, pPlayer->GetGUID());
|
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, true, true, pPlayer->GetGUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -251,7 +251,7 @@ bool QuestAccept_npc_defias_traitor(Player* player, Creature* creature, Quest co
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_DEFIAS_BROTHERHOOD)
|
if (quest->GetQuestId() == QUEST_DEFIAS_BROTHERHOOD)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, true, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, true, player->GetGUID());
|
||||||
DoScriptText(SAY_START, creature, player);
|
DoScriptText(SAY_START, creature, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ bool QuestAccept_npc_kayra_longmane(Player* player, Creature* creature, Quest co
|
|||||||
{
|
{
|
||||||
if (quest->GetQuestId() == QUEST_EFU)
|
if (quest->GetQuestId() == QUEST_EFU)
|
||||||
{
|
{
|
||||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||||
creature->setFaction(113);
|
creature->setFaction(113);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ bool GossipSelect_npc_zulaman_hostage(Player* player, Creature* _Creature, uint3
|
|||||||
/*Creature* summon = _Creature->SummonCreature(HostageInfo[progress], x-2, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
/*Creature* summon = _Creature->SummonCreature(HostageInfo[progress], x-2, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||||
if(summon)
|
if(summon)
|
||||||
{
|
{
|
||||||
((npc_zulaman_hostageAI*)summon->AI())->PlayerGUID = player->GetGUID();
|
CAST_AI(npc_zulaman_hostageAI, summon->AI())->PlayerGUID = player->GetGUID();
|
||||||
((npc_zulaman_hostageAI*)summon->AI())->IsLoot = true;
|
CAST_AI(npc_zulaman_hostageAI, summon->AI())->IsLoot = true;
|
||||||
summon->SetDisplayId(10056);
|
summon->SetDisplayId(10056);
|
||||||
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
summon->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
summon->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ bool GossipSelect_npc_sergeant_bly(Player *player, Creature *_Creature, uint32 s
|
|||||||
{
|
{
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
_Creature->setFaction(FACTION_HOSTILE);
|
_Creature->setFaction(FACTION_HOSTILE);
|
||||||
((npc_sergeant_blyAI*)_Creature->AI())->AttackStart(player);
|
CAST_AI(npc_sergeant_blyAI, _Creature->AI())->AttackStart(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user