mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 06:29:50 -04:00
Merge [SD2] Apply SD2 code style
--HG-- branch : trunk
This commit is contained in:
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
|
||||
//Sleep_Timer
|
||||
if (Sleep_Timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_SLEEP);
|
||||
|
||||
Sleep_Timer = 8000 + rand()%8000;
|
||||
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
|
||||
//Tailsweep every 2 seconds
|
||||
if (TailSweep_Timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_TAILSWEEP);
|
||||
|
||||
TailSweep_Timer = 2000;
|
||||
@@ -103,7 +103,7 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
|
||||
}else VolatileInfection_Timer -= diff;
|
||||
|
||||
//CorruptionofEarth_Timer
|
||||
if ( (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 75)
|
||||
if ((int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 75)
|
||||
{
|
||||
if (CorruptionofEarth1_Timer < diff)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//CorruptionofEarth_Timer
|
||||
if ( (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 50)
|
||||
if ((int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 50)
|
||||
{
|
||||
if (CorruptionofEarth2_Timer < diff)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//CorruptionofEarth_Timer
|
||||
if ( (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 25)
|
||||
if ((int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 25)
|
||||
{
|
||||
if (CorruptionofEarth3_Timer < diff)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
|
||||
void SummonShades(Unit* victim)
|
||||
{
|
||||
if(!victim)
|
||||
if (!victim)
|
||||
return;
|
||||
|
||||
Rand = rand()%15;
|
||||
@@ -97,7 +97,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
}
|
||||
Rand = 0;
|
||||
Summoned = DoSpawnCreature(15302, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
|
||||
if(Summoned)
|
||||
if (Summoned)
|
||||
(Summoned->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
//Tailsweep every 2 seconds
|
||||
if (TailSweep_Timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_TAILSWEEP);
|
||||
|
||||
TailSweep_Timer = 2000;
|
||||
@@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
} else BellowingRoar_Timer -= diff;
|
||||
|
||||
//Summon 3 Shades
|
||||
if ( !Shades && (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 75)
|
||||
if (!Shades && (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 75)
|
||||
{
|
||||
if (Summon1_Timer < diff)
|
||||
{
|
||||
@@ -192,7 +192,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Summon 3 Shades
|
||||
if ( !Shades && (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 50)
|
||||
if (!Shades && (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 50)
|
||||
{
|
||||
if (Summon2_Timer < diff)
|
||||
{
|
||||
@@ -215,7 +215,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Summon 3 Shades
|
||||
if ( !Shades && (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 25)
|
||||
if (!Shades && (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 25)
|
||||
{
|
||||
if (Summon3_Timer < diff)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
|
||||
void SummonDruids(Unit* victim)
|
||||
{
|
||||
if(!victim)
|
||||
if (!victim)
|
||||
return;
|
||||
|
||||
Rand = rand()%10;
|
||||
@@ -87,7 +87,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
}
|
||||
Rand = 0;
|
||||
Summoned = DoSpawnCreature(15260, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
|
||||
if(Summoned)
|
||||
if (Summoned)
|
||||
(Summoned->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
//Sleep_Timer
|
||||
if (Sleep_Timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_SLEEP);
|
||||
|
||||
Sleep_Timer = 8000 + rand()%7000;
|
||||
@@ -115,7 +115,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
//Tailsweep every 2 seconds
|
||||
if (TailSweep_Timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_TAILSWEEP);
|
||||
|
||||
TailSweep_Timer = 2000;
|
||||
@@ -132,14 +132,14 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
if (LightningWave_Timer < diff)
|
||||
{
|
||||
//Cast LIGHTNINGWAVE on a Random target
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_LIGHTNINGWAVE);
|
||||
|
||||
LightningWave_Timer = 7000 + rand()%5000;
|
||||
}else LightningWave_Timer -= diff;
|
||||
|
||||
//Summon Druids
|
||||
if ( (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 75)
|
||||
if ((int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 75)
|
||||
{
|
||||
if (SummonDruids1_Timer < diff)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Summon Druids
|
||||
if ( (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 50)
|
||||
if ((int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 50)
|
||||
{
|
||||
if (SummonDruids2_Timer < diff)
|
||||
{
|
||||
@@ -173,7 +173,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Summon Druids
|
||||
if ( (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 25)
|
||||
if ((int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5) == 25)
|
||||
{
|
||||
if (SummonDruids3_Timer < diff)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ struct TRINITY_DLL_DECL generic_creatureAI : public ScriptedAI
|
||||
|
||||
//Buff timer (only buff when we are alive and not in combat
|
||||
if (!m_creature->isInCombat() && m_creature->isAlive())
|
||||
if (BuffTimer < diff )
|
||||
if (BuffTimer < diff)
|
||||
{
|
||||
//Find a spell that targets friendly and applies an aura (these are generally buffs)
|
||||
SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
|
||||
@@ -77,14 +77,14 @@ struct TRINITY_DLL_DECL generic_creatureAI : public ScriptedAI
|
||||
}else BuffTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//If we are within range melee the target
|
||||
if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
{
|
||||
//Make sure our attack is ready and we arn't currently casting
|
||||
if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
bool Healing = false;
|
||||
SpellEntry const *info = NULL;
|
||||
@@ -176,9 +176,9 @@ struct TRINITY_DLL_DECL trigger_periodicAI : public NullCreatureAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(timer < diff)
|
||||
if (timer < diff)
|
||||
{
|
||||
if(spell)
|
||||
if (spell)
|
||||
me->CastSpell(me, spell, true);
|
||||
timer = interval;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ struct TRINITY_DLL_DECL trigger_deathAI : public NullCreatureAI
|
||||
trigger_deathAI(Creature* c) : NullCreatureAI(c) {}
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if(me->m_spells[0])
|
||||
if (me->m_spells[0])
|
||||
me->CastSpell(killer, me->m_spells[0], true);
|
||||
}
|
||||
};
|
||||
@@ -206,15 +206,15 @@ struct TRINITY_DLL_DECL mob_webwrapAI : public NullCreatureAI
|
||||
void SetGUID(const uint64 &guid, int32 param)
|
||||
{
|
||||
victimGUID = guid;
|
||||
if(me->m_spells[0] && victimGUID)
|
||||
if(Unit *victim = Unit::GetUnit(*me, victimGUID))
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
if (Unit *victim = Unit::GetUnit(*me, victimGUID))
|
||||
victim->CastSpell(victim, me->m_spells[0], true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if(me->m_spells[0] && victimGUID)
|
||||
if(Unit *victim = Unit::GetUnit(*me, victimGUID))
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
if (Unit *victim = Unit::GetUnit(*me, victimGUID))
|
||||
victim->RemoveAurasDueToSpell(me->m_spells[0], me->GetGUID());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -216,37 +216,37 @@ CreatureAI* GetAI_custom_example(Creature *_Creature)
|
||||
}
|
||||
|
||||
//This function is called when the player clicks an option on the gossip menu
|
||||
void SendDefaultMenu_custom_example(Player *player, Creature *_Creature, uint32 action)
|
||||
void SendDefaultMenu_custom_example(Player* pPlayer, Creature *_Creature, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
||||
{
|
||||
//Set our faction to hostile twoards all
|
||||
_Creature->setFaction(24);
|
||||
_Creature->Attack(player, true);
|
||||
player->PlayerTalkClass->CloseGossip();
|
||||
_Creature->Attack(pPlayer, true);
|
||||
pPlayer->PlayerTalkClass->CloseGossip();
|
||||
}
|
||||
}
|
||||
|
||||
//This function is called when the player clicks an option on the gossip menu
|
||||
bool GossipSelect_custom_example(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_custom_example(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (sender == GOSSIP_SENDER_MAIN)
|
||||
SendDefaultMenu_custom_example(player, _Creature, action);
|
||||
SendDefaultMenu_custom_example(pPlayer, _Creature, action);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//This function is called when the player opens the gossip menu
|
||||
bool GossipHello_custom_example(Player *player, Creature *_Creature)
|
||||
bool GossipHello_custom_example(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//Our Recive emote function
|
||||
bool ReceiveEmote_custom_example(Player *player, Creature *_Creature, uint32 emote)
|
||||
bool ReceiveEmote_custom_example(Player* pPlayer, Creature *_Creature, uint32 emote)
|
||||
{
|
||||
_Creature->HandleEmoteCommand(emote);
|
||||
|
||||
|
||||
@@ -25,43 +25,43 @@ EndScriptData */
|
||||
#include <cstring>
|
||||
|
||||
//This function is called when the player opens the gossip menubool
|
||||
bool GossipHello_custom_gossip_codebox(Player *player, Creature *_Creature)
|
||||
bool GossipHello_custom_gossip_codebox(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, "A quiz: what's your name?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm not interested", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, "A quiz: what's your name?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm not interested", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
pPlayer->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
//This function is called when the player clicks an option on the gossip menubool
|
||||
bool GossipSelect_custom_gossip_codebox(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_custom_gossip_codebox(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
{
|
||||
_Creature->Say("Normal select, guess you're not interested.", LANG_UNIVERSAL, 0);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelectWithCode_custom_gossip_codebox( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
|
||||
bool GossipSelectWithCode_custom_gossip_codebox(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action, const char* sCode)
|
||||
{
|
||||
if(sender == GOSSIP_SENDER_MAIN)
|
||||
if (sender == GOSSIP_SENDER_MAIN)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
if(std::strcmp(sCode, player->GetName())!=0)
|
||||
if (std::strcmp(sCode, pPlayer->GetName())!=0)
|
||||
{
|
||||
_Creature->Say("Wrong!", LANG_UNIVERSAL, 0);
|
||||
_Creature->CastSpell(player, 12826, true);
|
||||
_Creature->CastSpell(pPlayer, 12826, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_Creature->Say("You're right, you are allowed to see my inner secrets.", LANG_UNIVERSAL, 0);
|
||||
_Creature->CastSpell(player, 26990, true);
|
||||
_Creature->CastSpell(pPlayer, 26990, true);
|
||||
}
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,24 +3,24 @@
|
||||
|
||||
#define GOSSIP_FLIGHT "I need a ride"
|
||||
|
||||
bool GossipHello_npc_acherus_taxi(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_acherus_taxi(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->SetTaxiCheater(true);
|
||||
pPlayer->SetTaxiCheater(true);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(9978,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(9978,_Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_acherus_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_acherus_taxi(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
if (player->GetPositionZ() >=316)
|
||||
if (pPlayer->GetPositionZ() >=316)
|
||||
{
|
||||
player->GetSession()->SendDoFlight(24446, 1053);
|
||||
pPlayer->GetSession()->SendDoFlight(24446, 1053);
|
||||
}else{
|
||||
player->GetSession()->SendDoFlight(24446, 1054);
|
||||
pPlayer->GetSession()->SendDoFlight(24446, 1054);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,84 +8,84 @@
|
||||
#define GOSSIP_BOTTOM "Yes, Please. I would like to return to the ground floor of the temple."
|
||||
#define GOSSIP_ONEDOWN "I would like to see Lord Afrasastrasz, in the middle of the temple."
|
||||
|
||||
bool GossipHello_npc_wyrmresttempel_middle_taxi(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->SetTaxiCheater(true);
|
||||
pPlayer->SetTaxiCheater(true);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(12887,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(12887,_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_wyrmresttempel_middle_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
player->GetSession()->SendDoFlight(6376, 881);
|
||||
pPlayer->GetSession()->SendDoFlight(6376, 881);
|
||||
}
|
||||
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 2)
|
||||
{
|
||||
player->GetSession()->SendDoFlight(6376, 882);
|
||||
pPlayer->GetSession()->SendDoFlight(6376, 882);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_wyrmresttempel_bottom_taxi(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->SetTaxiCheater(true);
|
||||
pPlayer->SetTaxiCheater(true);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(12713,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(12713,_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 4)
|
||||
{
|
||||
player->GetSession()->SendDoFlight(6376, 878);
|
||||
pPlayer->GetSession()->SendDoFlight(6376, 878);
|
||||
}
|
||||
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 3)
|
||||
{
|
||||
player->GetSession()->SendDoFlight(6376, 883);
|
||||
pPlayer->GetSession()->SendDoFlight(6376, 883);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_wyrmresttempel_top_taxi(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_wyrmresttempel_top_taxi(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->SetTaxiCheater(true);
|
||||
pPlayer->SetTaxiCheater(true);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOTTOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ONEDOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
player->SEND_GOSSIP_MENU(12714,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOTTOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ONEDOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
pPlayer->SEND_GOSSIP_MENU(12714,_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_wyrmresttempel_top_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_wyrmresttempel_top_taxi(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 5)
|
||||
{
|
||||
player->GetSession()->SendDoFlight(6376, 879);
|
||||
pPlayer->GetSession()->SendDoFlight(6376, 879);
|
||||
}
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 6)
|
||||
|
||||
{
|
||||
player->GetSession()->SendDoFlight(6376, 880);
|
||||
pPlayer->GetSession()->SendDoFlight(6376, 880);
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -47,7 +47,7 @@ struct TRINITY_DLL_DECL npc_testAI : public npc_escortAI
|
||||
{
|
||||
m_creature->Say("Wild Felboar attack!", LANG_UNIVERSAL, 0);
|
||||
Creature* temp = m_creature->SummonCreature(21878, m_creature->GetPositionX()+5, m_creature->GetPositionY()+7, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
|
||||
if(temp)
|
||||
if (temp)
|
||||
temp->AI()->AttackStart(m_creature);
|
||||
}
|
||||
break;
|
||||
@@ -89,7 +89,7 @@ struct TRINITY_DLL_DECL npc_testAI : public npc_escortAI
|
||||
if (killer == m_creature)
|
||||
{
|
||||
Unit *pTemp = Unit::GetUnit(*m_creature,PlayerGUID);
|
||||
if( pTemp )
|
||||
if (pTemp)
|
||||
DoWhisper("How dare you leave me like that! I hate you! =*(", pTemp);
|
||||
}
|
||||
else m_creature->Say("...no...how could you let me die $N", LANG_UNIVERSAL, PlayerGUID);
|
||||
@@ -147,41 +147,41 @@ CreatureAI* GetAI_test(Creature *_Creature)
|
||||
return (CreatureAI*)testAI;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_test(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_test(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID());
|
||||
_Creature->prepareGossipMenu(player,0);
|
||||
pPlayer->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID());
|
||||
_Creature->prepareGossipMenu(pPlayer,0);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Click to Test Escort(Attack, Defend, Run)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Click to Test Escort(NoAttack, NoDefend, Walk)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Click to Test Escort(NoAttack, Defend, Walk)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Click to Test Escort(Attack, Defend, Run)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Click to Test Escort(NoAttack, NoDefend, Walk)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Click to Test Escort(NoAttack, Defend, Walk)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
|
||||
_Creature->sendPreparedGossip( player );
|
||||
_Creature->sendPreparedGossip(pPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_test(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_test(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
((npc_escortAI*)(_Creature->AI()))->Start(true, true, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
((npc_escortAI*)(_Creature->AI()))->Start(true, true, pPlayer->GetGUID());
|
||||
|
||||
return true; // prevent Trinity core handling
|
||||
}
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, pPlayer->GetGUID());
|
||||
|
||||
return true; // prevent Trinity core handling
|
||||
}
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+3)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
((npc_escortAI*)(_Creature->AI()))->Start(false, false, pPlayer->GetGUID());
|
||||
|
||||
return true; // prevent Trinity core handling
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ struct TRINITY_DLL_DECL example_creatureAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Our Recive emote function
|
||||
void ReceiveEmote(Player *player, uint32 emote)
|
||||
void ReceiveEmote(Player* pPlayer, uint32 emote)
|
||||
{
|
||||
m_creature->HandleEmoteCommand(emote);
|
||||
|
||||
@@ -212,31 +212,31 @@ CreatureAI* GetAI_example_creature(Creature *_Creature)
|
||||
}
|
||||
|
||||
//This function is called when the player clicks an option on the gossip menu
|
||||
void SendDefaultMenu_example_creature(Player *player, Creature *_Creature, uint32 action)
|
||||
void SendDefaultMenu_example_creature(Player* pPlayer, Creature *_Creature, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
||||
{
|
||||
//Set our faction to hostile twoards all
|
||||
_Creature->setFaction(24);
|
||||
_Creature->Attack(player, true);
|
||||
player->PlayerTalkClass->CloseGossip();
|
||||
_Creature->Attack(pPlayer, true);
|
||||
pPlayer->PlayerTalkClass->CloseGossip();
|
||||
}
|
||||
}
|
||||
|
||||
//This function is called when the player clicks an option on the gossip menu
|
||||
bool GossipSelect_example_creature(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_example_creature(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (sender == GOSSIP_SENDER_MAIN)
|
||||
SendDefaultMenu_example_creature(player, _Creature, action);
|
||||
SendDefaultMenu_example_creature(pPlayer, _Creature, action);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//This function is called when the player opens the gossip menu
|
||||
bool GossipHello_example_creature(Player *player, Creature *_Creature)
|
||||
bool GossipHello_example_creature(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL example_escortAI : public npc_escortAI
|
||||
{
|
||||
DoScriptText(SAY_WP_2, m_creature);
|
||||
Creature* temp = m_creature->SummonCreature(21878, m_creature->GetPositionX()+5, m_creature->GetPositionY()+7, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
|
||||
if(temp)
|
||||
if (temp)
|
||||
temp->AI()->AttackStart(m_creature);
|
||||
}
|
||||
break;
|
||||
@@ -133,7 +133,7 @@ struct TRINITY_DLL_DECL example_escortAI : public npc_escortAI
|
||||
DeathCoilTimer = 4000;
|
||||
}else DeathCoilTimer -= diff;
|
||||
}
|
||||
else if(!m_creature->isInCombat())
|
||||
else if (!m_creature->isInCombat())
|
||||
{
|
||||
//Out of combat but being escorted
|
||||
if (IsBeingEscorted)
|
||||
@@ -168,41 +168,41 @@ CreatureAI* GetAI_example_escort(Creature *_Creature)
|
||||
return testAI;
|
||||
}
|
||||
|
||||
bool GossipHello_example_escort(Player *player, Creature *_Creature)
|
||||
bool GossipHello_example_escort(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID());
|
||||
_Creature->prepareGossipMenu(player,0);
|
||||
pPlayer->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID());
|
||||
_Creature->prepareGossipMenu(pPlayer,0);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
|
||||
_Creature->sendPreparedGossip( player );
|
||||
_Creature->sendPreparedGossip(pPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_example_escort(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_example_escort(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, pPlayer->GetGUID());
|
||||
|
||||
return true; // prevent mangos core handling
|
||||
}
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, false, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, false, pPlayer->GetGUID());
|
||||
|
||||
return true; // prevent mangos core handling
|
||||
}
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+3)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, pPlayer->GetGUID());
|
||||
|
||||
return true; // prevent mangos core handling
|
||||
}
|
||||
|
||||
@@ -32,43 +32,43 @@ EndScriptData */
|
||||
#define GOSSIP_ITEM_2 "I'm not interested"
|
||||
|
||||
//This function is called when the player opens the gossip menubool
|
||||
bool GossipHello_example_gossip_codebox(Player *player, Creature *_Creature)
|
||||
bool GossipHello_example_gossip_codebox(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
pPlayer->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
//This function is called when the player clicks an option on the gossip menubool
|
||||
bool GossipSelect_example_gossip_codebox(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_example_gossip_codebox(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
{
|
||||
DoScriptText(SAY_NOT_INTERESTED, _Creature);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelectWithCode_example_gossip_codebox( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
|
||||
bool GossipSelectWithCode_example_gossip_codebox(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action, const char* sCode)
|
||||
{
|
||||
if(sender == GOSSIP_SENDER_MAIN)
|
||||
if (sender == GOSSIP_SENDER_MAIN)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
if(std::strcmp(sCode, player->GetName())!=0)
|
||||
if (std::strcmp(sCode, pPlayer->GetName())!=0)
|
||||
{
|
||||
DoScriptText(SAY_WRONG, _Creature);
|
||||
_Creature->CastSpell(player, 12826, true);
|
||||
_Creature->CastSpell(pPlayer, 12826, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoScriptText(SAY_CORRECT, _Creature);
|
||||
_Creature->CastSpell(player, 26990, true);
|
||||
_Creature->CastSpell(pPlayer, 26990, true);
|
||||
}
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,22 +25,22 @@ EndScriptData */
|
||||
|
||||
#define SAY_HI -1999925
|
||||
|
||||
bool AT_example_areatrigger(Player *player, AreaTriggerEntry *at)
|
||||
bool AT_example_areatrigger(Player* pPlayer, AreaTriggerEntry *at)
|
||||
{
|
||||
DoScriptText(SAY_HI, player);
|
||||
DoScriptText(SAY_HI, pPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
extern void LoadDatabase();
|
||||
bool ItemUse_example_item(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_example_item(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
LoadDatabase();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GOHello_example_go_teleporter(Player *player, GameObject* _GO)
|
||||
bool GOHello_example_go_teleporter(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
player->TeleportTo(0, 1807.07f,336.105f,70.3975f,0.0f);
|
||||
pPlayer->TeleportTo(0, 1807.07f,336.105f,70.3975f,0.0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@ enum
|
||||
SPELL_SUMMON_GHOST_SABER = 5968,
|
||||
};
|
||||
|
||||
bool GOHello_go_cat_figurine(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_cat_figurine(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
player->CastSpell(player,SPELL_SUMMON_GHOST_SABER,true);
|
||||
pPlayer->CastSpell(pPlayer,SPELL_SUMMON_GHOST_SABER,true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,44 +61,44 @@ bool GOHello_go_cat_figurine(Player *player, GameObject* _GO)
|
||||
## go_crystal_pylons (3x)
|
||||
######*/
|
||||
|
||||
bool GOHello_go_northern_crystal_pylon(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_northern_crystal_pylon(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
{
|
||||
player->PrepareQuestMenu(_GO->GetGUID());
|
||||
player->SendPreparedQuest(_GO->GetGUID());
|
||||
pPlayer->PrepareQuestMenu(_GO->GetGUID());
|
||||
pPlayer->SendPreparedQuest(_GO->GetGUID());
|
||||
}
|
||||
|
||||
if (player->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(4285);
|
||||
if (pPlayer->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(4285);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GOHello_go_eastern_crystal_pylon(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_eastern_crystal_pylon(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
{
|
||||
player->PrepareQuestMenu(_GO->GetGUID());
|
||||
player->SendPreparedQuest(_GO->GetGUID());
|
||||
pPlayer->PrepareQuestMenu(_GO->GetGUID());
|
||||
pPlayer->SendPreparedQuest(_GO->GetGUID());
|
||||
}
|
||||
|
||||
if (player->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(4287);
|
||||
if (pPlayer->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(4287);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GOHello_go_western_crystal_pylon(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_western_crystal_pylon(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
{
|
||||
player->PrepareQuestMenu(_GO->GetGUID());
|
||||
player->SendPreparedQuest(_GO->GetGUID());
|
||||
pPlayer->PrepareQuestMenu(_GO->GetGUID());
|
||||
pPlayer->SendPreparedQuest(_GO->GetGUID());
|
||||
}
|
||||
|
||||
if (player->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(4288);
|
||||
if (pPlayer->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(4288);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -107,11 +107,11 @@ bool GOHello_go_western_crystal_pylon(Player *player, GameObject* _GO)
|
||||
## go_barov_journal
|
||||
######*/
|
||||
|
||||
bool GOHello_go_barov_journal(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_barov_journal(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if(player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !player->HasSpell(26086))
|
||||
if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(26086))
|
||||
{
|
||||
player->CastSpell(player,26095,false);
|
||||
pPlayer->CastSpell(pPlayer,26095,false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -120,11 +120,11 @@ bool GOHello_go_barov_journal(Player *player, GameObject* _GO)
|
||||
## go_field_repair_bot_74A
|
||||
######*/
|
||||
|
||||
bool GOHello_go_field_repair_bot_74A(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_field_repair_bot_74A(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if(player->HasSkill(SKILL_ENGINERING) && player->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !player->HasSpell(22704))
|
||||
if (pPlayer->HasSkill(SKILL_ENGINERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !pPlayer->HasSpell(22704))
|
||||
{
|
||||
player->CastSpell(player,22864,false);
|
||||
pPlayer->CastSpell(pPlayer,22864,false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -153,10 +153,10 @@ bool GOHello_go_gilded_brazier(Player* pPlayer, GameObject* pGO)
|
||||
## go_orb_of_command
|
||||
######*/
|
||||
|
||||
bool GOHello_go_orb_of_command(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_orb_of_command(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if( player->GetQuestRewardStatus(7761) )
|
||||
player->CastSpell(player,23460,true);
|
||||
if (pPlayer->GetQuestRewardStatus(7761))
|
||||
pPlayer->CastSpell(pPlayer,23460,true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -165,11 +165,11 @@ bool GOHello_go_orb_of_command(Player *player, GameObject* _GO)
|
||||
## go_tablet_of_madness
|
||||
######*/
|
||||
|
||||
bool GOHello_go_tablet_of_madness(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_tablet_of_madness(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if (player->HasSkill(SKILL_ALCHEMY) && player->GetSkillValue(SKILL_ALCHEMY) >= 300 && !player->HasSpell(24266))
|
||||
if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetSkillValue(SKILL_ALCHEMY) >= 300 && !pPlayer->HasSpell(24266))
|
||||
{
|
||||
player->CastSpell(player,24267,false);
|
||||
pPlayer->CastSpell(pPlayer,24267,false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -179,13 +179,13 @@ bool GOHello_go_tablet_of_madness(Player *player, GameObject* _GO)
|
||||
######*/
|
||||
|
||||
//TODO: use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
|
||||
bool GOHello_go_tablet_of_the_seven(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_tablet_of_the_seven(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if (_GO->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
return true;
|
||||
|
||||
if (player->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player,15065,false);
|
||||
if (pPlayer->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->CastSpell(pPlayer,15065,false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -194,10 +194,10 @@ bool GOHello_go_tablet_of_the_seven(Player *player, GameObject* _GO)
|
||||
## go_jump_a_tron
|
||||
######*/
|
||||
|
||||
bool GOHello_go_jump_a_tron(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_jump_a_tron(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player,33382,true);
|
||||
if (pPlayer->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->CastSpell(pPlayer,33382,true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -226,11 +226,11 @@ bool GOHello_go_ethereum_prison(Player* pPlayer, GameObject* pGo)
|
||||
{
|
||||
int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
|
||||
|
||||
if(Creature* pCreature = pPlayer->SummonCreature(NpcPrisonEntry[Random],
|
||||
if (Creature* pCreature = pPlayer->SummonCreature(NpcPrisonEntry[Random],
|
||||
pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
{
|
||||
if(!pCreature->IsHostileTo(pPlayer))
|
||||
if (!pCreature->IsHostileTo(pPlayer))
|
||||
{
|
||||
uint32 Spell = 0;
|
||||
FactionTemplateEntry const* pFaction = pCreature->getFactionTemplateEntry();
|
||||
@@ -245,7 +245,7 @@ bool GOHello_go_ethereum_prison(Player* pPlayer, GameObject* pGo)
|
||||
case 970: Spell = SPELL_REP_SPOR; break;
|
||||
}
|
||||
|
||||
if(Spell)
|
||||
if (Spell)
|
||||
pCreature->CastSpell(pPlayer, Spell, false);
|
||||
else
|
||||
error_log("TSCR: go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
|
||||
@@ -340,7 +340,7 @@ bool GOHello_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo)
|
||||
break;
|
||||
}
|
||||
|
||||
if(BirdEntry)
|
||||
if (BirdEntry)
|
||||
pPlayer->SummonCreature(BirdEntry, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
|
||||
return false;
|
||||
|
||||
@@ -70,7 +70,7 @@ void guardAI::UpdateAI(const uint32 diff)
|
||||
|
||||
//Buff timer (only buff when we are alive and not in combat
|
||||
if (m_creature->isAlive() && !m_creature->isInCombat())
|
||||
if (BuffTimer < diff )
|
||||
if (BuffTimer < diff)
|
||||
{
|
||||
//Find a spell that targets friendly and applies an aura (these are generally buffs)
|
||||
SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
|
||||
@@ -94,10 +94,10 @@ void guardAI::UpdateAI(const uint32 diff)
|
||||
return;
|
||||
|
||||
// Make sure our attack is ready and we arn't currently casting
|
||||
if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
//If we are within range melee the target
|
||||
if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
{
|
||||
bool Healing = false;
|
||||
SpellEntry const *info = NULL;
|
||||
@@ -183,14 +183,14 @@ void guardAI::DoReplyToTextEmote(uint32 em)
|
||||
}
|
||||
}
|
||||
|
||||
void guardAI_orgrimmar::ReceiveEmote(Player *player, uint32 text_emote)
|
||||
void guardAI_orgrimmar::ReceiveEmote(Player* pPlayer, uint32 text_emote)
|
||||
{
|
||||
if (player->GetTeam()==HORDE)
|
||||
if (pPlayer->GetTeam()==HORDE)
|
||||
DoReplyToTextEmote(text_emote);
|
||||
}
|
||||
|
||||
void guardAI_stormwind::ReceiveEmote(Player *player, uint32 text_emote)
|
||||
void guardAI_stormwind::ReceiveEmote(Player* pPlayer, uint32 text_emote)
|
||||
{
|
||||
if (player->GetTeam() == ALLIANCE)
|
||||
if (pPlayer->GetTeam() == ALLIANCE)
|
||||
DoReplyToTextEmote(text_emote);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ enum
|
||||
SPELL_ARCANE_CHARGES = 45072
|
||||
};
|
||||
|
||||
bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_only_for_flight(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
uint32 itemId = _Item->GetEntry();
|
||||
bool disabled = false;
|
||||
@@ -50,25 +50,25 @@ bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets
|
||||
switch(itemId)
|
||||
{
|
||||
case 24538:
|
||||
if(player->GetAreaId() != 3628)
|
||||
if (pPlayer->GetAreaId() != 3628)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34489:
|
||||
if(player->GetZoneId() != 4080)
|
||||
if (pPlayer->GetZoneId() != 4080)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34475:
|
||||
if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES))
|
||||
Spell::SendCastResult(player, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
|
||||
Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
|
||||
break;
|
||||
}
|
||||
|
||||
// allow use in flight only
|
||||
if( player->isInFlight() && !disabled)
|
||||
if (pPlayer->isInFlight() && !disabled)
|
||||
return false;
|
||||
|
||||
// error
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -78,30 +78,30 @@ bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets
|
||||
|
||||
//This is just a hack and should be removed from here.
|
||||
//Creature/Item are in fact created before spell are sucessfully casted, without any checks at all to ensure proper/expected behavior.
|
||||
bool ItemUse_item_draenei_fishing_net(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_draenei_fishing_net(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
//if( targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT &&
|
||||
//targets.getGOTarget()->GetGOInfo()->type == GAMEOBJECT_TYPE_SPELL_FOCUS && targets.getGOTarget()->GetEntry() == 181616 )
|
||||
//if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT &&
|
||||
//targets.getGOTarget()->GetGOInfo()->type == GAMEOBJECT_TYPE_SPELL_FOCUS && targets.getGOTarget()->GetEntry() == 181616)
|
||||
//{
|
||||
if( player->GetQuestStatus(9452) == QUEST_STATUS_INCOMPLETE )
|
||||
if (pPlayer->GetQuestStatus(9452) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if( rand()%100 < 35 )
|
||||
if (rand()%100 < 35)
|
||||
{
|
||||
Creature *Murloc = player->SummonCreature(17102,player->GetPositionX() ,player->GetPositionY()+20, player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
if( Murloc )
|
||||
Murloc->AI()->AttackStart(player);
|
||||
Creature *Murloc = pPlayer->SummonCreature(17102,pPlayer->GetPositionX() ,pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
if (Murloc)
|
||||
Murloc->AI()->AttackStart(pPlayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 23614, 1);
|
||||
if( msg == EQUIP_ERR_OK )
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 23614, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
Item* item = player->StoreNewItem(dest,23614,true);
|
||||
if( item )
|
||||
player->SendNewItem(item,1,false,true);
|
||||
Item* item = pPlayer->StoreNewItem(dest,23614,true);
|
||||
if (item)
|
||||
pPlayer->SendNewItem(item,1,false,true);
|
||||
}else
|
||||
player->SendEquipError(msg,NULL,NULL);
|
||||
pPlayer->SendEquipError(msg,NULL,NULL);
|
||||
}
|
||||
}
|
||||
//}
|
||||
@@ -112,15 +112,15 @@ bool ItemUse_item_draenei_fishing_net(Player *player, Item* _Item, SpellCastTarg
|
||||
# item_nether_wraith_beacon
|
||||
#####*/
|
||||
|
||||
bool ItemUse_item_nether_wraith_beacon(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_nether_wraith_beacon(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
if (player->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
|
||||
if (pPlayer->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Creature *Nether;
|
||||
Nether = player->SummonCreature(22408,player->GetPositionX() ,player->GetPositionY()+20, player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,180000);
|
||||
Nether = player->SummonCreature(22408,player->GetPositionX() ,player->GetPositionY()-20, player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,180000);
|
||||
Nether = pPlayer->SummonCreature(22408,pPlayer->GetPositionX() ,pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,180000);
|
||||
Nether = pPlayer->SummonCreature(22408,pPlayer->GetPositionX() ,pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,180000);
|
||||
if (Nether)
|
||||
(Nether->AI())->AttackStart(player);
|
||||
(Nether->AI())->AttackStart(pPlayer);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -129,19 +129,19 @@ bool ItemUse_item_nether_wraith_beacon(Player *player, Item* _Item, SpellCastTar
|
||||
# item_flying_machine
|
||||
#####*/
|
||||
|
||||
bool ItemUse_item_flying_machine(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_flying_machine(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
uint32 itemId = _Item->GetEntry();
|
||||
if( itemId == 34060 )
|
||||
if( player->GetBaseSkillValue(SKILL_RIDING) >= 225 )
|
||||
if (itemId == 34060)
|
||||
if (pPlayer->GetBaseSkillValue(SKILL_RIDING) >= 225)
|
||||
return false;
|
||||
|
||||
if( itemId == 34061 )
|
||||
if( player->GetBaseSkillValue(SKILL_RIDING) == 300 )
|
||||
if (itemId == 34061)
|
||||
if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300)
|
||||
return false;
|
||||
|
||||
debug_log("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
|
||||
player->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL,_Item,NULL);
|
||||
pPlayer->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL,_Item,NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -149,13 +149,13 @@ bool ItemUse_item_flying_machine(Player *player, Item* _Item, SpellCastTargets c
|
||||
# item_gor_dreks_ointment
|
||||
#####*/
|
||||
|
||||
bool ItemUse_item_gor_dreks_ointment(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_gor_dreks_ointment(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
|
||||
targets.getUnitTarget()->GetEntry() == 20748 && !targets.getUnitTarget()->HasAura(32578) )
|
||||
if (targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
|
||||
targets.getUnitTarget()->GetEntry() == 20748 && !targets.getUnitTarget()->HasAura(32578))
|
||||
return false;
|
||||
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -163,15 +163,15 @@ bool ItemUse_item_gor_dreks_ointment(Player *player, Item* _Item, SpellCastTarge
|
||||
# item_incendiary_explosives
|
||||
#####*/
|
||||
|
||||
bool ItemUse_item_incendiary_explosives(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_incendiary_explosives(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
if ( player->FindNearestCreature(26248,15) || player->FindNearestCreature(26249,15) )
|
||||
if (pPlayer->FindNearestCreature(26248,15) || pPlayer->FindNearestCreature(26249,15))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE,_Item,NULL);
|
||||
pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE,_Item,NULL);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -180,13 +180,13 @@ bool ItemUse_item_incendiary_explosives(Player *player, Item* _Item, SpellCastTa
|
||||
# item_mysterious_egg
|
||||
#####*/
|
||||
|
||||
bool ItemExpire_item_mysterious_egg(Player *player, ItemPrototype const * _ItemProto)
|
||||
bool ItemExpire_item_mysterious_egg(Player* pPlayer, ItemPrototype const * _ItemProto)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
|
||||
if( msg == EQUIP_ERR_OK )
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem( dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
|
||||
pPlayer->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -195,13 +195,13 @@ bool ItemExpire_item_mysterious_egg(Player *player, ItemPrototype const * _ItemP
|
||||
# item_disgusting_jar
|
||||
#####*/
|
||||
|
||||
bool ItemExpire_item_disgusting_jar(Player *player, ItemPrototype const * _ItemProto)
|
||||
bool ItemExpire_item_disgusting_jar(Player* pPlayer, ItemPrototype const * _ItemProto)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
|
||||
if( msg == EQUIP_ERR_OK )
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem( dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
|
||||
pPlayer->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ EndScriptData */
|
||||
|
||||
extern void LoadDatabase();
|
||||
|
||||
bool ItemUse_item_test(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_test(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
LoadDatabase();
|
||||
return true;
|
||||
|
||||
@@ -25,7 +25,7 @@ void npc_escortAI::AttackStart(Unit *who)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if(m_creature->Attack(who, true) )
|
||||
if (m_creature->Attack(who, true))
|
||||
{
|
||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
@@ -92,7 +92,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
//End of the line
|
||||
if (CurrentWP == WaypointList.end())
|
||||
{
|
||||
if(DespawnAtEnd)
|
||||
if (DespawnAtEnd)
|
||||
{
|
||||
debug_log("TSCR: EscortAI reached end of waypoints");
|
||||
|
||||
@@ -127,9 +127,9 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
if( !IsOnHold )
|
||||
if (!IsOnHold)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z );
|
||||
m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
debug_log("TSCR: EscortAI Next WP is: %u, %f, %f, %f", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
m_uiWPWaitTimer = 0;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
}else m_uiPlayerCheckTimer -= diff;
|
||||
}
|
||||
|
||||
if(CanMelee && UpdateVictim())
|
||||
if (CanMelee && UpdateVictim())
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
|
||||
if (m_bCanReturnToStart && m_bCanInstantRespawn)
|
||||
debug_log("TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
|
||||
|
||||
if(m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
|
||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
@@ -353,7 +353,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
|
||||
//Start WP
|
||||
m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z );
|
||||
m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
debug_log("TSCR: EscortAI Next WP is: %d, %f, %f, %f", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
IsBeingEscorted = true;
|
||||
}
|
||||
|
||||
@@ -47,15 +47,15 @@ bool isEventActive()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_innkeeper(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_innkeeper(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if (isEventActive()&& !player->GetAura(SPELL_TRICK_OR_TREATED, player->GetGUID()))
|
||||
if (isEventActive()&& !pPlayer->GetAura(SPELL_TRICK_OR_TREATED, pPlayer->GetGUID()))
|
||||
{
|
||||
char* localizedEntry;
|
||||
switch (player->GetSession()->GetSessionDbLocaleIndex())
|
||||
switch (pPlayer->GetSession()->GetSessionDbLocaleIndex())
|
||||
{
|
||||
case 0:
|
||||
localizedEntry=LOCALE_TRICK_OR_TREAT_0;
|
||||
@@ -73,25 +73,25 @@ bool GossipHello_npc_innkeeper(Player *player, Creature *_Creature)
|
||||
localizedEntry=LOCALE_TRICK_OR_TREAT_0;
|
||||
}
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID);
|
||||
}
|
||||
|
||||
player->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_innkeeper(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !player->GetAura(SPELL_TRICK_OR_TREATED, player->GetGUID()))
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !pPlayer->GetAura(SPELL_TRICK_OR_TREATED, pPlayer->GetGUID()))
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, SPELL_TRICK_OR_TREATED, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true);
|
||||
|
||||
// either trick or treat, 50% chance
|
||||
if(rand()%2)
|
||||
if (rand()%2)
|
||||
{
|
||||
player->CastSpell(player, SPELL_TREAT, true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TREAT, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -126,7 +126,7 @@ bool GossipSelect_npc_innkeeper(Player *player, Creature *_Creature, uint32 send
|
||||
trickspell=24723; // skeleton costume
|
||||
break;
|
||||
}
|
||||
player->CastSpell(player, trickspell, true);
|
||||
pPlayer->CastSpell(pPlayer, trickspell, true);
|
||||
}
|
||||
return true; // prevent Trinity core handling
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,226 +24,226 @@ EndScriptData
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
bool GossipHello_npc_taxi(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_taxi(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
switch(_Creature->GetEntry()) {
|
||||
case 17435: // Azuremyst Isle - Susurrus
|
||||
if (player->HasItemCount(23843,1,true))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if (pPlayer->HasItemCount(23843,1,true))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
break;
|
||||
case 20903: // Netherstorm - Protectorate Nether Drake
|
||||
if(player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778,1))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm ready to fly! Take me up, dragon!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
if (pPlayer->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(29778,1))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm ready to fly! Take me up, dragon!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
break;
|
||||
case 18725: // Old Hillsbrad Foothills - Brazen
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready to go to Durnholde Keep.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready to go to Durnholde Keep.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
break;
|
||||
case 29154: // Stormwind City - Thargold Ironwing
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'd like to take a flight around Stormwind Harbor.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'd like to take a flight around Stormwind Harbor.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
break;
|
||||
case 19409: // Hellfire Peninsula - Wing Commander Dabir'ee
|
||||
//Mission: The Murketh and Shaadraz Gateways
|
||||
if (player->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Murketh and Shaadraz Gateways", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
if (pPlayer->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Murketh and Shaadraz Gateways", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
|
||||
//Shatter Point
|
||||
if (!player->GetQuestRewardStatus(10340))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Shatter Point", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
if (!pPlayer->GetQuestRewardStatus(10340))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Shatter Point", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
break;
|
||||
case 20235: // Hellfire Peninsula - Gryphoneer Windbellow
|
||||
//Mission: The Abyssal Shelf || Return to the Abyssal Shelf
|
||||
if (player->GetQuestStatus(10163) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10346) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to The Abyssal Shelf", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
if (pPlayer->GetQuestStatus(10163) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10346) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to The Abyssal Shelf", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
|
||||
//Go to the Front
|
||||
if (player->GetQuestStatus(10382) != QUEST_STATUS_NONE && !player->GetQuestRewardStatus(10382))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Honor Point", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
if (pPlayer->GetQuestStatus(10382) != QUEST_STATUS_NONE && !pPlayer->GetQuestRewardStatus(10382))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Honor Point", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
break;
|
||||
case 19401: // Hellfire Peninsula - Wing Commander Brack
|
||||
//Mission: The Murketh and Shaadraz Gateways
|
||||
if (player->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Murketh and Shaadraz Gateways", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
if (pPlayer->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Murketh and Shaadraz Gateways", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
|
||||
//Mission: The Abyssal Shelf || Return to the Abyssal Shelf
|
||||
if (player->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to The Abyssal Shelf", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
if (pPlayer->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to The Abyssal Shelf", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
|
||||
//Spinebreaker Post
|
||||
if (player->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE && !player->GetQuestRewardStatus(10242))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Spinebreaker Post", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
if (pPlayer->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(10242))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Spinebreaker Post", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
break;
|
||||
case 23413: // Blade's Edge Mountains - Skyguard Handler Irena
|
||||
if (player->GetReputationRank(1031) >= REP_HONORED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Skettis please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
if (pPlayer->GetReputationRank(1031) >= REP_HONORED)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Skettis please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
break;
|
||||
case 25059: // Isle of Quel'Danas - Ayren Cloudbreaker
|
||||
if (player->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speaking of action, I've been ordered to undertake an air strike.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
|
||||
if (pPlayer->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speaking of action, I've been ordered to undertake an air strike.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
|
||||
|
||||
if (player->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to intercept the Dawnblade reinforcements.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
|
||||
if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to intercept the Dawnblade reinforcements.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
|
||||
break;
|
||||
case 25236: // Isle of Quel'Danas - Unrestrained Dragonhawk
|
||||
if (player->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<Ride the dragonhawk to Sun's Reach>", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
|
||||
if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<Ride the dragonhawk to Sun's Reach>", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
|
||||
break;
|
||||
case 20162: // Netherstorm - Veronia
|
||||
//Behind Enemy Lines
|
||||
if (player->GetQuestStatus(10652) && !player->GetQuestRewardStatus(10652))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Manaforge Coruu please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
|
||||
if (pPlayer->GetQuestStatus(10652) && !pPlayer->GetQuestRewardStatus(10652))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Manaforge Coruu please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
|
||||
break;
|
||||
case 23415: // Terokkar Forest - Skyguard Handler Deesak
|
||||
if (player->GetReputationRank(1031) >= REP_HONORED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Ogri'la please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
|
||||
if (pPlayer->GetReputationRank(1031) >= REP_HONORED)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Ogri'la please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
|
||||
break;
|
||||
case 27575: // Dragonblight - Lord Afrasastrasz
|
||||
// middle -> ground
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I would like to take a flight to the ground, Lord Of Afrasastrasz.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I would like to take a flight to the ground, Lord Of Afrasastrasz.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
|
||||
// middle -> top
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My Lord, I must go to the upper floor of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My Lord, I must go to the upper floor of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
|
||||
break;
|
||||
case 26443: // Dragonblight - Tariolstrasz //need to check if quests are required before gossip available (12123, 12124)
|
||||
// ground -> top
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My Lord, I must go to the upper floor of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My Lord, I must go to the upper floor of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
|
||||
// ground -> middle
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
|
||||
break;
|
||||
case 26949: // Dragonblight - Torastrasza
|
||||
// top -> middle
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I would like to see Lord Of Afrasastrasz, in the middle of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I would like to see Lord Of Afrasastrasz, in the middle of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
// top -> ground
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes, Please. I would like to return to the ground floor of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes, Please. I would like to return to the ground floor of the temple.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
break;
|
||||
case 23816: // Howling Fjord - Bat Handler Camille
|
||||
if (!player->GetQuestRewardStatus(11229))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to fly to the Windrunner Official business!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
if (player->GetQuestStatus(11170) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to commandeer a riding bat for special assignment for us.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
if (!pPlayer->GetQuestRewardStatus(11229))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to fly to the Windrunner Official business!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
if (pPlayer->GetQuestStatus(11170) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to commandeer a riding bat for special assignment for us.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
break;
|
||||
case 23704: // Dustwallow Marsh - Cassa Crimsonwing
|
||||
if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"<Ride the gryphons to Survey Alcaz Island>",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+25);
|
||||
if (pPlayer->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"<Ride the gryphons to Survey Alcaz Island>",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+25);
|
||||
break;
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_taxi(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch(action) {
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
//spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,32474,true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,32474,true);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155) )
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
if( !player->HasItemCount(25853,1) ) {
|
||||
player->SEND_GOSSIP_MENU(9780, _Creature->GetGUID());
|
||||
if (!pPlayer->HasItemCount(25853,1)) {
|
||||
pPlayer->SEND_GOSSIP_MENU(9780, _Creature->GetGUID());
|
||||
} else {
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(534); //TaxiPath 534
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(534); //TaxiPath 534
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->GetSession()->SendDoFlight(1149, 1041);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->GetSession()->SendDoFlight(1149, 1041);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33768,true); //TaxiPath 585 (Gateways Murket and Shaadraz)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,33768,true); //TaxiPath 585 (Gateways Murket and Shaadraz)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 5:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,35069,true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,35069,true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 6:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33899,true); //TaxiPath 589 (Aerial Assault Flight (Alliance))
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,33899,true); //TaxiPath 589 (Aerial Assault Flight (Alliance))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 7:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,35065,true); //TaxiPath 607 (Taxi - Hellfire Peninsula - Shatter Point to Beach Head)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,35065,true); //TaxiPath 607 (Taxi - Hellfire Peninsula - Shatter Point to Beach Head)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 8:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33659,true); //TaxiPath 584 (Gateways Murket and Shaadraz)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,33659,true); //TaxiPath 584 (Gateways Murket and Shaadraz)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 9:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33825,true); //TaxiPath 587 (Aerial Assault Flight (Horde))
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,33825,true); //TaxiPath 587 (Aerial Assault Flight (Horde))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 10:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,34578,true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,34578,true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 11:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,41278,true); //TaxiPath 706
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,41278,true); //TaxiPath 706
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 12:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,45071,true); //TaxiPath 779
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,45071,true); //TaxiPath 779
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 13:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,45113,true); //TaxiPath 784
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,45113,true); //TaxiPath 784
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 14:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,45353,true); //TaxiPath 788
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,45353,true); //TaxiPath 788
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 15:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,34905,true); //TaxiPath 606
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,34905,true); //TaxiPath 606
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 16:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,41279,true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,41279,true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 17:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(882);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(882);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 18:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(881);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(881);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 19:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(878);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(878);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 20:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(883);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(883);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 21:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(880);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(880);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 22:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(879);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(879);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 23:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,43074,true); //TaxiPath 736
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,43074,true); //TaxiPath 736
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 24:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->ActivateTaxiPathTo(738);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->ActivateTaxiPathTo(738);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 25:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,42295,true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,42295,true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,25 +276,25 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
// Reset flags after a certain time has passed so that the next player has to start the 'event' again
|
||||
if(m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
|
||||
if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
|
||||
{
|
||||
if(ResetFlagTimer < diff)
|
||||
if (ResetFlagTimer < diff)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}else ResetFlagTimer -= diff;
|
||||
}
|
||||
|
||||
if(UpdateVictim())
|
||||
if (UpdateVictim())
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void ReceiveEmote( Player *player, uint32 emote )
|
||||
void ReceiveEmote(Player* pPlayer, uint32 emote)
|
||||
{
|
||||
switch( emote )
|
||||
switch(emote)
|
||||
{
|
||||
case TEXTEMOTE_CHICKEN:
|
||||
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE && rand()%30 == 1 )
|
||||
if (pPlayer->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE && rand()%30 == 1)
|
||||
{
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
m_creature->setFaction(FACTION_FRIENDLY);
|
||||
@@ -302,7 +302,7 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
case TEXTEMOTE_CHEER:
|
||||
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
|
||||
if (pPlayer->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE)
|
||||
{
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
m_creature->setFaction(FACTION_FRIENDLY);
|
||||
@@ -318,17 +318,17 @@ CreatureAI* GetAI_npc_chicken_cluck(Creature *_Creature)
|
||||
return new npc_chicken_cluckAI(_Creature);
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest )
|
||||
bool QuestAccept_npc_chicken_cluck(Player* pPlayer, Creature *_Creature, const Quest *_Quest)
|
||||
{
|
||||
if(_Quest->GetQuestId() == QUEST_CLUCK)
|
||||
if (_Quest->GetQuestId() == QUEST_CLUCK)
|
||||
CAST_AI(npc_chicken_cluckAI, _Creature->AI())->Reset();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QuestComplete_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest)
|
||||
bool QuestComplete_npc_chicken_cluck(Player* pPlayer, Creature *_Creature, const Quest *_Quest)
|
||||
{
|
||||
if(_Quest->GetQuestId() == QUEST_CLUCK)
|
||||
if (_Quest->GetQuestId() == QUEST_CLUCK)
|
||||
CAST_AI(npc_chicken_cluckAI, _Creature->AI())->Reset();
|
||||
|
||||
return true;
|
||||
@@ -369,7 +369,7 @@ struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
|
||||
{
|
||||
if (!active)
|
||||
{
|
||||
if(can_iteract <= diff){
|
||||
if (can_iteract <= diff){
|
||||
active = true;
|
||||
can_iteract = 3500;
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
@@ -379,11 +379,11 @@ struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit* who){}
|
||||
|
||||
void ReceiveEmote( Player *player, uint32 emote )
|
||||
void ReceiveEmote(Player* pPlayer, uint32 emote)
|
||||
{
|
||||
if (m_creature->IsWithinLOS(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()) && m_creature->IsWithinDistInMap(player,30.0f))
|
||||
if (m_creature->IsWithinLOS(pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ()) && m_creature->IsWithinDistInMap(pPlayer,30.0f))
|
||||
{
|
||||
m_creature->SetInFront(player);
|
||||
m_creature->SetInFront(pPlayer);
|
||||
active = false;
|
||||
|
||||
WorldPacket data;
|
||||
@@ -397,8 +397,8 @@ struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
|
||||
case TEXTEMOTE_JOKE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break;
|
||||
case TEXTEMOTE_DANCE:
|
||||
{
|
||||
if (!player->HasAura(SPELL_SEDUCTION))
|
||||
m_creature->CastSpell(player,SPELL_SEDUCTION,true);
|
||||
if (!pPlayer->HasAura(SPELL_SEDUCTION))
|
||||
m_creature->CastSpell(pPlayer,SPELL_SEDUCTION,true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -482,7 +482,7 @@ struct TRINITY_DLL_DECL npc_doctorAI : public ScriptedAI
|
||||
{
|
||||
npc_doctorAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 Playerguid;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
uint32 SummonPatient_Timer;
|
||||
uint32 SummonPatientCount;
|
||||
@@ -496,7 +496,7 @@ struct TRINITY_DLL_DECL npc_doctorAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Playerguid = 0;
|
||||
PlayerGUID = 0;
|
||||
|
||||
SummonPatient_Timer = 10000;
|
||||
SummonPatientCount = 0;
|
||||
@@ -511,9 +511,9 @@ struct TRINITY_DLL_DECL npc_doctorAI : public ScriptedAI
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void BeginEvent(Player* player);
|
||||
void BeginEvent(Player* pPlayer);
|
||||
void PatientDied(Location* Point);
|
||||
void PatientSaved(Creature* soldier, Player* player, Location* Point);
|
||||
void PatientSaved(Creature* soldier, Player* pPlayer, Location* Point);
|
||||
void UpdateAI(const uint32 diff);
|
||||
|
||||
void EnterCombat(Unit* who){}
|
||||
@@ -569,11 +569,11 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
|
||||
{
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && spell->Id == 20804)
|
||||
{
|
||||
if((CAST_PLR(caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (CAST_PLR(caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))
|
||||
if ((CAST_PLR(caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (CAST_PLR(caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))
|
||||
{
|
||||
if (Doctorguid)
|
||||
{
|
||||
if(Creature* Doctor = Unit::GetCreature(*m_creature, Doctorguid))
|
||||
if (Creature* Doctor = Unit::GetCreature(*m_creature, Doctorguid))
|
||||
CAST_AI(npc_doctorAI, Doctor->AI())->PatientSaved(m_creature, CAST_PLR(caster), Coord);
|
||||
}
|
||||
}
|
||||
@@ -618,7 +618,7 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
|
||||
//lower HP on every world tick makes it a useful counter, not officlone though
|
||||
if (m_creature->isAlive() && m_creature->GetHealth() > 6)
|
||||
{
|
||||
m_creature->SetHealth(uint32(m_creature->GetHealth()-5) );
|
||||
m_creature->SetHealth(uint32(m_creature->GetHealth()-5));
|
||||
}
|
||||
|
||||
if (m_creature->isAlive() && m_creature->GetHealth() <= 6)
|
||||
@@ -630,7 +630,7 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
|
||||
|
||||
if (Doctorguid)
|
||||
{
|
||||
if(Creature* Doctor = Unit::GetCreature((*m_creature), Doctorguid))
|
||||
if (Creature* Doctor = Unit::GetCreature((*m_creature), Doctorguid))
|
||||
CAST_AI(npc_doctorAI, Doctor->AI())->PatientDied(Coord);
|
||||
}
|
||||
}
|
||||
@@ -646,9 +646,9 @@ CreatureAI* GetAI_npc_injured_patient(Creature *_Creature)
|
||||
npc_doctor (continue)
|
||||
*/
|
||||
|
||||
void npc_doctorAI::BeginEvent(Player* player)
|
||||
void npc_doctorAI::BeginEvent(Player* pPlayer)
|
||||
{
|
||||
Playerguid = player->GetGUID();
|
||||
PlayerGUID = pPlayer->GetGUID();
|
||||
|
||||
SummonPatient_Timer = 10000;
|
||||
SummonPatientCount = 0;
|
||||
@@ -673,17 +673,17 @@ void npc_doctorAI::BeginEvent(Player* player)
|
||||
|
||||
void npc_doctorAI::PatientDied(Location* Point)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(Playerguid);
|
||||
if(player && ((player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)))
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (pPlayer && ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)))
|
||||
{
|
||||
++PatientDiedCount;
|
||||
|
||||
if (PatientDiedCount > 5 && Event)
|
||||
{
|
||||
if(player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE)
|
||||
player->FailQuest(6624);
|
||||
else if(player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
|
||||
player->FailQuest(6622);
|
||||
if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->FailQuest(6624);
|
||||
else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->FailQuest(6622);
|
||||
|
||||
Reset();
|
||||
return;
|
||||
@@ -696,11 +696,11 @@ void npc_doctorAI::PatientDied(Location* Point)
|
||||
Reset();
|
||||
}
|
||||
|
||||
void npc_doctorAI::PatientSaved(Creature* soldier, Player* player, Location* Point)
|
||||
void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Point)
|
||||
{
|
||||
if (player && Playerguid == player->GetGUID())
|
||||
if (pPlayer && PlayerGUID == pPlayer->GetGUID())
|
||||
{
|
||||
if ((player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))
|
||||
if ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))
|
||||
{
|
||||
++PatientSavedCount;
|
||||
|
||||
@@ -711,15 +711,15 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* player, Location* Poi
|
||||
std::list<uint64>::iterator itr;
|
||||
for(itr = Patients.begin(); itr != Patients.end(); ++itr)
|
||||
{
|
||||
if(Creature* Patient = Unit::GetCreature((*m_creature), *itr))
|
||||
if (Creature* Patient = Unit::GetCreature((*m_creature), *itr))
|
||||
Patient->setDeathState(JUST_DIED);
|
||||
}
|
||||
}
|
||||
|
||||
if (player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(6624);
|
||||
else if (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(6622);
|
||||
if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(6624);
|
||||
else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(6622);
|
||||
|
||||
Reset();
|
||||
return;
|
||||
@@ -783,10 +783,10 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_doctor(Player *player, Creature *creature, Quest const *quest )
|
||||
bool QuestAccept_npc_doctor(Player* pPlayer, Creature *creature, Quest const *quest)
|
||||
{
|
||||
if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
|
||||
CAST_AI(npc_doctorAI, creature->AI())->BeginEvent(player);
|
||||
CAST_AI(npc_doctorAI, creature->AI())->BeginEvent(pPlayer);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1091,15 +1091,15 @@ bool GossipSelect_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCrea
|
||||
## npc_mount_vendor
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_mount_vendor(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
bool canBuy;
|
||||
canBuy = false;
|
||||
uint32 vendor = _Creature->GetEntry();
|
||||
uint8 race = player->getRace();
|
||||
uint8 race = pPlayer->getRace();
|
||||
|
||||
switch (vendor)
|
||||
{
|
||||
@@ -1107,53 +1107,53 @@ bool GossipHello_npc_mount_vendor(Player *player, Creature *_Creature)
|
||||
case 1460: //Unger Statforth
|
||||
case 2357: //Merideth Carlson
|
||||
case 4885: //Gregor MacVince
|
||||
if (player->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN)
|
||||
player->SEND_GOSSIP_MENU(5855, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN)
|
||||
pPlayer->SEND_GOSSIP_MENU(5855, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 1261: //Veron Amberstill
|
||||
if (player->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF)
|
||||
player->SEND_GOSSIP_MENU(5856, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF)
|
||||
pPlayer->SEND_GOSSIP_MENU(5856, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 3362: //Ogunaro Wolfrunner
|
||||
if (player->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC)
|
||||
player->SEND_GOSSIP_MENU(5841, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC)
|
||||
pPlayer->SEND_GOSSIP_MENU(5841, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 3685: //Harb Clawhoof
|
||||
if (player->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN)
|
||||
player->SEND_GOSSIP_MENU(5843, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN)
|
||||
pPlayer->SEND_GOSSIP_MENU(5843, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 4730: //Lelanai
|
||||
if (player->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF)
|
||||
player->SEND_GOSSIP_MENU(5844, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF)
|
||||
pPlayer->SEND_GOSSIP_MENU(5844, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 4731: //Zachariah Post
|
||||
if (player->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD_PLAYER)
|
||||
player->SEND_GOSSIP_MENU(5840, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD_PLAYER)
|
||||
pPlayer->SEND_GOSSIP_MENU(5840, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 7952: //Zjolnir
|
||||
if (player->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL)
|
||||
player->SEND_GOSSIP_MENU(5842, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL)
|
||||
pPlayer->SEND_GOSSIP_MENU(5842, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 7955: //Milli Featherwhistle
|
||||
if (player->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME)
|
||||
player->SEND_GOSSIP_MENU(5857, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME)
|
||||
pPlayer->SEND_GOSSIP_MENU(5857, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 16264: //Winaestra
|
||||
if (player->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF)
|
||||
player->SEND_GOSSIP_MENU(10305, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF)
|
||||
pPlayer->SEND_GOSSIP_MENU(10305, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
case 17584: //Torallius the Pack Handler
|
||||
if (player->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI)
|
||||
player->SEND_GOSSIP_MENU(10239, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI)
|
||||
pPlayer->SEND_GOSSIP_MENU(10239, _Creature->GetGUID());
|
||||
else canBuy = true;
|
||||
break;
|
||||
}
|
||||
@@ -1161,16 +1161,16 @@ bool GossipHello_npc_mount_vendor(Player *player, Creature *_Creature)
|
||||
if (canBuy)
|
||||
{
|
||||
if (_Creature->isVendor())
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_mount_vendor(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_TRADE)
|
||||
player->SEND_VENDORLIST( _Creature->GetGUID() );
|
||||
pPlayer->SEND_VENDORLIST(_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1179,41 +1179,41 @@ bool GossipSelect_npc_mount_vendor(Player *player, Creature *_Creature, uint32 s
|
||||
## npc_rogue_trainer
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_rogue_trainer(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if( _Creature->isQuestGiver() )
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
if (_Creature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if( _Creature->isTrainer() )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||
if (_Creature->isTrainer())
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||
|
||||
if( _Creature->isCanTrainingAndResetTalentsOf(player) )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "I wish to unlearn my talents", GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS);
|
||||
if (_Creature->isCanTrainingAndResetTalentsOf(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "I wish to unlearn my talents", GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS);
|
||||
|
||||
if( player->getClass() == CLASS_ROGUE && player->getLevel() >= 24 && !player->HasItemCount(17126,1) && !player->GetQuestRewardStatus(6681) )
|
||||
if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<Take the letter>", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(5996, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<Take the letter>", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(5996, _Creature->GetGUID());
|
||||
} else
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_rogue_trainer(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch( action )
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,21100,false);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,21100,false);
|
||||
break;
|
||||
case GOSSIP_ACTION_TRAIN:
|
||||
player->SEND_TRAINERLIST( _Creature->GetGUID() );
|
||||
pPlayer->SEND_TRAINERLIST(_Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_OPTION_UNLEARNTALENTS:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->SendTalentWipeConfirm( _Creature->GetGUID() );
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->SendTalentWipeConfirm(_Creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -1233,121 +1233,121 @@ bool GossipSelect_npc_rogue_trainer(Player *player, Creature *_Creature, uint32
|
||||
#define SPELL_AGI 23736 //agi
|
||||
#define SPELL_FORTUNE 23765 //faire fortune
|
||||
|
||||
bool GossipHello_npc_sayge(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_sayge(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if(_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
if (_Creature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if( player->HasSpellCooldown(SPELL_INT) ||
|
||||
player->HasSpellCooldown(SPELL_ARM) ||
|
||||
player->HasSpellCooldown(SPELL_DMG) ||
|
||||
player->HasSpellCooldown(SPELL_RES) ||
|
||||
player->HasSpellCooldown(SPELL_STR) ||
|
||||
player->HasSpellCooldown(SPELL_AGI) ||
|
||||
player->HasSpellCooldown(SPELL_STM) ||
|
||||
player->HasSpellCooldown(SPELL_SPI) )
|
||||
player->SEND_GOSSIP_MENU(7393, _Creature->GetGUID());
|
||||
if (pPlayer->HasSpellCooldown(SPELL_INT) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_ARM) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_DMG) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_RES) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_STR) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_AGI) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_STM) ||
|
||||
pPlayer->HasSpellCooldown(SPELL_SPI))
|
||||
pPlayer->SEND_GOSSIP_MENU(7393, _Creature->GetGUID());
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(7339, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(7339, _Creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SendAction_npc_sayge(Player *player, Creature *_Creature, uint32 action)
|
||||
void SendAction_npc_sayge(Player* pPlayer, Creature *_Creature, uint32 action)
|
||||
{
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
player->SEND_GOSSIP_MENU(7340, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
pPlayer->SEND_GOSSIP_MENU(7340, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN+1, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(7341, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN+1, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->SEND_GOSSIP_MENU(7341, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(7361, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->SEND_GOSSIP_MENU(7361, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN+6, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN+7, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN+8, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(7362, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN+6, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN+7, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN+8, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->SEND_GOSSIP_MENU(7362, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(7363, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->SEND_GOSSIP_MENU(7363, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
player->SEND_GOSSIP_MENU(7364, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
pPlayer->SEND_GOSSIP_MENU(7364, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
_Creature->CastSpell(player, SPELL_FORTUNE, false);
|
||||
player->SEND_GOSSIP_MENU(7365, _Creature->GetGUID());
|
||||
_Creature->CastSpell(pPlayer, SPELL_FORTUNE, false);
|
||||
pPlayer->SEND_GOSSIP_MENU(7365, _Creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_sayge(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_sayge(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch(sender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN:
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+1:
|
||||
_Creature->CastSpell(player, SPELL_DMG, false);
|
||||
player->AddSpellCooldown(SPELL_DMG,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_DMG, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_DMG,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+2:
|
||||
_Creature->CastSpell(player, SPELL_RES, false);
|
||||
player->AddSpellCooldown(SPELL_RES,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_RES, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_RES,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+3:
|
||||
_Creature->CastSpell(player, SPELL_ARM, false);
|
||||
player->AddSpellCooldown(SPELL_ARM,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_ARM, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_ARM,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+4:
|
||||
_Creature->CastSpell(player, SPELL_SPI, false);
|
||||
player->AddSpellCooldown(SPELL_SPI,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_SPI, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_SPI,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+5:
|
||||
_Creature->CastSpell(player, SPELL_INT, false);
|
||||
player->AddSpellCooldown(SPELL_INT,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_INT, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_INT,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+6:
|
||||
_Creature->CastSpell(player, SPELL_STM, false);
|
||||
player->AddSpellCooldown(SPELL_STM,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_STM, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_STM,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+7:
|
||||
_Creature->CastSpell(player, SPELL_STR, false);
|
||||
player->AddSpellCooldown(SPELL_STR,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_STR, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_STR,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN+8:
|
||||
_Creature->CastSpell(player, SPELL_AGI, false);
|
||||
player->AddSpellCooldown(SPELL_AGI,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(player, _Creature, action);
|
||||
_Creature->CastSpell(pPlayer, SPELL_AGI, false);
|
||||
pPlayer->AddSpellCooldown(SPELL_AGI,0,time(NULL) + 7200);
|
||||
SendAction_npc_sayge(pPlayer, _Creature, action);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -1421,21 +1421,21 @@ CreatureAI* GetAI_npc_tonk_mine(Creature *_Creature)
|
||||
## npc_winter_reveler
|
||||
####*/
|
||||
|
||||
bool ReceiveEmote_npc_winter_reveler( Player *player, Creature *_Creature, uint32 emote )
|
||||
bool ReceiveEmote_npc_winter_reveler(Player* pPlayer, Creature *_Creature, uint32 emote)
|
||||
{
|
||||
//TODO: check auralist.
|
||||
if(player->HasAura(26218))
|
||||
if (pPlayer->HasAura(26218))
|
||||
return false;
|
||||
|
||||
if( emote == TEXTEMOTE_KISS )
|
||||
if (emote == TEXTEMOTE_KISS)
|
||||
{
|
||||
_Creature->CastSpell(_Creature, 26218, false);
|
||||
player->CastSpell(player, 26218, false);
|
||||
pPlayer->CastSpell(pPlayer, 26218, false);
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: _Creature->CastSpell(player, 26207, false); break;
|
||||
case 1: _Creature->CastSpell(player, 26206, false); break;
|
||||
case 2: _Creature->CastSpell(player, 45036, false); break;
|
||||
case 0: _Creature->CastSpell(pPlayer, 26207, false); break;
|
||||
case 1: _Creature->CastSpell(pPlayer, 26206, false); break;
|
||||
case 2: _Creature->CastSpell(pPlayer, 45036, false); break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1445,10 +1445,10 @@ bool ReceiveEmote_npc_winter_reveler( Player *player, Creature *_Creature, uint3
|
||||
## npc_brewfest_reveler
|
||||
####*/
|
||||
|
||||
bool ReceiveEmote_npc_brewfest_reveler( Player *player, Creature *_Creature, uint32 emote )
|
||||
bool ReceiveEmote_npc_brewfest_reveler(Player* pPlayer, Creature *_Creature, uint32 emote)
|
||||
{
|
||||
if( emote == TEXTEMOTE_DANCE )
|
||||
_Creature->CastSpell(player, 41586, false);
|
||||
if (emote == TEXTEMOTE_DANCE)
|
||||
_Creature->CastSpell(pPlayer, 41586, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
|
||||
CreatureInfo const *Info = m_creature->GetCreatureInfo();
|
||||
|
||||
if(Info->Entry == C_VIPER)
|
||||
if (Info->Entry == C_VIPER)
|
||||
IsViper = true;
|
||||
else
|
||||
IsViper = false;
|
||||
@@ -1505,15 +1505,15 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
//Redefined for random target selection:
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature))
|
||||
if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
|
||||
{
|
||||
if (m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) )
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
|
||||
{
|
||||
if (!(rand() % RAND) )
|
||||
if (!(rand() % RAND))
|
||||
{
|
||||
m_creature->setAttackTimer(BASE_ATTACK, (rand() % 10) * 100);
|
||||
SpellTimer = (rand() % 10) * 100;
|
||||
@@ -1525,13 +1525,13 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(Spawn)
|
||||
if (Spawn)
|
||||
{
|
||||
Spawn = false;
|
||||
// Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target
|
||||
if (!m_creature->getVictim() && m_creature->isSummon())
|
||||
if (Unit * Owner = CAST_SUM(m_creature)->GetSummoner())
|
||||
if(Owner->getAttackerForHelper())
|
||||
if (Owner->getAttackerForHelper())
|
||||
AttackStart(Owner->getAttackerForHelper());
|
||||
}
|
||||
|
||||
@@ -1549,7 +1549,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
if (rand() % 3 == 0) //33% chance to cast
|
||||
{
|
||||
uint32 spell;
|
||||
if( rand() % 2 == 0)
|
||||
if (rand() % 2 == 0)
|
||||
spell = SPELL_MIND_NUMBING_POISON;
|
||||
else
|
||||
spell = SPELL_CRIPPLING_POISON;
|
||||
@@ -1591,20 +1591,20 @@ struct TRINITY_DLL_DECL mob_mojoAI : public ScriptedAI
|
||||
void Aggro(Unit *who){}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(m_creature->HasAura(20372,0))
|
||||
if (m_creature->HasAura(20372,0))
|
||||
{
|
||||
if(hearts<diff)
|
||||
if (hearts<diff)
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(20372);
|
||||
hearts = 15000;
|
||||
}hearts-=diff;
|
||||
}
|
||||
}
|
||||
void ReceiveEmote(Player *player, uint32 emote)
|
||||
void ReceiveEmote(Player* pPlayer, uint32 emote)
|
||||
{
|
||||
m_creature->HandleEmoteCommand(emote);
|
||||
Unit* own = m_creature->GetOwner();
|
||||
if (!own || own->GetTypeId() != TYPEID_PLAYER || CAST_PLR(own)->GetTeam() != player->GetTeam())
|
||||
if (!own || own->GetTypeId() != TYPEID_PLAYER || CAST_PLR(own)->GetTeam() != pPlayer->GetTeam())
|
||||
return;
|
||||
if (emote == TEXTEMOTE_KISS)
|
||||
{
|
||||
@@ -1619,22 +1619,22 @@ struct TRINITY_DLL_DECL mob_mojoAI : public ScriptedAI
|
||||
case 5:whisp.append("Feelin' a little froggy, are ya?");break;
|
||||
case 6:
|
||||
whisp.append("Listen, ");
|
||||
whisp.append(player->GetName());
|
||||
whisp.append(pPlayer->GetName());
|
||||
whisp.append(", I know of a little swamp not too far from here....");
|
||||
break;
|
||||
case 7:whisp.append("There's just never enough Mojo to go around...");break;
|
||||
}
|
||||
m_creature->MonsterWhisper(whisp.c_str(),player->GetGUID());
|
||||
if(victimGUID)
|
||||
m_creature->MonsterWhisper(whisp.c_str(),pPlayer->GetGUID());
|
||||
if (victimGUID)
|
||||
{
|
||||
Player* victim = Unit::GetPlayer(victimGUID);
|
||||
if(victim)
|
||||
if (victim)
|
||||
victim->RemoveAura(43906);//remove polymorph frog thing
|
||||
}
|
||||
m_creature->AddAura(43906,player);//add polymorph frog thing
|
||||
victimGUID = player->GetGUID();
|
||||
m_creature->AddAura(43906,pPlayer);//add polymorph frog thing
|
||||
victimGUID = pPlayer->GetGUID();
|
||||
m_creature->CastSpell(m_creature,20372,true);//tag.hearts
|
||||
m_creature->GetMotionMaster()->MoveFollow(player,0,0);
|
||||
m_creature->GetMotionMaster()->MoveFollow(pPlayer,0,0);
|
||||
hearts = 15000;
|
||||
}
|
||||
}
|
||||
@@ -1666,13 +1666,13 @@ struct TRINITY_DLL_DECL npc_mirror_image : SpellCasterAI
|
||||
// Do not reload creature templates on evade mode enter - prevent visual lost
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
if(me->IsInEvadeMode() || !me->isAlive())
|
||||
if (me->IsInEvadeMode() || !me->isAlive())
|
||||
return;
|
||||
|
||||
Unit *owner = me->GetCharmerOrOwner();
|
||||
|
||||
me->CombatStop(true);
|
||||
if(owner && !me->hasUnitState(UNIT_STAT_FOLLOW) )
|
||||
if (owner && !me->hasUnitState(UNIT_STAT_FOLLOW))
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, m_creature->GetFollowAngle(), MOTION_SLOT_ACTIVE);
|
||||
@@ -1701,12 +1701,12 @@ struct TRINITY_DLL_DECL npc_lightwellAI : public PassiveAI
|
||||
/*
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(desummon_timer < diff)
|
||||
if (desummon_timer < diff)
|
||||
{
|
||||
m_creature->Kill(m_creature);
|
||||
}else desummon_timer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(59907))
|
||||
if (!m_creature->HasAura(59907))
|
||||
{
|
||||
m_creature->Kill(m_creature);
|
||||
}
|
||||
@@ -1742,11 +1742,11 @@ struct TRINITY_DLL_DECL npc_training_dummy : Scripted_NoMovementAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if(!m_creature->hasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!m_creature->hasUnitState(UNIT_STAT_STUNNED))
|
||||
m_creature->SetControlled(true,UNIT_STAT_STUNNED);//disable rotate
|
||||
if(ResetTimer <= diff)
|
||||
if (ResetTimer <= diff)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
ResetTimer = 10000;
|
||||
|
||||
@@ -54,12 +54,12 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 4:DoScriptText(SAY_PROGRESS_2, m_creature, player);break;
|
||||
case 5:DoScriptText(SAY_PROGRESS_3, m_creature, player);break;
|
||||
case 4:DoScriptText(SAY_PROGRESS_2, m_creature, pPlayer);break;
|
||||
case 5:DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer);break;
|
||||
case 8:DoScriptText(EMOTE_PROGRESS_4, m_creature);break;
|
||||
case 9:
|
||||
{
|
||||
@@ -67,15 +67,15 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI
|
||||
m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
break;
|
||||
}
|
||||
case 10:DoScriptText(SAY_PROGRESS_5, m_creature, player);break;
|
||||
case 11:DoScriptText(SAY_PROGRESS_6, m_creature, player);break;
|
||||
case 19:DoScriptText(SAY_PROGRESS_7, m_creature, player); break;
|
||||
case 10:DoScriptText(SAY_PROGRESS_5, m_creature, pPlayer);break;
|
||||
case 11:DoScriptText(SAY_PROGRESS_6, m_creature, pPlayer);break;
|
||||
case 19:DoScriptText(SAY_PROGRESS_7, m_creature, pPlayer); break;
|
||||
case 20:
|
||||
DoScriptText(EMOTE_PROGRESS_8, m_creature);
|
||||
DoScriptText(SAY_PROGRESS_9, m_creature, player);
|
||||
DoScriptText(SAY_PROGRESS_9, m_creature, pPlayer);
|
||||
Completed = true;
|
||||
if(player)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature);
|
||||
if (pPlayer)
|
||||
CAST_PLR(pPlayer)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -98,11 +98,11 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed )
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
if (player)
|
||||
CAST_PLR(player)->FailQuest(QUEST_SUNKEN_TREASURE);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (pPlayer)
|
||||
CAST_PLR(pPlayer)->FailQuest(QUEST_SUNKEN_TREASURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,12 +112,12 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_professor_phizzlethorpe(Player* player, Creature* creature, Quest const* quest)
|
||||
bool QuestAccept_npc_professor_phizzlethorpe(Player* pPlayer, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
||||
{
|
||||
DoScriptText(SAY_PROGRESS_1, creature, player);
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
|
||||
DoScriptText(SAY_PROGRESS_1, creature, pPlayer);
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, pPlayer->GetGUID());
|
||||
creature->setFaction(113);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -59,18 +59,18 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
if (!pPlayer)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_MOVE, m_creature, player);
|
||||
DoScriptText(SAY_MOVE, m_creature, pPlayer);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(SAY_PREPARE, m_creature, player);
|
||||
DoScriptText(SAY_PREPARE, m_creature, pPlayer);
|
||||
break;
|
||||
case 19:
|
||||
//TODO: verify location and creatures amount.
|
||||
@@ -79,13 +79,13 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
||||
m_creature->SummonCreature(ENTRY_SILVERWING_WARRIOR,1778.73,-2049.50,109.83,1.67,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
break;
|
||||
case 20:
|
||||
DoScriptText(SAY_WIN, m_creature, player);
|
||||
DoScriptText(SAY_WIN, m_creature, pPlayer);
|
||||
Completed = true;
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
|
||||
if (pPlayer && pPlayer->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(pPlayer)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
|
||||
break;
|
||||
case 21:
|
||||
DoScriptText(SAY_END, m_creature, player);
|
||||
DoScriptText(SAY_END, m_creature, pPlayer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -113,8 +113,8 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
||||
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
if (Player* player = Unit::GetPlayer(PlayerGUID))
|
||||
CAST_PLR(player)->FailQuest(QUEST_TOREK_ASSULT);
|
||||
if (Player* pPlayer = Unit::GetPlayer(PlayerGUID))
|
||||
CAST_PLR(pPlayer)->FailQuest(QUEST_TOREK_ASSULT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,13 +139,13 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_torek(Player* player, Creature* creature, Quest const* quest)
|
||||
bool QuestAccept_npc_torek(Player* pPlayer, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
||||
{
|
||||
//TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?)
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, player->GetGUID());
|
||||
DoScriptText(SAY_READY, creature, player);
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, pPlayer->GetGUID());
|
||||
DoScriptText(SAY_READY, creature, pPlayer);
|
||||
creature->setFaction(113);
|
||||
}
|
||||
|
||||
@@ -174,9 +174,9 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
if (!pPlayer)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
case 0: {
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
GameObject* Cage = m_creature->FindNearestGameObject(GO_CAGE, 20);
|
||||
if(Cage)
|
||||
if (Cage)
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
break;}
|
||||
case 13:
|
||||
@@ -199,8 +199,8 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
break;
|
||||
|
||||
case 21:{
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_FREEDOM_TO_RUUL,m_creature);
|
||||
if (pPlayer && pPlayer->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(pPlayer)->GroupEventHappens(QUEST_FREEDOM_TO_RUUL,m_creature);
|
||||
|
||||
break; }
|
||||
}
|
||||
@@ -214,7 +214,7 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
m_creature->setFaction(1602);
|
||||
|
||||
GameObject* Cage = m_creature->FindNearestGameObject(GO_CAGE, 20);
|
||||
if(Cage)
|
||||
if (Cage)
|
||||
Cage->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -227,9 +227,9 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
if (player)
|
||||
CAST_PLR(player)->FailQuest(QUEST_FREEDOM_TO_RUUL);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (pPlayer)
|
||||
CAST_PLR(pPlayer)->FailQuest(QUEST_FREEDOM_TO_RUUL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,12 +239,12 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_ruul_snowhoof(Player* player, Creature* creature, Quest const* quest)
|
||||
bool QuestAccept_npc_ruul_snowhoof(Player* pPlayer, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+10
-10
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
summoned->SetLevel(m_creature->getLevel());
|
||||
summoned->addUnitState(UNIT_STAT_ROOT);
|
||||
|
||||
if(focusedTarget)
|
||||
if (focusedTarget)
|
||||
summoned->AI()->AttackStart(focusedTarget);
|
||||
}
|
||||
}
|
||||
@@ -82,26 +82,26 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
if (Inhibitmagic_Timer < diff)
|
||||
{
|
||||
float dist;
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map* pMap = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->getSource())
|
||||
if (i_pl->isAlive() && (dist = i_pl->IsWithinDist(m_creature, 45)))
|
||||
{
|
||||
i_pl->RemoveAurasDueToSpell(SPELL_INHIBITMAGIC);
|
||||
m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
|
||||
if(dist < 35)
|
||||
if (dist < 35)
|
||||
m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
|
||||
if(dist < 25)
|
||||
if (dist < 25)
|
||||
m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
|
||||
if(dist < 15)
|
||||
if (dist < 15)
|
||||
m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
|
||||
}
|
||||
Inhibitmagic_Timer = 3000+(rand()%1000);
|
||||
}else Inhibitmagic_Timer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Attractmagic_Timer
|
||||
@@ -171,7 +171,7 @@ struct TRINITY_DLL_DECL mob_focus_fireAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FieryBlast_Timer
|
||||
@@ -179,8 +179,8 @@ struct TRINITY_DLL_DECL mob_focus_fireAI : public ScriptedAI
|
||||
{
|
||||
DoCast(m_creature,SPELL_FIERY_BLAST);
|
||||
|
||||
if(fiery1) fiery1 = false;
|
||||
else if(fiery2) fiery2 = false;
|
||||
if (fiery1) fiery1 = false;
|
||||
else if (fiery2) fiery2 = false;
|
||||
|
||||
FieryBlast_Timer = 1000;
|
||||
}else FieryBlast_Timer -= diff;
|
||||
|
||||
+22
-22
@@ -117,11 +117,11 @@ struct TRINITY_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if( summoned->GetEntry() == NPC_BEACON )
|
||||
if (summoned->GetEntry() == NPC_BEACON)
|
||||
{
|
||||
summoned->CastSpell(summoned,SPELL_ETHEREAL_BEACON_VISUAL,false);
|
||||
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
summoned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
@@ -153,9 +153,9 @@ struct TRINITY_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( FrostNova_Timer < diff )
|
||||
if (FrostNova_Timer < diff)
|
||||
{
|
||||
if( m_creature->IsNonMeleeSpellCasted(false) )
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
|
||||
DoCast(m_creature,SPELL_FROSTNOVA);
|
||||
@@ -163,23 +163,23 @@ struct TRINITY_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
CanBlink = true;
|
||||
}else FrostNova_Timer -= diff;
|
||||
|
||||
if( Frostbolt_Timer < diff )
|
||||
if (Frostbolt_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_FROSTBOLT);
|
||||
Frostbolt_Timer = 4500 + rand()%1500;
|
||||
}else Frostbolt_Timer -= diff;
|
||||
|
||||
if( FireBall_Timer < diff )
|
||||
if (FireBall_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_FIREBALL);
|
||||
FireBall_Timer = 4500 + rand()%1500;
|
||||
}else FireBall_Timer -= diff;
|
||||
|
||||
if( CanBlink )
|
||||
if (CanBlink)
|
||||
{
|
||||
if( Blink_Timer < diff )
|
||||
if (Blink_Timer < diff)
|
||||
{
|
||||
if( m_creature->IsNonMeleeSpellCasted(false) )
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
|
||||
//expire movement, will prevent from running right back to victim after cast
|
||||
@@ -193,12 +193,12 @@ struct TRINITY_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
}else Blink_Timer -= diff;
|
||||
}
|
||||
|
||||
if( Beacon_Timer < diff)
|
||||
if (Beacon_Timer < diff)
|
||||
{
|
||||
if( m_creature->IsNonMeleeSpellCasted(false) )
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
|
||||
if( !urand(0,3) )
|
||||
if (!urand(0,3))
|
||||
DoScriptText(SAY_SUMMON, m_creature);
|
||||
|
||||
DoCast(m_creature,SPELL_ETHEREAL_BEACON, true);
|
||||
@@ -249,12 +249,12 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
||||
{
|
||||
// Send Shaffar to fight
|
||||
Creature* Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
|
||||
if(!Shaffar || Shaffar->isDead())
|
||||
if (!Shaffar || Shaffar->isDead())
|
||||
{
|
||||
KillSelf();
|
||||
return;
|
||||
}
|
||||
if(!Shaffar->isInCombat())
|
||||
if (!Shaffar->isInCombat())
|
||||
Shaffar->AI()->AttackStart(who);
|
||||
}
|
||||
|
||||
@@ -268,10 +268,10 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(Check_Timer < diff)
|
||||
if (Check_Timer < diff)
|
||||
{
|
||||
Creature *Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
|
||||
if(!Shaffar || Shaffar->isDead() || !Shaffar->isInCombat())
|
||||
if (!Shaffar || Shaffar->isDead() || !Shaffar->isInCombat())
|
||||
{
|
||||
KillSelf();
|
||||
return;
|
||||
@@ -279,15 +279,15 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
||||
Check_Timer = 1000;
|
||||
}else Check_Timer -= diff;
|
||||
|
||||
if( ArcaneBolt_Timer < diff )
|
||||
if (ArcaneBolt_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_ARCANE_BOLT);
|
||||
ArcaneBolt_Timer = 2000 + rand()%2500;
|
||||
}else ArcaneBolt_Timer -= diff;
|
||||
|
||||
if( Apprentice_Timer < diff )
|
||||
if (Apprentice_Timer < diff)
|
||||
{
|
||||
if( m_creature->IsNonMeleeSpellCasted(false) )
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
|
||||
m_creature->CastSpell(m_creature,SPELL_ETHEREAL_APPRENTICE,true);
|
||||
@@ -324,12 +324,12 @@ struct TRINITY_DLL_DECL mob_ethereal_apprenticeAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(Cast_Timer < diff)
|
||||
if (Cast_Timer < diff)
|
||||
{
|
||||
if(isFireboltTurn)
|
||||
if (isFireboltTurn)
|
||||
{
|
||||
m_creature->CastSpell(m_creature->getVictim(), SPELL_ETHEREAL_APPRENTICE_FIREBOLT, true);
|
||||
isFireboltTurn = false;
|
||||
|
||||
@@ -88,27 +88,27 @@ struct TRINITY_DLL_DECL boss_pandemoniusAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( VoidBlast_Timer < diff )
|
||||
if (VoidBlast_Timer < diff)
|
||||
{
|
||||
if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0) )
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target,HeroicMode ? H_SPELL_VOID_BLAST : SPELL_VOID_BLAST);
|
||||
VoidBlast_Timer = 500;
|
||||
++VoidBlast_Counter;
|
||||
}
|
||||
|
||||
if( VoidBlast_Counter == 5 )
|
||||
if (VoidBlast_Counter == 5)
|
||||
{
|
||||
VoidBlast_Timer = 15000+rand()%10000;
|
||||
VoidBlast_Counter = 0;
|
||||
}
|
||||
}else VoidBlast_Timer -= diff;
|
||||
|
||||
if( !VoidBlast_Counter )
|
||||
if (!VoidBlast_Counter)
|
||||
{
|
||||
if( DarkShell_Timer < diff )
|
||||
if (DarkShell_Timer < diff)
|
||||
{
|
||||
if( m_creature->IsNonMeleeSpellCasted(false) )
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
|
||||
DoScriptText(EMOTE_DARK_SHELL, m_creature);
|
||||
|
||||
+16
-16
@@ -229,17 +229,17 @@ struct TRINITY_DLL_DECL mob_syth_fireAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(flameshock_timer < diff)
|
||||
if (flameshock_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_FLAME_SHOCK);
|
||||
|
||||
flameshock_timer = 5000;
|
||||
}else flameshock_timer -= diff;
|
||||
|
||||
if(flamebuffet_timer < diff)
|
||||
if (flamebuffet_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_FLAME_BUFFET);
|
||||
|
||||
flamebuffet_timer = 5000;
|
||||
@@ -280,17 +280,17 @@ struct TRINITY_DLL_DECL mob_syth_arcaneAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(arcaneshock_timer < diff)
|
||||
if (arcaneshock_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_ARCANE_SHOCK);
|
||||
|
||||
arcaneshock_timer = 5000;
|
||||
}else arcaneshock_timer -= diff;
|
||||
|
||||
if(arcanebuffet_timer < diff)
|
||||
if (arcanebuffet_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_ARCANE_BUFFET);
|
||||
|
||||
arcanebuffet_timer = 5000;
|
||||
@@ -331,17 +331,17 @@ struct TRINITY_DLL_DECL mob_syth_frostAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(frostshock_timer < diff)
|
||||
if (frostshock_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_FROST_SHOCK);
|
||||
|
||||
frostshock_timer = 5000;
|
||||
}else frostshock_timer -= diff;
|
||||
|
||||
if(frostbuffet_timer < diff)
|
||||
if (frostbuffet_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_FROST_BUFFET);
|
||||
|
||||
frostbuffet_timer = 5000;
|
||||
@@ -382,17 +382,17 @@ struct TRINITY_DLL_DECL mob_syth_shadowAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(shadowshock_timer < diff)
|
||||
if (shadowshock_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_SHADOW_SHOCK);
|
||||
|
||||
shadowshock_timer = 5000;
|
||||
}else shadowshock_timer -= diff;
|
||||
|
||||
if(shadowbuffet_timer < diff)
|
||||
if (shadowbuffet_timer < diff)
|
||||
{
|
||||
if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) )
|
||||
if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_SHADOW_BUFFET);
|
||||
|
||||
shadowbuffet_timer = 5000;
|
||||
|
||||
+3
-3
@@ -85,9 +85,9 @@ struct TRINITY_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) )
|
||||
if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
|
||||
{
|
||||
if(!Intro && m_creature->IsWithinDistInMap(who, 100))
|
||||
if (!Intro && m_creature->IsWithinDistInMap(who, 100))
|
||||
{
|
||||
Intro = true;
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
@@ -97,7 +97,7 @@ struct TRINITY_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) )
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
|
||||
{
|
||||
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
AttackStart(who);
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
|
||||
{
|
||||
instance_sethekk_halls(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint64 m_uiIkissDoorGUID;
|
||||
|
||||
@@ -55,9 +55,9 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_sethekk_halls(Map* map)
|
||||
InstanceData* GetInstanceData_instance_sethekk_halls(Map* pMap)
|
||||
{
|
||||
return new instance_sethekk_halls(map);
|
||||
return new instance_sethekk_halls(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_sethekk_halls()
|
||||
|
||||
+3
-3
@@ -149,7 +149,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
||||
{
|
||||
if (EventCheck_Timer < diff)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_OVERSEER) == DONE)
|
||||
DoIntro();
|
||||
@@ -164,10 +164,10 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
||||
//DoWhine("I haz no mount!", LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(m_creature->HasAura(SPELL_BANISH, 0))
|
||||
if (m_creature->HasAura(SPELL_BANISH, 0))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
|
||||
+3
-3
@@ -91,7 +91,7 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (InciteChaos)
|
||||
@@ -130,7 +130,7 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
DoCast(m_creature, SPELL_INCITE_CHAOS);
|
||||
|
||||
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
|
||||
for( std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr )
|
||||
for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
+18
-18
@@ -83,17 +83,17 @@ struct TRINITY_DLL_DECL mob_voidtravelerAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!Vorpil)
|
||||
if (!Vorpil)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return;
|
||||
}
|
||||
if(move < diff)
|
||||
if (move < diff)
|
||||
{
|
||||
if(sacrificed)
|
||||
if (sacrificed)
|
||||
{
|
||||
SpellEntry *spell = GET_SPELL(HeroicMode?H_SPELL_EMPOWERING_SHADOWS:SPELL_EMPOWERING_SHADOWS);
|
||||
if( spell )
|
||||
if (spell)
|
||||
Vorpil->AddAura(new Aura(spell, 1, NULL, Vorpil, m_creature));
|
||||
Vorpil->SetHealth(Vorpil->GetHealth()+Vorpil->GetMaxHealth()/25);
|
||||
DoCast(m_creature, SPELL_SHADOW_NOVA, true);
|
||||
@@ -101,14 +101,14 @@ struct TRINITY_DLL_DECL mob_voidtravelerAI : public ScriptedAI
|
||||
return;
|
||||
}
|
||||
m_creature->GetMotionMaster()->MoveFollow(Vorpil,0,0);
|
||||
if(m_creature->IsWithinDist(Vorpil, 3))
|
||||
if (m_creature->IsWithinDist(Vorpil, 3))
|
||||
{
|
||||
DoCast(m_creature, SPELL_SACRIFICE, false);
|
||||
sacrificed = true;
|
||||
move = 500;
|
||||
return;
|
||||
}
|
||||
if(!Vorpil->isInCombat() || Vorpil->isDead())
|
||||
if (!Vorpil->isInCombat() || Vorpil->isDead())
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return;
|
||||
@@ -151,19 +151,19 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
HelpYell = false;
|
||||
destroyPortals();
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void summonPortals()
|
||||
{
|
||||
if(!sumportals)
|
||||
if (!sumportals)
|
||||
{
|
||||
for (int i = 0;i<5; ++i)
|
||||
{
|
||||
Creature *Portal = NULL;
|
||||
Portal = m_creature->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
|
||||
if(Portal)
|
||||
if (Portal)
|
||||
{
|
||||
PortalsGuid[i] = Portal->GetGUID();
|
||||
Portal->CastSpell(Portal,SPELL_VOID_PORTAL_VISUAL,false);
|
||||
@@ -176,7 +176,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
|
||||
void destroyPortals()
|
||||
{
|
||||
if(sumportals)
|
||||
if (sumportals)
|
||||
{
|
||||
for (int i = 0;i < 5; i ++)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
{
|
||||
int pos = rand()%5;
|
||||
m_creature->SummonCreature(MOB_VOID_TRAVELER,VoidPortalCoords[pos][0],VoidPortalCoords[pos][1],VoidPortalCoords[pos][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,5000);
|
||||
if(!HelpYell)
|
||||
if (!HelpYell)
|
||||
{
|
||||
DoScriptText(SAY_HELP, m_creature);
|
||||
HelpYell = true;
|
||||
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
destroyPortals();
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, DONE);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
}
|
||||
summonPortals();
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -270,10 +270,10 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
}
|
||||
}else banish_Timer -= diff;
|
||||
|
||||
if ( DrawShadows_Timer < diff)
|
||||
if (DrawShadows_Timer < diff)
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map* pMap = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->getSource())
|
||||
if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH))
|
||||
@@ -288,12 +288,12 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
DrawShadows_Timer = 30000;
|
||||
}else DrawShadows_Timer -= diff;
|
||||
|
||||
if ( summonTraveler_Timer < diff)
|
||||
if (summonTraveler_Timer < diff)
|
||||
{
|
||||
spawnVoidTraveler();
|
||||
summonTraveler_Timer = 10000;
|
||||
//enrage at 20%
|
||||
if((m_creature->GetHealth()*5) < m_creature->GetMaxHealth())
|
||||
if ((m_creature->GetHealth()*5) < m_creature->GetMaxHealth())
|
||||
summonTraveler_Timer = 5000;
|
||||
}else summonTraveler_Timer -=diff;
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
|
||||
void SonicBoomEffect()
|
||||
{
|
||||
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
|
||||
for( std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr )
|
||||
for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
|
||||
// Sonic Boom instant damage (needs core fix instead of this)
|
||||
void SpellHitTarget(Unit *target, const SpellEntry *spell)
|
||||
{
|
||||
if(target && target->isAlive() && spell && spell->Id == SPELL_SONIC_BOOM_EFFECT)
|
||||
if (target && target->isAlive() && spell && spell->Id == SPELL_SONIC_BOOM_EFFECT)
|
||||
m_creature->DealDamage(target,(target->GetHealth()*90)/100,NULL,SPELL_DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NATURE,spell);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
// Sonic Boom
|
||||
if(SonicBoom)
|
||||
if (SonicBoom)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SONIC_BOOM_EFFECT, true);
|
||||
SonicBoomEffect();
|
||||
@@ -121,7 +121,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
|
||||
// Murmur's Touch
|
||||
if (MurmursTouch_Timer < diff)
|
||||
{
|
||||
if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,80,true))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,80,true))
|
||||
DoCast(target, SPELL_MURMURS_TOUCH);
|
||||
MurmursTouch_Timer = 25000 + rand()%10000;
|
||||
}else MurmursTouch_Timer -= diff;
|
||||
@@ -149,38 +149,38 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
|
||||
MagneticPull_Timer = 500;
|
||||
}else MagneticPull_Timer -= diff;
|
||||
|
||||
if(HeroicMode)
|
||||
if (HeroicMode)
|
||||
{
|
||||
// Thundering Storm
|
||||
if(ThunderingStorm_Timer < diff)
|
||||
if (ThunderingStorm_Timer < diff)
|
||||
{
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
for(std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
if(Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
|
||||
if(target->isAlive() && !m_creature->IsWithinDist(target, 35, false))
|
||||
if (Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
|
||||
if (target->isAlive() && !m_creature->IsWithinDist(target, 35, false))
|
||||
DoCast(target, SPELL_THUNDERING_STORM, true);
|
||||
ThunderingStorm_Timer = 15000;
|
||||
}else ThunderingStorm_Timer -= diff;
|
||||
|
||||
// Sonic Shock
|
||||
if(SonicShock_Timer < diff)
|
||||
if (SonicShock_Timer < diff)
|
||||
{
|
||||
if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,20,false))
|
||||
if(target->isAlive())
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,20,false))
|
||||
if (target->isAlive())
|
||||
DoCast(target, SPELL_SONIC_SHOCK);
|
||||
SonicShock_Timer = 10000+rand()%10000;
|
||||
}else SonicShock_Timer -= diff;
|
||||
}
|
||||
|
||||
// Select nearest most aggro target if top aggro too far
|
||||
if(!m_creature->isAttackReady())
|
||||
if (!m_creature->isAttackReady())
|
||||
return;
|
||||
if(!m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
if (!m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
{
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
for(std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
if(Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
|
||||
if(target->isAlive() && m_creature->IsWithinMeleeRange(target))
|
||||
if (Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
|
||||
if (target->isAlive() && m_creature->IsWithinMeleeRange(target))
|
||||
{
|
||||
m_creature->TauntApply(target);
|
||||
break;
|
||||
|
||||
+11
-11
@@ -38,7 +38,7 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
{
|
||||
instance_shadow_labyrinth(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
std::string str_data;
|
||||
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounter[i] == IN_PROGRESS) return true;
|
||||
if (Encounter[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -109,14 +109,14 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
break;
|
||||
|
||||
case TYPE_OVERSEER:
|
||||
if( data != DONE )
|
||||
if (data != DONE)
|
||||
error_log("TSCR: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE");
|
||||
if( FelOverseerCount )
|
||||
if (FelOverseerCount)
|
||||
{
|
||||
--FelOverseerCount;
|
||||
debug_log("TSCR: Shadow Labyrinth: %u Fel Overseers left to kill.",FelOverseerCount);
|
||||
}
|
||||
if( FelOverseerCount == 0 )
|
||||
if (FelOverseerCount == 0)
|
||||
{
|
||||
Encounter[1] = DONE;
|
||||
debug_log("TSCR: Shadow Labyrinth: TYPE_OVERSEER == DONE");
|
||||
@@ -124,13 +124,13 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
break;
|
||||
|
||||
case DATA_BLACKHEARTTHEINCITEREVENT:
|
||||
if( data == DONE )
|
||||
if (data == DONE)
|
||||
DoUseDoorOrButton(RefectoryDoorGUID);
|
||||
Encounter[2] = data;
|
||||
break;
|
||||
|
||||
case DATA_GRANDMASTERVORPILEVENT:
|
||||
if( data == DONE )
|
||||
if (data == DONE)
|
||||
DoUseDoorOrButton(ScreamingHallDoorGUID);
|
||||
Encounter[3] = data;
|
||||
break;
|
||||
@@ -160,7 +160,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch( type )
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_HELLMAW: return Encounter[0];
|
||||
case TYPE_OVERSEER: return Encounter[1];
|
||||
@@ -172,7 +172,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
{
|
||||
if(identifier == DATA_GRANDMASTERVORPIL)
|
||||
if (identifier == DATA_GRANDMASTERVORPIL)
|
||||
return GrandmasterVorpil;
|
||||
|
||||
return 0;
|
||||
@@ -204,9 +204,9 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* map)
|
||||
InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* pMap)
|
||||
{
|
||||
return new instance_shadow_labyrinth(map);
|
||||
return new instance_shadow_labyrinth(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_shadow_labyrinth()
|
||||
|
||||
@@ -48,7 +48,7 @@ struct TRINITY_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
|
||||
|
||||
DeadAhnkaharGuardian = false;
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ELDER_NADOX_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -89,13 +89,13 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH,m_creature);
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ELDER_NADOX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if(victim == m_creature)
|
||||
if (victim == m_creature)
|
||||
return;
|
||||
switch(rand()%3)
|
||||
{
|
||||
@@ -109,53 +109,53 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_SLAY_3,m_creature);
|
||||
|
||||
if(HeroicMode && !DeadAhnkaharGuardian)
|
||||
if (HeroicMode && !DeadAhnkaharGuardian)
|
||||
{
|
||||
AchievementEntry const *AchievRespectYourElders = GetAchievementStore()->LookupEntry(ACHIEVEMENT_RESPECT_YOUR_ELDERS);
|
||||
if(AchievRespectYourElders)
|
||||
if (AchievRespectYourElders)
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
if(map && map->IsDungeon())
|
||||
Map* pMap = m_creature->GetMap();
|
||||
if (pMap && pMap->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = map->GetPlayers();
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievRespectYourElders);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ELDER_NADOX_EVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(plague_Timer < diff)
|
||||
if (plague_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_BROOD_PLAGUE : SPELL_BROOD_PLAGUE);
|
||||
plague_Timer = 15000;
|
||||
}else plague_Timer -= diff;
|
||||
|
||||
if(HeroicMode)
|
||||
if(rage_Timer < diff)
|
||||
if (HeroicMode)
|
||||
if (rage_Timer < diff)
|
||||
{
|
||||
Unit* Swarmer = m_creature->FindNearestCreature(MOB_AHNKAHAR_SWARMER, 35);
|
||||
|
||||
if(Swarmer)
|
||||
if (Swarmer)
|
||||
{
|
||||
DoCast(Swarmer,H_SPELL_BROOD_RAGE,true);
|
||||
rage_Timer = 15000;
|
||||
}
|
||||
}else rage_Timer -= diff;
|
||||
|
||||
if(swarmer_spawn_Timer < diff)
|
||||
if (swarmer_spawn_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SUMMON_SWARMERS,true);
|
||||
DoCast(m_creature,SPELL_SUMMON_SWARMERS);
|
||||
if(rand()%3 == 0)
|
||||
if (rand()%3 == 0)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
@@ -166,23 +166,23 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
|
||||
swarmer_spawn_Timer = 10000;
|
||||
}else swarmer_spawn_Timer -= diff;
|
||||
|
||||
if(guard_spawn_Timer < diff)
|
||||
if (guard_spawn_Timer < diff)
|
||||
{
|
||||
m_creature->MonsterTextEmote("An Ahn'kahar Guardian hatches!",m_creature->GetGUID(),true);
|
||||
DoCast(m_creature,SPELL_SUMMON_SWARM_GUARD);
|
||||
guard_spawn_Timer = 25000;
|
||||
}else guard_spawn_Timer -= diff;
|
||||
|
||||
if(enrage_Timer < diff)
|
||||
if (enrage_Timer < diff)
|
||||
{
|
||||
if(m_creature->HasAura(SPELL_ENRAGE,0))
|
||||
if (m_creature->HasAura(SPELL_ENRAGE,0))
|
||||
return;
|
||||
|
||||
float x, y, z, o;
|
||||
m_creature->GetHomePosition(x, y, z, o);
|
||||
if(z < 24 )
|
||||
if (z < 24)
|
||||
{
|
||||
if(!m_creature->IsNonMeleeSpellCasted(false))
|
||||
if (!m_creature->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
DoCast(m_creature,SPELL_ENRAGE,true);
|
||||
}
|
||||
@@ -213,14 +213,14 @@ struct TRINITY_DLL_DECL mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(m_creature->GetEntry() == 30176)
|
||||
if (m_creature->GetEntry() == 30176)
|
||||
DoCast(m_creature,SPELL_GUARDIAN_AURA,true);
|
||||
sprint_Timer = 10000;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if(m_creature->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY)
|
||||
if (m_creature->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY)
|
||||
DeadAhnkaharGuardian = true;
|
||||
}
|
||||
|
||||
@@ -228,22 +228,22 @@ struct TRINITY_DLL_DECL mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(m_creature->GetEntry() == 30176)
|
||||
if (m_creature->GetEntry() == 30176)
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_GUARDIAN_AURA);
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
if(pInstance->GetData(DATA_ELDER_NADOX_EVENT) != IN_PROGRESS)
|
||||
if (pInstance->GetData(DATA_ELDER_NADOX_EVENT) != IN_PROGRESS)
|
||||
{
|
||||
m_creature->DealDamage(m_creature,m_creature->GetHealth());
|
||||
m_creature->RemoveCorpse();
|
||||
}
|
||||
}
|
||||
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(sprint_Timer < diff)
|
||||
if (sprint_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SPRINT);
|
||||
sprint_Timer = 25000;
|
||||
|
||||
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_volazjAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
phase =1;
|
||||
@@ -75,7 +75,7 @@ struct TRINITY_DLL_DECL boss_volazjAI : public ScriptedAI
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if(phase == 1)
|
||||
if (phase == 1)
|
||||
DoScriptText(SAY_DEATH_1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_DEATH_2, m_creature);
|
||||
|
||||
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL boss_jedogaAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -69,7 +69,7 @@ struct TRINITY_DLL_DECL boss_taldaramAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -38,7 +38,7 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
|
||||
{
|
||||
instance_ahnkahet(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
||||
instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint64 Elder_Nadox;
|
||||
uint64 Prince_Taldaram;
|
||||
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) return true;
|
||||
if (Encounters[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4;
|
||||
|
||||
if( dataHead1 == 'A' && dataHead2 == 'K')
|
||||
if (dataHead1 == 'A' && dataHead2 == 'K')
|
||||
{
|
||||
Encounters[0] = data0;
|
||||
Encounters[1] = data1;
|
||||
@@ -179,9 +179,9 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_ahnkahet(Map* map)
|
||||
InstanceData* GetInstanceData_instance_ahnkahet(Map* pMap)
|
||||
{
|
||||
return new instance_ahnkahet(map);
|
||||
return new instance_ahnkahet(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_ahnkahet()
|
||||
|
||||
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_anub_arakAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
phase =1;
|
||||
|
||||
@@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL boss_hadronoxAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
phase =1;
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) >= 10)
|
||||
|
||||
@@ -36,7 +36,7 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
|
||||
{
|
||||
instance_azjol_nerub(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
||||
instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint64 Krikthir;
|
||||
uint64 Hadronox;
|
||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) return true;
|
||||
if (Encounters[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2;
|
||||
|
||||
if( dataHead1 == 'A' && dataHead2 == 'N')
|
||||
if (dataHead1 == 'A' && dataHead2 == 'N')
|
||||
{
|
||||
Encounters[0] = data0;
|
||||
Encounters[1] = data1;
|
||||
@@ -165,9 +165,9 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_azjol_nerub(Map* map)
|
||||
InstanceData* GetInstanceData_instance_azjol_nerub(Map* pMap)
|
||||
{
|
||||
return new instance_azjol_nerub(map);
|
||||
return new instance_azjol_nerub(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_azjol_nerub()
|
||||
|
||||
@@ -53,10 +53,10 @@ struct TRINITY_DLL_DECL mobs_spitelashesAI : public ScriptedAI
|
||||
|
||||
void SpellHit(Unit *Hitter, const SpellEntry *Spellkind)
|
||||
{
|
||||
if( !spellhit &&
|
||||
if (!spellhit &&
|
||||
Hitter->GetTypeId() == TYPEID_PLAYER &&
|
||||
CAST_PLR(Hitter)->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE &&
|
||||
(Spellkind->Id==118 || Spellkind->Id== 12824 || Spellkind->Id== 12825 || Spellkind->Id== 12826) )
|
||||
(Spellkind->Id==118 || Spellkind->Id== 12824 || Spellkind->Id== 12825 || Spellkind->Id== 12826))
|
||||
{
|
||||
spellhit=true;
|
||||
DoCast(m_creature,29124); //become a sheep
|
||||
@@ -66,22 +66,22 @@ struct TRINITY_DLL_DECL mobs_spitelashesAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
// we mustn't remove the creature in the same round in which we cast the summon spell, otherwise there will be no summons
|
||||
if( spellhit && morphtimer>=5000 )
|
||||
if (spellhit && morphtimer>=5000)
|
||||
{
|
||||
m_creature->ForcedDespawn();
|
||||
return;
|
||||
}
|
||||
// walk 5 seconds before summoning
|
||||
if( spellhit && morphtimer<5000 )
|
||||
if (spellhit && morphtimer<5000)
|
||||
{
|
||||
morphtimer+=diff;
|
||||
if( morphtimer>=5000 )
|
||||
if (morphtimer>=5000)
|
||||
{
|
||||
DoCast(m_creature,28406); //summon copies
|
||||
DoCast(m_creature,6924); //visual explosion
|
||||
}
|
||||
}
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//TODO: add abilities for the different creatures
|
||||
@@ -97,54 +97,54 @@ CreatureAI* GetAI_mobs_spitelashes(Creature *_Creature)
|
||||
## npc_loramus_thalipedes
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_loramus_thalipedes(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(2744) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you help me?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (pPlayer->GetQuestStatus(2744) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you help me?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
if (player->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
if (pPlayer->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_loramus_thalipedes(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(2744);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->AreaExploredOrEventHappens(2744);
|
||||
break;
|
||||
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
player->SEND_GOSSIP_MENU(1813, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
pPlayer->SEND_GOSSIP_MENU(1813, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+21:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I do not understand", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
player->SEND_GOSSIP_MENU(1814, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I do not understand", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
pPlayer->SEND_GOSSIP_MENU(1814, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Indeed", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
player->SEND_GOSSIP_MENU(1815, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Indeed", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
pPlayer->SEND_GOSSIP_MENU(1815, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+23:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will do this with or your help, Loramus", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
player->SEND_GOSSIP_MENU(1816, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will do this with or your help, Loramus", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
pPlayer->SEND_GOSSIP_MENU(1816, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+24:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
|
||||
player->SEND_GOSSIP_MENU(1817, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
|
||||
pPlayer->SEND_GOSSIP_MENU(1817, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+25:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(3141);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->AreaExploredOrEventHappens(3141);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -271,36 +271,36 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(Must_Die)
|
||||
if(Must_Die_Timer < diff)
|
||||
if (Must_Die)
|
||||
if (Must_Die_Timer < diff)
|
||||
{
|
||||
m_creature->ForcedDespawn();
|
||||
return;
|
||||
} else Must_Die_Timer -= diff;
|
||||
|
||||
if(!Escape)
|
||||
if (!Escape)
|
||||
{
|
||||
if(!PlayerGUID)
|
||||
if (!PlayerGUID)
|
||||
return;
|
||||
|
||||
if(spellEscape_Timer < diff)
|
||||
if (spellEscape_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_RIZZLE_ESCAPE, false);
|
||||
spellEscape_Timer = 10000;
|
||||
} else spellEscape_Timer -= diff;
|
||||
|
||||
if(Teleport_Timer < diff)
|
||||
if (Teleport_Timer < diff)
|
||||
{
|
||||
//temp solution - unit can't be teleported by core using spelleffect 5, only players
|
||||
Map *map = m_creature->GetMap();
|
||||
if(map)
|
||||
Map* pMap = m_creature->GetMap();
|
||||
if (pMap)
|
||||
{
|
||||
map->CreatureRelocation(m_creature, 3706.39, -3969.15, 35.9118, 0);
|
||||
pMap->CreatureRelocation(m_creature, 3706.39, -3969.15, 35.9118, 0);
|
||||
m_creature->AI_SendMoveToPacket(3706.39, -3969.15, 35.9118, 0, 0, 0);
|
||||
}
|
||||
//begin swimming and summon depth charges
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
SendText(MSG_ESCAPE_NOTICE, player);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
SendText(MSG_ESCAPE_NOTICE, pPlayer);
|
||||
DoCast(m_creature, SPELL_PERIODIC_DEPTH_CHARGE);
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING);
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.85f, true);
|
||||
@@ -312,33 +312,33 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
return;
|
||||
}
|
||||
|
||||
if(ContinueWP)
|
||||
if (ContinueWP)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP][0], WPs[CurrWP][1], WPs[CurrWP][2]);
|
||||
ContinueWP = false;
|
||||
}
|
||||
|
||||
if(Grenade_Timer < diff)
|
||||
if (Grenade_Timer < diff)
|
||||
{
|
||||
Player *player = Unit::GetPlayer(PlayerGUID);
|
||||
if(player)
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (pPlayer)
|
||||
{
|
||||
DoScriptText(SAY_RIZZLE_GRENADE, m_creature, player);
|
||||
DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true);
|
||||
DoScriptText(SAY_RIZZLE_GRENADE, m_creature, pPlayer);
|
||||
DoCast(pPlayer, SPELL_RIZZLE_FROST_GRENADE, true);
|
||||
}
|
||||
Grenade_Timer = 30000;
|
||||
} else Grenade_Timer -= diff;
|
||||
|
||||
if(Check_Timer < diff)
|
||||
if (Check_Timer < diff)
|
||||
{
|
||||
Player *player = Unit::GetPlayer(PlayerGUID);
|
||||
if(!player)
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (!pPlayer)
|
||||
{
|
||||
m_creature->ForcedDespawn();
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_creature->IsWithinDist(player, 10) && m_creature->GetPositionX() > player->GetPositionX() && !Reached)
|
||||
if (m_creature->IsWithinDist(pPlayer, 10) && m_creature->GetPositionX() > pPlayer->GetPositionX() && !Reached)
|
||||
{
|
||||
DoScriptText(SAY_RIZZLE_FINAL, m_creature);
|
||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 1);
|
||||
@@ -353,12 +353,12 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
|
||||
}
|
||||
|
||||
void SendText(const char *text, Player* player)
|
||||
void SendText(const char *text, Player* pPlayer)
|
||||
{
|
||||
WorldPacket data(SMSG_SERVER_MESSAGE, 0); // guess size
|
||||
data << text;
|
||||
if(player)
|
||||
player->GetSession()->SendPacket(&data);
|
||||
if (pPlayer)
|
||||
pPlayer->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
@@ -366,7 +366,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
if (!who || PlayerGUID)
|
||||
return;
|
||||
|
||||
if(who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
PlayerGUID = who->GetGUID();
|
||||
DoScriptText(SAY_RIZZLE_START, m_creature);
|
||||
@@ -382,7 +382,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if(id == 57)
|
||||
if (id == 57)
|
||||
{
|
||||
m_creature->ForcedDespawn();
|
||||
return;
|
||||
@@ -394,21 +394,21 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
|
||||
};
|
||||
|
||||
bool GossipHello_mob_rizzle_sprysprocket(Player *player, Creature *_Creature)
|
||||
bool GossipHello_mob_rizzle_sprysprocket(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if(player->GetQuestStatus(10994) != QUEST_STATUS_INCOMPLETE)
|
||||
if (pPlayer->GetQuestStatus(10994) != QUEST_STATUS_INCOMPLETE)
|
||||
return true;
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GET_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(10811,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GET_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(10811,_Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_mob_rizzle_sprysprocket(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_mob_rizzle_sprysprocket(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1 && player->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1 && pPlayer->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(pPlayer, SPELL_GIVE_SOUTHFURY_MOONSTONE, true);
|
||||
CAST_AI(mob_rizzle_sprysprocketAI, _Creature->AI())->Must_Die_Timer = 3000;
|
||||
CAST_AI(mob_rizzle_sprysprocketAI, _Creature->AI())->Must_Die = true;
|
||||
}
|
||||
@@ -441,8 +441,8 @@ struct TRINITY_DLL_DECL mob_depth_chargeAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(we_must_die)
|
||||
if(must_die_timer < diff)
|
||||
if (we_must_die)
|
||||
if (must_die_timer < diff)
|
||||
{
|
||||
m_creature->ForcedDespawn();
|
||||
} else must_die_timer -= diff;
|
||||
@@ -454,7 +454,7 @@ struct TRINITY_DLL_DECL mob_depth_chargeAI : public ScriptedAI
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if(who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 5))
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 5))
|
||||
{
|
||||
DoCast(who, SPELL_DEPTH_CHARGE_TRAP);
|
||||
we_must_die = true;
|
||||
|
||||
@@ -65,10 +65,10 @@ struct TRINITY_DLL_DECL boss_azuregosAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(Teleport_Timer < diff)
|
||||
if (Teleport_Timer < diff)
|
||||
{
|
||||
DoScriptText(SAY_TELEPORT, m_creature);
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL boss_azuregosAI : public ScriptedAI
|
||||
for (i = m_threatlist.begin(); i!= m_threatlist.end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
|
||||
if(pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER))
|
||||
if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER))
|
||||
{
|
||||
DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+3, pUnit->GetOrientation());
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_IRRIDATION);
|
||||
|
||||
if (Player *pPlayer = Unit::GetPlayer(pCaster))
|
||||
if (Player* pPlayer = Unit::GetPlayer(pCaster))
|
||||
{
|
||||
switch (rand()%4)
|
||||
{
|
||||
@@ -198,7 +198,7 @@ struct TRINITY_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI
|
||||
NormFaction = c->getFaction();
|
||||
NpcFlags = c->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
|
||||
if(c->GetAreaId() == AREA_COVE || c->GetAreaId() == AREA_ISLE)
|
||||
if (c->GetAreaId() == AREA_COVE || c->GetAreaId() == AREA_ISLE)
|
||||
IsTreeEvent = true;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if( !m_creature->isInCombat() && !IsTreeEvent )
|
||||
if (!m_creature->isInCombat() && !IsTreeEvent)
|
||||
{
|
||||
if (Emote_Timer < diff)
|
||||
{
|
||||
@@ -237,10 +237,10 @@ struct TRINITY_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI
|
||||
Emote_Timer = 120000 + rand()%30000;
|
||||
}else Emote_Timer -= diff;
|
||||
}
|
||||
else if(IsTreeEvent)
|
||||
else if (IsTreeEvent)
|
||||
return;
|
||||
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Dynamite_Timer < diff)
|
||||
@@ -258,22 +258,22 @@ CreatureAI* GetAI_npc_engineer_spark_overgrind(Creature *_Creature)
|
||||
return new npc_engineer_spark_overgrindAI (_Creature);
|
||||
}
|
||||
|
||||
bool GossipHello_npc_engineer_spark_overgrind(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_engineer_spark_overgrind(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if( player->GetQuestStatus(QUEST_GNOMERCY) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if (pPlayer->GetQuestStatus(QUEST_GNOMERCY) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_engineer_spark_overgrind(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if( action == GOSSIP_ACTION_INFO_DEF )
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
_Creature->setFaction(FACTION_HOSTILE);
|
||||
CAST_AI(npc_engineer_spark_overgrindAI, _Creature->AI())->AttackStart(player);
|
||||
CAST_AI(npc_engineer_spark_overgrindAI, _Creature->AI())->AttackStart(pPlayer);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -338,26 +338,26 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
if (!pPlayer)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_START, m_creature, player);
|
||||
DoScriptText(SAY_START, m_creature, pPlayer);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(SAY_PROGRESS, m_creature, player);
|
||||
DoScriptText(SAY_PROGRESS, m_creature, pPlayer);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_END1, m_creature, player);
|
||||
DoScriptText(SAY_END1, m_creature, pPlayer);
|
||||
break;
|
||||
case 29:
|
||||
DoScriptText(EMOTE_HUG, m_creature, player);
|
||||
DoScriptText(SAY_END2, m_creature, player);
|
||||
player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP,m_creature);
|
||||
DoScriptText(EMOTE_HUG, m_creature, pPlayer);
|
||||
DoScriptText(SAY_END2, m_creature, pPlayer);
|
||||
pPlayer->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP,m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -377,9 +377,9 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
if (player)
|
||||
player->FailQuest(QUEST_A_CRY_FOR_SAY_HELP);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (pPlayer)
|
||||
pPlayer->FailQuest(QUEST_A_CRY_FOR_SAY_HELP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,12 +389,12 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_magwin(Player* player, Creature* creature, Quest const* quest)
|
||||
bool QuestAccept_npc_magwin(Player* pPlayer, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -455,7 +455,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
||||
Step = 1;
|
||||
EventStarted = true;
|
||||
Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000);
|
||||
if(Spark)
|
||||
if (Spark)
|
||||
{
|
||||
SparkGUID = Spark->GetGUID();
|
||||
Spark->setActive(true);
|
||||
@@ -479,7 +479,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
||||
return 1000;
|
||||
case 2:
|
||||
DoScriptText(GEEZLE_SAY_1, m_creature, Spark);
|
||||
if(Spark)
|
||||
if (Spark)
|
||||
{
|
||||
Spark->SetInFront(m_creature);
|
||||
m_creature->SetInFront(Spark);
|
||||
@@ -493,11 +493,11 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
||||
case 8: DoScriptText(GEEZLE_SAY_7, m_creature, Spark); return 2000;
|
||||
case 9:
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
if(Spark)
|
||||
if (Spark)
|
||||
Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
|
||||
return 20000;
|
||||
case 10:
|
||||
if(Spark)
|
||||
if (Spark)
|
||||
Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
//DespawnNagaFlag(false);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
@@ -510,13 +510,13 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
||||
std::list<GameObject*> FlagList;
|
||||
m_creature->GetGameObjectListWithEntryInGrid(FlagList,GO_NAGA_FLAG, 50.0f);
|
||||
|
||||
Player* player = NULL;
|
||||
Player* pPlayer = NULL;
|
||||
if (!FlagList.empty())
|
||||
{
|
||||
for(std::list<GameObject*>::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr)
|
||||
{
|
||||
//TODO: Found how to despawn and respawn
|
||||
if(despawn)
|
||||
if (despawn)
|
||||
(*itr)->Delete();
|
||||
else
|
||||
(*itr)->Respawn();
|
||||
@@ -526,9 +526,9 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(SayTimer < diff)
|
||||
if (SayTimer < diff)
|
||||
{
|
||||
if(EventStarted)
|
||||
if (EventStarted)
|
||||
{
|
||||
SayTimer = NextStep(++Step);
|
||||
}
|
||||
|
||||
@@ -45,16 +45,16 @@ enum
|
||||
|
||||
bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if( pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_COMPLETE)
|
||||
if (pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_COMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CORPSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(3557, pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF +1)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF +1)
|
||||
{
|
||||
pPlayer->SEND_GOSSIP_MENU(3558, pCreature->GetGUID());
|
||||
pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
|
||||
@@ -68,24 +68,24 @@ bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32
|
||||
|
||||
#define GOSSIP_SPUTTERVALVE "Can you tell me about this shard?"
|
||||
|
||||
bool GossipHello_npc_sputtervalve(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_sputtervalve(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if( player->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SPUTTERVALVE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if (pPlayer->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SPUTTERVALVE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_sputtervalve(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_sputtervalve(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(2013, _Creature->GetGUID());
|
||||
player->AreaExploredOrEventHappens(6981);
|
||||
pPlayer->SEND_GOSSIP_MENU(2013, _Creature->GetGUID());
|
||||
pPlayer->AreaExploredOrEventHappens(6981);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if(!who || (!who->isAlive())) return;
|
||||
if (!who || (!who->isAlive())) return;
|
||||
|
||||
if (m_creature->IsWithinDistInMap(who, 10.0f) && (who->GetTypeId() == TYPEID_PLAYER) && CAST_PLR(who)->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE && !EventInProgress)
|
||||
{
|
||||
@@ -259,13 +259,13 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
if (EventInProgress) {
|
||||
Player* pWarrior = NULL;
|
||||
|
||||
if(PlayerGUID)
|
||||
if (PlayerGUID)
|
||||
pWarrior = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if(!pWarrior)
|
||||
if (!pWarrior)
|
||||
return;
|
||||
|
||||
if(!pWarrior->isAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) {
|
||||
if (!pWarrior->isAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) {
|
||||
EventInProgress = false;
|
||||
DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, m_creature);
|
||||
pWarrior->FailQuest(1719);
|
||||
@@ -275,8 +275,8 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
if (AffrayChallenger[i])
|
||||
{
|
||||
Creature* pCreature = Unit::GetCreature((*m_creature), AffrayChallenger[i]);
|
||||
if(pCreature) {
|
||||
if(pCreature->isAlive())
|
||||
if (pCreature) {
|
||||
if (pCreature->isAlive())
|
||||
{
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -291,8 +291,8 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
if (BigWill)
|
||||
{
|
||||
Creature* pCreature = Unit::GetCreature((*m_creature), BigWill);
|
||||
if(pCreature) {
|
||||
if(pCreature->isAlive()) {
|
||||
if (pCreature) {
|
||||
if (pCreature->isAlive()) {
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pCreature->setDeathState(JUST_DIED);
|
||||
@@ -314,7 +314,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
for(uint8 i = 0; i < 6; ++i)
|
||||
{
|
||||
Creature* pCreature = m_creature->SummonCreature(AFFRAY_CHALLENGER, AffrayChallengerLoc[i][0], AffrayChallengerLoc[i][1], AffrayChallengerLoc[i][2], AffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
|
||||
if(!pCreature)
|
||||
if (!pCreature)
|
||||
continue;
|
||||
pCreature->setFaction(35);
|
||||
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -336,7 +336,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
if (AffrayChallenger[i])
|
||||
{
|
||||
Creature* pCreature = Unit::GetCreature((*m_creature), AffrayChallenger[i]);
|
||||
if((!pCreature || (!pCreature->isAlive())) && !Challenger_down[i])
|
||||
if ((!pCreature || (!pCreature->isAlive())) && !Challenger_down[i])
|
||||
{
|
||||
DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, m_creature);
|
||||
Challenger_down[i] = true;
|
||||
@@ -346,13 +346,13 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
Challenger_checker = 1000;
|
||||
} else Challenger_checker -= diff;
|
||||
|
||||
if(Wave_Timer < diff)
|
||||
if (Wave_Timer < diff)
|
||||
{
|
||||
if (AffrayChallenger[Wave] && Wave < 6 && !EventBigWill)
|
||||
{
|
||||
DoScriptText(SAY_TWIGGY_FLATHEAD_FRAY, m_creature);
|
||||
Creature* pCreature = Unit::GetCreature((*m_creature), AffrayChallenger[Wave]);
|
||||
if(pCreature && (pCreature->isAlive()))
|
||||
if (pCreature && (pCreature->isAlive()))
|
||||
{
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -364,7 +364,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
else if (Wave >= 6 && !EventBigWill) {
|
||||
if(Creature* pCreature = m_creature->SummonCreature(BIG_WILL, -1722, -4341, 6.12, 6.26, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 480000))
|
||||
if (Creature* pCreature = m_creature->SummonCreature(BIG_WILL, -1722, -4341, 6.12, 6.26, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 480000))
|
||||
{
|
||||
BigWill = pCreature->GetGUID();
|
||||
//pCreature->GetMotionMaster()->MovePoint(0, -1693, -4343, 4.32);
|
||||
@@ -435,9 +435,9 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if(!player)
|
||||
if (!pPlayer)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
@@ -445,11 +445,11 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
case 0: DoScriptText(SAY_PROGRESS_1, m_creature);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 1: DoScriptText(SAY_PROGRESS_2, m_creature); break;
|
||||
case 10: DoScriptText(SAY_PROGRESS_3, m_creature, player);
|
||||
case 10: DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 20:{
|
||||
Unit* Mercenary = m_creature->FindNearestCreature(MOB_MERCENARY, 99);
|
||||
if(Mercenary)
|
||||
if (Mercenary)
|
||||
{
|
||||
DoScriptText(SAY_MERCENARY_4, Mercenary);
|
||||
CAST_CRE(Mercenary)->AI()->AttackStart(m_creature);
|
||||
@@ -464,7 +464,7 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
case 31: m_creature->SummonCreature(NPC_PILOT, 1088.77, -2985.39, 91.84, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
Completed = true;
|
||||
player->GroupEventHappens(QUEST_ESCAPE, m_creature);
|
||||
pPlayer->GroupEventHappens(QUEST_ESCAPE, m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -473,7 +473,7 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
{
|
||||
m_creature->setDeathState(ALIVE);
|
||||
Completed = false;
|
||||
if(!IsBeingEscorted)
|
||||
if (!IsBeingEscorted)
|
||||
{
|
||||
m_creature->setFaction(uiNormFaction);
|
||||
if (m_creature->getStandState() == UNIT_STAND_STATE_DEAD)
|
||||
@@ -487,9 +487,9 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
if (player)
|
||||
player->FailQuest(QUEST_ESCAPE);
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
if (pPlayer)
|
||||
pPlayer->FailQuest(QUEST_ESCAPE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,12 +499,12 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_wizzlecrank_shredder(Player* player, Creature* creature, Quest const* quest)
|
||||
bool QuestAccept_npc_wizzlecrank_shredder(Player* pPlayer, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ESCAPE)
|
||||
{
|
||||
creature->setFaction(FACTION_RATCHET);
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -35,24 +35,24 @@ EndContentData */
|
||||
#define SPELL_TELEPORT 41566 // s41566 - Teleport to Ashtongue NPC's
|
||||
#define GOSSIP_OLUM1 "Teleport me to the other Ashtongue Deathsworn"
|
||||
|
||||
bool GossipHello_npc_spirit_of_olum(Player* player, Creature* _Creature)
|
||||
bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* _Creature)
|
||||
{
|
||||
ScriptedInstance* pInstance = (_Creature->GetInstanceData());
|
||||
|
||||
if(pInstance && (pInstance->GetData(DATA_SUPREMUSEVENT) >= DONE) && (pInstance->GetData(DATA_HIGHWARLORDNAJENTUSEVENT) >= DONE))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
if (pInstance && (pInstance->GetData(DATA_SUPREMUSEVENT) >= DONE) && (pInstance->GetData(DATA_HIGHWARLORDNAJENTUSEVENT) >= DONE))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_spirit_of_olum(Player* player, Creature* _Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* _Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
|
||||
player->InterruptNonMeleeSpells(false);
|
||||
player->CastSpell(player, SPELL_TELEPORT, false);
|
||||
pPlayer->InterruptNonMeleeSpells(false);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TELEPORT, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GURTOGGBLOODBOILEVENT, NOT_STARTED);
|
||||
|
||||
TargetGUID = 0;
|
||||
@@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
{
|
||||
DoZoneInCombat();
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GURTOGGBLOODBOILEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GURTOGGBLOODBOILEVENT, DONE);
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
@@ -136,17 +136,17 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
// Get the Threat List
|
||||
std::list<HostilReference *> m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
|
||||
if(!m_threatlist.size()) // He doesn't have anyone in his threatlist, useless to continue
|
||||
if (!m_threatlist.size()) // He doesn't have anyone in his threatlist, useless to continue
|
||||
return;
|
||||
|
||||
std::list<Unit *> targets;
|
||||
std::list<HostilReference *>::iterator itr = m_threatlist.begin();
|
||||
for( ; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
|
||||
for(; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
|
||||
{
|
||||
Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
//only on alive players
|
||||
if(target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER )
|
||||
targets.push_back( target);
|
||||
if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER)
|
||||
targets.push_back(target);
|
||||
}
|
||||
|
||||
//Sort the list of players
|
||||
@@ -155,13 +155,13 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
targets.resize(5);
|
||||
|
||||
//Aura each player in the targets list with Bloodboil. Aura code copied+pasted from Aura command in Level3.cpp
|
||||
/*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry( SPELL_BLOODBOIL );
|
||||
if(spellInfo)
|
||||
/*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_BLOODBOIL);
|
||||
if (spellInfo)
|
||||
{
|
||||
for(std::list<Unit *>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
Unit* target = *itr;
|
||||
if(!target) return;
|
||||
if (!target) return;
|
||||
for(uint32 i = 0;i<3; ++i)
|
||||
{
|
||||
uint8 eff = spellInfo->Effect[i];
|
||||
@@ -179,35 +179,35 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
{
|
||||
Unit* pUnit = NULL;
|
||||
pUnit = Unit::GetUnit((*m_creature), guid);
|
||||
if(pUnit)
|
||||
if (pUnit)
|
||||
{
|
||||
if(DoGetThreat(pUnit))
|
||||
if (DoGetThreat(pUnit))
|
||||
DoModifyThreatPercent(pUnit, -100);
|
||||
if(TargetThreat)
|
||||
if (TargetThreat)
|
||||
m_creature->AddThreat(pUnit, TargetThreat);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(ArcingSmashTimer < diff)
|
||||
if (ArcingSmashTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ARCING_SMASH);
|
||||
ArcingSmashTimer = 10000;
|
||||
}else ArcingSmashTimer -= diff;
|
||||
|
||||
if(FelAcidTimer < diff)
|
||||
if (FelAcidTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_FEL_ACID);
|
||||
FelAcidTimer = 25000;
|
||||
}else FelAcidTimer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK))
|
||||
if (!m_creature->HasAura(SPELL_BERSERK))
|
||||
{
|
||||
if(EnrageTimer < diff)
|
||||
if (EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
switch(rand()%2)
|
||||
@@ -218,9 +218,9 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
}else EnrageTimer -= diff;
|
||||
}
|
||||
|
||||
if(Phase1)
|
||||
if (Phase1)
|
||||
{
|
||||
if(BewilderingStrikeTimer < diff)
|
||||
if (BewilderingStrikeTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_BEWILDERING_STRIKE);
|
||||
float mt_threat = DoGetThreat(m_creature->getVictim());
|
||||
@@ -229,22 +229,22 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
BewilderingStrikeTimer = 20000;
|
||||
}else BewilderingStrikeTimer -= diff;
|
||||
|
||||
if(EjectTimer < diff)
|
||||
if (EjectTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_EJECT1);
|
||||
DoModifyThreatPercent(m_creature->getVictim(), -40);
|
||||
EjectTimer = 15000;
|
||||
}else EjectTimer -= diff;
|
||||
|
||||
if(AcidicWoundTimer < diff)
|
||||
if (AcidicWoundTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ACIDIC_WOUND);
|
||||
AcidicWoundTimer = 10000;
|
||||
}else AcidicWoundTimer -= diff;
|
||||
|
||||
if(BloodboilTimer < diff)
|
||||
if (BloodboilTimer < diff)
|
||||
{
|
||||
if(BloodboilCount < 5) // Only cast it five times.
|
||||
if (BloodboilCount < 5) // Only cast it five times.
|
||||
{
|
||||
//CastBloodboil(); // Causes issues on windows, so is commented out.
|
||||
DoCast(m_creature->getVictim(), SPELL_BLOODBOIL);
|
||||
@@ -254,34 +254,34 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
}else BloodboilTimer -= diff;
|
||||
}
|
||||
|
||||
if(!Phase1)
|
||||
if (!Phase1)
|
||||
{
|
||||
if(AcidGeyserTimer < diff)
|
||||
if (AcidGeyserTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ACID_GEYSER);
|
||||
AcidGeyserTimer = 30000;
|
||||
}else AcidGeyserTimer -= diff;
|
||||
|
||||
if(EjectTimer < diff)
|
||||
if (EjectTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_EJECT2);
|
||||
EjectTimer = 15000;
|
||||
}else EjectTimer -= diff;
|
||||
}
|
||||
|
||||
if(PhaseChangeTimer < diff)
|
||||
if (PhaseChangeTimer < diff)
|
||||
{
|
||||
if(Phase1)
|
||||
if (Phase1)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target && target->isAlive())
|
||||
if (target && target->isAlive())
|
||||
{
|
||||
Phase1 = false;
|
||||
|
||||
TargetThreat = DoGetThreat(target);
|
||||
TargetGUID = target->GetGUID();
|
||||
target->CastSpell(m_creature, SPELL_TAUNT_GURTOGG, true);
|
||||
if(DoGetThreat(target))
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
m_creature->AddThreat(target, 50000000.0f);
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
@@ -308,7 +308,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
}
|
||||
}else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage
|
||||
{
|
||||
if(TargetGUID)
|
||||
if (TargetGUID)
|
||||
RevertThreatOnTarget(TargetGUID);
|
||||
TargetGUID = 0;
|
||||
Phase1 = true;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, NOT_STARTED);
|
||||
|
||||
for(uint8 i = 0; i<3; ++i)
|
||||
@@ -125,7 +125,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, DONE);
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
@@ -158,7 +158,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if(pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER))
|
||||
if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER))
|
||||
{
|
||||
TargetGUID[i] = pUnit->GetGUID();
|
||||
pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true);
|
||||
@@ -169,10 +169,10 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !Enraged)
|
||||
if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !Enraged)
|
||||
{
|
||||
Enraged = true;
|
||||
DoCast(m_creature, SPELL_ENRAGE, true);
|
||||
@@ -180,10 +180,10 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Randomly cast one beam.
|
||||
if(BeamTimer < diff)
|
||||
if (BeamTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(!target || !target->isAlive())
|
||||
if (!target || !target->isAlive())
|
||||
return;
|
||||
|
||||
BeamTimer = 9000;
|
||||
@@ -205,23 +205,23 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
}
|
||||
BeamCount++;
|
||||
uint32 Beam = CurrentBeam;
|
||||
if(BeamCount > 3)
|
||||
if (BeamCount > 3)
|
||||
while(CurrentBeam == Beam)
|
||||
CurrentBeam = rand()%3;
|
||||
|
||||
}else BeamTimer -= diff;
|
||||
|
||||
// Random Prismatic Shield every 15 seconds.
|
||||
if(PrismaticShieldTimer < diff)
|
||||
if (PrismaticShieldTimer < diff)
|
||||
{
|
||||
uint32 random = rand()%6;
|
||||
if(PrismaticAuras[random])
|
||||
if (PrismaticAuras[random])
|
||||
DoCast(m_creature, PrismaticAuras[random]);
|
||||
PrismaticShieldTimer = 15000;
|
||||
}else PrismaticShieldTimer -= diff;
|
||||
|
||||
// Select 3 random targets (can select same target more than once), teleport to a random location then make them cast explosions until they get away from each other.
|
||||
if(FatalAttractionTimer < diff)
|
||||
if (FatalAttractionTimer < diff)
|
||||
{
|
||||
ExplosionCount = 0;
|
||||
|
||||
@@ -236,18 +236,18 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
FatalAttractionTimer = 40000 + rand()%31 * 1000;
|
||||
}else FatalAttractionTimer -= diff;
|
||||
|
||||
if(FatalAttractionExplodeTimer < diff)
|
||||
if (FatalAttractionExplodeTimer < diff)
|
||||
{
|
||||
// Just make them explode three times... they're supposed to keep exploding while they are in range, but it'll take too much code. I'll try to think of an efficient way for it later.
|
||||
if(ExplosionCount < 3)
|
||||
if (ExplosionCount < 3)
|
||||
{
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit* pUnit = NULL;
|
||||
if(TargetGUID[i])
|
||||
if (TargetGUID[i])
|
||||
{
|
||||
pUnit = Unit::GetUnit((*m_creature), TargetGUID[i]);
|
||||
if(pUnit)
|
||||
if (pUnit)
|
||||
pUnit->CastSpell(pUnit, SPELL_ATTRACTION, true);
|
||||
TargetGUID[i] = 0;
|
||||
}
|
||||
@@ -263,28 +263,28 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
}
|
||||
}else FatalAttractionExplodeTimer -= diff;
|
||||
|
||||
if(ShriekTimer < diff)
|
||||
if (ShriekTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SILENCING_SHRIEK);
|
||||
ShriekTimer = 25000+rand()%10 * 1000;
|
||||
}else ShriekTimer -= diff;
|
||||
|
||||
if(SaberTimer < diff)
|
||||
if (SaberTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SABER_LASH);
|
||||
SaberTimer = 25000+rand()%10 * 1000;
|
||||
}else SaberTimer -= diff;
|
||||
|
||||
//Enrage
|
||||
if(!m_creature->HasAura(SPELL_BERSERK))
|
||||
if(EnrageTimer < diff)
|
||||
if (!m_creature->HasAura(SPELL_BERSERK))
|
||||
if (EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}else EnrageTimer -= diff;
|
||||
|
||||
//Random taunts
|
||||
if(RandomYellTimer < diff)
|
||||
if (RandomYellTimer < diff)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
|
||||
@@ -137,12 +137,12 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RELIQUARYOFSOULSEVENT, NOT_STARTED);
|
||||
|
||||
if(EssenceGUID)
|
||||
if (EssenceGUID)
|
||||
{
|
||||
if(Creature* Essence = Unit::GetCreature(*m_creature, EssenceGUID))
|
||||
if (Creature* Essence = Unit::GetCreature(*m_creature, EssenceGUID))
|
||||
{
|
||||
Essence->ForcedDespawn();
|
||||
}
|
||||
@@ -160,7 +160,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
{
|
||||
m_creature->AddThreat(who, 10000.0f);
|
||||
DoZoneInCombat();
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RELIQUARYOFSOULSEVENT, IN_PROGRESS);
|
||||
|
||||
Phase = 1;
|
||||
@@ -174,8 +174,8 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
float x = Coords[random].x;
|
||||
float y = Coords[random].y;
|
||||
Creature* Soul = m_creature->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if(!Soul) return false;
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (!Soul) return false;
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
CAST_AI(npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = m_creature->GetGUID();
|
||||
Soul->AI()->AttackStart(target);
|
||||
@@ -205,33 +205,33 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RELIQUARYOFSOULSEVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!Phase)
|
||||
if (!Phase)
|
||||
return;
|
||||
|
||||
if(m_creature->getThreatManager().getThreatList().empty()) // Reset if event is begun and we don't have a threatlist
|
||||
if (m_creature->getThreatManager().getThreatList().empty()) // Reset if event is begun and we don't have a threatlist
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
Creature* Essence;
|
||||
if(EssenceGUID)
|
||||
if (EssenceGUID)
|
||||
{
|
||||
Essence = Unit::GetCreature(*m_creature, EssenceGUID);
|
||||
if(!Essence)
|
||||
if (!Essence)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(Timer < diff)
|
||||
if (Timer < diff)
|
||||
{
|
||||
switch(Counter)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
break;
|
||||
case 2:
|
||||
Timer = 5000;
|
||||
if(Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
if (Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
|
||||
Summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
|
||||
@@ -258,15 +258,15 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
break;
|
||||
case 3:
|
||||
Timer = 1000;
|
||||
if(Phase == 3)
|
||||
if (Phase == 3)
|
||||
{
|
||||
if(!Essence->isAlive())
|
||||
if (!Essence->isAlive())
|
||||
m_creature->CastSpell(m_creature, 7, true);
|
||||
else return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
if (Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
{
|
||||
MergeThreatList(Essence);
|
||||
Essence->RemoveAllAuras();
|
||||
@@ -277,7 +277,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
break;
|
||||
case 4:
|
||||
Timer = 1500;
|
||||
if(Essence->IsWithinDistInMap(m_creature, 10))
|
||||
if (Essence->IsWithinDistInMap(m_creature, 10))
|
||||
{
|
||||
Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); //rotate and disappear
|
||||
Timer = 2000;
|
||||
@@ -293,7 +293,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if(Phase == 1)
|
||||
if (Phase == 1)
|
||||
{
|
||||
DoScriptText(SUFF_SAY_AFTER, Essence);
|
||||
}
|
||||
@@ -309,15 +309,15 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
Timer = 3000;
|
||||
break;
|
||||
case 6:
|
||||
if(SoulCount < NUMBER_ENSLAVED_SOUL)
|
||||
if (SoulCount < NUMBER_ENSLAVED_SOUL)
|
||||
{
|
||||
if(SummonSoul())
|
||||
if (SummonSoul())
|
||||
SoulCount++;
|
||||
Timer = 500;
|
||||
return;
|
||||
}break;
|
||||
case 7:
|
||||
if(SoulDeathCount >= SoulCount)
|
||||
if (SoulDeathCount >= SoulCount)
|
||||
{
|
||||
Counter = 1;
|
||||
Phase++;
|
||||
@@ -357,7 +357,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
{
|
||||
if(damage >= m_creature->GetHealth())
|
||||
if (damage >= m_creature->GetHealth())
|
||||
{
|
||||
damage = 0;
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -368,7 +368,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if(!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
if (!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
{
|
||||
DoScriptText(SUFF_SAY_FREED, m_creature);
|
||||
DoZoneInCombat();
|
||||
@@ -392,22 +392,22 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
void CastFixate()
|
||||
{
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
if(m_threatlist.empty())
|
||||
if (m_threatlist.empty())
|
||||
return; // No point continuing if empty threatlist.
|
||||
std::list<Unit*> targets;
|
||||
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
|
||||
for( ; itr != m_threatlist.end(); ++itr)
|
||||
for(; itr != m_threatlist.end(); ++itr)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
|
||||
if(pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) // Only alive players
|
||||
if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) // Only alive players
|
||||
targets.push_back(pUnit);
|
||||
}
|
||||
if(targets.empty())
|
||||
if (targets.empty())
|
||||
return; // No targets added for some reason. No point continuing.
|
||||
targets.sort(ObjectDistanceOrder(m_creature)); // Sort players by distance.
|
||||
targets.resize(1); // Only need closest target.
|
||||
Unit* target = targets.front(); // Get the first target.
|
||||
if(target)
|
||||
if (target)
|
||||
target->CastSpell(m_creature, SPELL_FIXATE_TAUNT, true);
|
||||
DoResetThreat();
|
||||
m_creature->AddThreat(target,1000000);
|
||||
@@ -415,14 +415,14 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(m_creature->isInCombat())
|
||||
if (m_creature->isInCombat())
|
||||
{
|
||||
//Supposed to be cast on nearest target
|
||||
if(FixateTimer < diff)
|
||||
if (FixateTimer < diff)
|
||||
{
|
||||
CastFixate();
|
||||
FixateTimer = 5000;
|
||||
if(!(rand()%16))
|
||||
if (!(rand()%16))
|
||||
{
|
||||
DoScriptText(SUFF_SAY_AGGRO, m_creature);
|
||||
}
|
||||
@@ -433,14 +433,14 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(EnrageTimer < diff)
|
||||
if (EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_ENRAGE);
|
||||
EnrageTimer = 60000;
|
||||
DoScriptText(SUFF_EMOTE_ENRAGE, m_creature);
|
||||
}else EnrageTimer -= diff;
|
||||
|
||||
if(SoulDrainTimer < diff)
|
||||
if (SoulDrainTimer < diff)
|
||||
{
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM,0), SPELL_SOUL_DRAIN);
|
||||
SoulDrainTimer = 60000;
|
||||
@@ -468,10 +468,10 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
{
|
||||
if(done_by == m_creature)
|
||||
if (done_by == m_creature)
|
||||
return;
|
||||
|
||||
if(damage >= m_creature->GetHealth())
|
||||
if (damage >= m_creature->GetHealth())
|
||||
{
|
||||
damage = 0;
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -486,10 +486,10 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if(m_creature->m_currentSpells[CURRENT_GENERIC_SPELL])
|
||||
if (m_creature->m_currentSpells[CURRENT_GENERIC_SPELL])
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
if(spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
|
||||
if(m_creature->m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id == SPELL_SOUL_SHOCK
|
||||
if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
|
||||
if (m_creature->m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id == SPELL_SOUL_SHOCK
|
||||
|| m_creature->m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id == SPELL_DEADEN)
|
||||
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL, false);
|
||||
}
|
||||
@@ -516,7 +516,7 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(RuneShieldTimer < diff)
|
||||
if (RuneShieldTimer < diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
m_creature->CastSpell(m_creature, SPELL_RUNE_SHIELD, true);
|
||||
@@ -525,18 +525,18 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
RuneShieldTimer = 60000;
|
||||
}else RuneShieldTimer -= diff;
|
||||
|
||||
if(SoulShockTimer < diff)
|
||||
if (SoulShockTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SOUL_SHOCK);
|
||||
SoulShockTimer = 5000;
|
||||
}else SoulShockTimer -= diff;
|
||||
|
||||
if(DeadenTimer < diff)
|
||||
if (DeadenTimer < diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature->getVictim(), SPELL_DEADEN);
|
||||
DeadenTimer = 25000 + rand()%10000;
|
||||
if(!(rand()%2))
|
||||
if (!(rand()%2))
|
||||
{
|
||||
DoScriptText(DESI_SAY_SPEC, m_creature);
|
||||
}
|
||||
@@ -605,15 +605,15 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(!CheckedAggro)
|
||||
if (!CheckedAggro)
|
||||
{
|
||||
AggroTargetGUID = m_creature->getVictim()->GetGUID();
|
||||
CheckedAggro = true;
|
||||
}
|
||||
|
||||
if(CheckTankTimer < diff)
|
||||
if (CheckTankTimer < diff)
|
||||
{
|
||||
if(m_creature->getVictim()->GetGUID() != AggroTargetGUID)
|
||||
if (m_creature->getVictim()->GetGUID() != AggroTargetGUID)
|
||||
{
|
||||
DoScriptText(ANGER_SAY_BEFORE, m_creature);
|
||||
DoCast(m_creature, SPELL_SELF_SEETHE, true);
|
||||
@@ -622,17 +622,17 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
CheckTankTimer = 2000;
|
||||
}else CheckTankTimer -= diff;
|
||||
|
||||
if(SoulScreamTimer < diff)
|
||||
if (SoulScreamTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SOUL_SCREAM);
|
||||
SoulScreamTimer = 9000 + rand()%2000;
|
||||
if(!(rand()%3))
|
||||
if (!(rand()%3))
|
||||
{
|
||||
DoScriptText(ANGER_SAY_SPEC, m_creature);
|
||||
}
|
||||
}else SoulScreamTimer -= diff;
|
||||
|
||||
if(SpiteTimer < diff)
|
||||
if (SpiteTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SPITE_TARGET);
|
||||
SpiteTimer = 30000;
|
||||
@@ -645,10 +645,10 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
|
||||
void npc_enslaved_soulAI::JustDied(Unit *killer)
|
||||
{
|
||||
if(ReliquaryGUID)
|
||||
if (ReliquaryGUID)
|
||||
{
|
||||
Creature* Reliquary = (Unit::GetCreature((*m_creature), ReliquaryGUID));
|
||||
if(Reliquary)
|
||||
if (Reliquary)
|
||||
CAST_AI(boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount++;
|
||||
}
|
||||
DoCast(m_creature, SPELL_SOUL_RELEASE, true);
|
||||
|
||||
@@ -139,15 +139,15 @@ struct TRINITY_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI
|
||||
void MoveInLineOfSight(Unit* who) {}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(StartBanishing)
|
||||
if (StartBanishing)
|
||||
return;
|
||||
|
||||
if(CheckTimer < diff)
|
||||
if (CheckTimer < diff)
|
||||
{
|
||||
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
||||
if(Shade && Shade->isAlive() && m_creature->isAlive())
|
||||
if (Shade && Shade->isAlive() && m_creature->isAlive())
|
||||
{
|
||||
if(m_creature->IsWithinDist(Shade, 20,false))
|
||||
if (m_creature->IsWithinDist(Shade, 20,false))
|
||||
{
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
@@ -204,10 +204,10 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
Sorcerers.clear();
|
||||
summons.DespawnAll();//despawn all adds
|
||||
|
||||
if(Creature* Akama = Unit::GetCreature(*m_creature, AkamaGUID))
|
||||
if (Creature* Akama = Unit::GetCreature(*m_creature, AkamaGUID))
|
||||
{
|
||||
Akama->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);//turn gossip on so players can restart the event
|
||||
if(Akama->isDead())
|
||||
if (Akama->isDead())
|
||||
{
|
||||
Akama->Respawn();//respawn akama if dead
|
||||
Akama->AI()->EnterEvadeMode();
|
||||
@@ -231,7 +231,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
//m_creature->GetMotionMaster()->MoveIdle();
|
||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
|
||||
|
||||
if(pInstance && m_creature->isAlive())
|
||||
if (pInstance && m_creature->isAlive())
|
||||
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, NOT_STARTED);
|
||||
|
||||
reseting = false;
|
||||
@@ -242,18 +242,18 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
}
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if(summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
|
||||
if (summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
|
||||
summons.Summon(summon);
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
{
|
||||
if(summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
|
||||
if (summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if(!GridSearcherSucceeded)
|
||||
if (!GridSearcherSucceeded)
|
||||
{
|
||||
FindChannelers();
|
||||
|
||||
@@ -282,23 +282,23 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if(!who || IsBanished) return;
|
||||
if (!who || IsBanished) return;
|
||||
|
||||
if(who->isTargetableForAttack() && who != m_creature)
|
||||
if (who->isTargetableForAttack() && who != m_creature)
|
||||
DoStartMovement(who);
|
||||
}
|
||||
|
||||
void IncrementDeathCount(uint64 guid = 0) // If guid is set, will remove it from list of sorcerer
|
||||
{
|
||||
if(reseting)
|
||||
if (reseting)
|
||||
return;
|
||||
|
||||
debug_log("TSCR: Increasing Death Count for Shade of Akama encounter");
|
||||
++DeathCount;
|
||||
m_creature->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
|
||||
if(guid)
|
||||
if (guid)
|
||||
{
|
||||
if(Sorcerers.empty())
|
||||
if (Sorcerers.empty())
|
||||
error_log("SD2 ERROR: Shade of Akama - attempt to remove guid %u from Sorcerers list but list is already empty", guid);
|
||||
else Sorcerers.remove(guid);
|
||||
}
|
||||
@@ -310,10 +310,10 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
float X = SpawnLocations[random].x;
|
||||
float Y = SpawnLocations[random].y;
|
||||
// max of 6 sorcerers can be summoned
|
||||
if((rand()%3 == 0) && (DeathCount > 0) && (SorcererCount < 7))
|
||||
if ((rand()%3 == 0) && (DeathCount > 0) && (SorcererCount < 7))
|
||||
{
|
||||
Creature* Sorcerer = m_creature->SummonCreature(CREATURE_SORCERER, X, Y, Z_SPAWN, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if(Sorcerer)
|
||||
if (Sorcerer)
|
||||
{
|
||||
CAST_AI(mob_ashtongue_sorcererAI, Sorcerer->AI())->ShadeGUID = m_creature->GetGUID();
|
||||
Sorcerer->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
@@ -329,7 +329,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Creature* Spawn = m_creature->SummonCreature(spawnEntries[i], X, Y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
|
||||
if(Spawn)
|
||||
if (Spawn)
|
||||
{
|
||||
Spawn->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
Spawn->GetMotionMaster()->MovePoint(0, AGGRO_X, AGGRO_Y, AGGRO_Z);
|
||||
@@ -345,7 +345,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
std::list<Creature*> ChannelerList;
|
||||
m_creature->GetCreatureListWithEntryInGrid(ChannelerList,CREATURE_CHANNELER,50.0f);
|
||||
|
||||
if(!ChannelerList.empty())
|
||||
if (!ChannelerList.empty())
|
||||
{
|
||||
for(std::list<Creature*>::iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
|
||||
{
|
||||
@@ -359,14 +359,14 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
|
||||
void SetSelectableChannelers()
|
||||
{
|
||||
if(Channelers.empty())
|
||||
if (Channelers.empty())
|
||||
{
|
||||
error_log("SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy");
|
||||
return;
|
||||
}
|
||||
|
||||
for(std::list<uint64>::iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
if(Creature* Channeler = (Unit::GetCreature(*m_creature, *itr)))
|
||||
if (Creature* Channeler = (Unit::GetCreature(*m_creature, *itr)))
|
||||
Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
@@ -374,29 +374,29 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->isInCombat())
|
||||
if (!m_creature->isInCombat())
|
||||
return;
|
||||
|
||||
if(IsBanished)
|
||||
if (IsBanished)
|
||||
{
|
||||
// Akama is set in the threatlist so when we reset, we make sure that he is not included in our check
|
||||
if(m_creature->getThreatManager().getThreatList().size() < 2)
|
||||
if (m_creature->getThreatManager().getThreatList().size() < 2)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
if(DefenderTimer < diff)
|
||||
if (DefenderTimer < diff)
|
||||
{
|
||||
uint32 ran = rand()%2;
|
||||
Creature* Defender = m_creature->SummonCreature(CREATURE_DEFENDER, SpawnLocations[ran].x, SpawnLocations[ran].y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
|
||||
if(Defender)
|
||||
if (Defender)
|
||||
{
|
||||
Defender->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
bool move = true;
|
||||
if(AkamaGUID)
|
||||
if (AkamaGUID)
|
||||
{
|
||||
if(Creature* Akama = Unit::GetCreature(*m_creature, AkamaGUID))
|
||||
if (Creature* Akama = Unit::GetCreature(*m_creature, AkamaGUID))
|
||||
{
|
||||
float x, y, z;
|
||||
Akama->GetPosition(x,y,z);
|
||||
@@ -405,24 +405,24 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
Defender->AI()->AttackStart(Akama);
|
||||
}else move = false;
|
||||
}else move = false;
|
||||
if(!move)
|
||||
if (!move)
|
||||
Defender->GetMotionMaster()->MovePoint(0, AKAMA_X, AKAMA_Y, AKAMA_Z);
|
||||
}
|
||||
DefenderTimer = 15000;
|
||||
}else DefenderTimer -= diff;
|
||||
|
||||
if(SummonTimer < diff)
|
||||
if (SummonTimer < diff)
|
||||
{
|
||||
SummonCreature();
|
||||
SummonTimer = 35000;
|
||||
}else SummonTimer -= diff;
|
||||
|
||||
if(DeathCount >= 6)
|
||||
if (DeathCount >= 6)
|
||||
{
|
||||
if(AkamaGUID)
|
||||
if (AkamaGUID)
|
||||
{
|
||||
Creature* Akama = Unit::GetCreature((*m_creature), AkamaGUID);
|
||||
if(Akama && Akama->isAlive())
|
||||
if (Akama && Akama->isAlive())
|
||||
{
|
||||
IsBanished = false;
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
@@ -442,12 +442,12 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
}
|
||||
else // No longer banished, let's fight Akama now
|
||||
{
|
||||
if(ReduceHealthTimer < diff)
|
||||
if (ReduceHealthTimer < diff)
|
||||
{
|
||||
if(AkamaGUID)
|
||||
if (AkamaGUID)
|
||||
{
|
||||
Creature* Akama = Unit::GetCreature((*m_creature), AkamaGUID);
|
||||
if(Akama && Akama->isAlive())
|
||||
if (Akama && Akama->isAlive())
|
||||
{
|
||||
//10 % less health every few seconds.
|
||||
m_creature->DealDamage(Akama, Akama->GetMaxHealth()/10, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
@@ -456,9 +456,9 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
}
|
||||
}else ReduceHealthTimer -= diff;
|
||||
|
||||
if(HasKilledAkama)
|
||||
if (HasKilledAkama)
|
||||
{
|
||||
if(!HasKilledAkamaAndReseting)//do not let players kill Shade if Akama is dead and Shade is waiting for ResetTimer!! event would bug
|
||||
if (!HasKilledAkamaAndReseting)//do not let players kill Shade if Akama is dead and Shade is waiting for ResetTimer!! event would bug
|
||||
{
|
||||
HasKilledAkamaAndReseting = true;
|
||||
m_creature->RemoveAllAuras();
|
||||
@@ -468,7 +468,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
if(ResetTimer < diff)
|
||||
if (ResetTimer < diff)
|
||||
{
|
||||
EnterEvadeMode();// Reset a little while after killing Akama, evade and respawn Akama
|
||||
return;
|
||||
@@ -483,7 +483,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
void mob_ashtongue_channelerAI::JustDied(Unit* killer)
|
||||
{
|
||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||
if(Shade && Shade->isAlive())
|
||||
if (Shade && Shade->isAlive())
|
||||
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.");
|
||||
}
|
||||
@@ -491,7 +491,7 @@ void mob_ashtongue_channelerAI::JustDied(Unit* killer)
|
||||
void mob_ashtongue_sorcererAI::JustDied(Unit* killer)
|
||||
{
|
||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||
if(Shade && Shade->isAlive())
|
||||
if (Shade && Shade->isAlive())
|
||||
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.");
|
||||
}
|
||||
@@ -544,7 +544,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
LightningBoltTimer = 10000;
|
||||
CheckTimer = 2000;
|
||||
|
||||
if(!EventBegun)
|
||||
if (!EventBegun)
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has very very strange values
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
@@ -554,12 +554,12 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if(summon->GetEntry() == CREATURE_BROKEN)
|
||||
if (summon->GetEntry() == CREATURE_BROKEN)
|
||||
summons.Summon(summon);
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
{
|
||||
if(summon->GetEntry() == CREATURE_BROKEN)
|
||||
if (summon->GetEntry() == CREATURE_BROKEN)
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
@@ -567,15 +567,15 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
|
||||
void BeginEvent(Player* pl)
|
||||
{
|
||||
if(!pInstance)
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
ShadeGUID = pInstance->GetData64(DATA_SHADEOFAKAMA);
|
||||
if(!ShadeGUID)
|
||||
if (!ShadeGUID)
|
||||
return;
|
||||
|
||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||
if(Shade)
|
||||
if (Shade)
|
||||
{
|
||||
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, IN_PROGRESS);
|
||||
// Prevent players from trying to restart event
|
||||
@@ -586,7 +586,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
m_creature->CombatStart(Shade);
|
||||
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
Shade->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
|
||||
if(pl) Shade->AddThreat(pl, 1.0f);
|
||||
if (pl) Shade->AddThreat(pl, 1.0f);
|
||||
DoZoneInCombat(Shade);
|
||||
EventBegun = true;
|
||||
}
|
||||
@@ -594,7 +594,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if(type != POINT_MOTION_TYPE)
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
switch(id)
|
||||
@@ -602,7 +602,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
case 0: ++WayPointId; break;
|
||||
|
||||
case 1:
|
||||
if(Creature* Shade = Unit::GetCreature(*m_creature, ShadeGUID))
|
||||
if (Creature* Shade = Unit::GetCreature(*m_creature, ShadeGUID))
|
||||
{
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, ShadeGUID);
|
||||
DoCast(Shade, SPELL_AKAMA_SOUL_RETRIEVE);
|
||||
@@ -628,14 +628,14 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
BrokenList.clear();
|
||||
HasYelledOnce = false;
|
||||
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
||||
if(Shade && Shade->isAlive())
|
||||
if (Shade && Shade->isAlive())
|
||||
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true;
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!EventBegun)
|
||||
if (!EventBegun)
|
||||
return;
|
||||
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15 && !HasYelledOnce)
|
||||
@@ -644,14 +644,14 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
HasYelledOnce = true;
|
||||
}
|
||||
|
||||
if(ShadeGUID && !StartCombat)
|
||||
if (ShadeGUID && !StartCombat)
|
||||
{
|
||||
Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
|
||||
if(Shade && Shade->isAlive())
|
||||
if (Shade && Shade->isAlive())
|
||||
{
|
||||
if(CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IsBanished)
|
||||
if (CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IsBanished)
|
||||
{
|
||||
if(CastSoulRetrieveTimer < diff)
|
||||
if (CastSoulRetrieveTimer < diff)
|
||||
{
|
||||
DoCast(Shade, SPELL_AKAMA_SOUL_CHANNEL);
|
||||
CastSoulRetrieveTimer = 500;
|
||||
@@ -665,30 +665,30 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
if(ShadeHasDied && (WayPointId == 1))
|
||||
if (ShadeHasDied && (WayPointId == 1))
|
||||
{
|
||||
if(pInstance) pInstance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
|
||||
if (pInstance) pInstance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
|
||||
m_creature->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[1].x, AkamaWP[1].y, AkamaWP[1].z);
|
||||
++WayPointId;
|
||||
}
|
||||
|
||||
if(!ShadeHasDied && StartCombat)
|
||||
if (!ShadeHasDied && StartCombat)
|
||||
{
|
||||
if(CheckTimer < diff)
|
||||
if (CheckTimer < diff)
|
||||
{
|
||||
if(ShadeGUID)
|
||||
if (ShadeGUID)
|
||||
{
|
||||
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
||||
if(Shade && !Shade->isAlive())
|
||||
if (Shade && !Shade->isAlive())
|
||||
{
|
||||
ShadeHasDied = true;
|
||||
WayPointId = 0;
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z);
|
||||
}
|
||||
if(Shade && Shade->isAlive())
|
||||
if (Shade && Shade->isAlive())
|
||||
{
|
||||
if(Shade->getThreatManager().getThreatList().size() < 2)
|
||||
if (Shade->getThreatManager().getThreatList().size() < 2)
|
||||
Shade->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
@@ -696,9 +696,9 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
}else CheckTimer -= diff;
|
||||
}
|
||||
|
||||
if(SummonBrokenTimer && BrokenSummonIndex < 4)
|
||||
if (SummonBrokenTimer && BrokenSummonIndex < 4)
|
||||
{
|
||||
if(SummonBrokenTimer <= diff)
|
||||
if (SummonBrokenTimer <= diff)
|
||||
{
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
@@ -707,7 +707,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
float z = BrokenCoords[BrokenSummonIndex].z;
|
||||
float o = BrokenCoords[BrokenSummonIndex].o;
|
||||
Creature* Broken = m_creature->SummonCreature(CREATURE_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000);
|
||||
if(Broken)
|
||||
if (Broken)
|
||||
{
|
||||
float wx = BrokenWP[BrokenSummonIndex].x + (i*5);
|
||||
float wy = BrokenWP[BrokenSummonIndex].y + (i*5);
|
||||
@@ -722,8 +722,8 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
}else SummonBrokenTimer -= diff;
|
||||
}
|
||||
|
||||
if(SoulRetrieveTimer)
|
||||
if(SoulRetrieveTimer <= diff)
|
||||
if (SoulRetrieveTimer)
|
||||
if (SoulRetrieveTimer <= diff)
|
||||
{
|
||||
switch(EndingTalkCount)
|
||||
{
|
||||
@@ -739,13 +739,13 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
SoulRetrieveTimer = 25000;
|
||||
break;
|
||||
case 2:
|
||||
if(!BrokenList.empty())
|
||||
if (!BrokenList.empty())
|
||||
{
|
||||
bool Yelled = false;
|
||||
for(std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
|
||||
if(Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
|
||||
if (Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
|
||||
{
|
||||
if(!Yelled)
|
||||
if (!Yelled)
|
||||
{
|
||||
DoScriptText(SAY_BROKEN_FREE_01, pUnit);
|
||||
Yelled = true;
|
||||
@@ -757,10 +757,10 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
SoulRetrieveTimer = 1500;
|
||||
break;
|
||||
case 3:
|
||||
if(!BrokenList.empty())
|
||||
if (!BrokenList.empty())
|
||||
{
|
||||
for(std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
|
||||
if(Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
|
||||
if (Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
|
||||
// This is the incorrect spell, but can't seem to find the right one.
|
||||
pUnit->CastSpell(pUnit, 39656, true);
|
||||
}
|
||||
@@ -768,10 +768,10 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
SoulRetrieveTimer = 5000;
|
||||
break;
|
||||
case 4:
|
||||
if(!BrokenList.empty())
|
||||
if (!BrokenList.empty())
|
||||
{
|
||||
for(std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
|
||||
if(Creature* pUnit = Unit::GetCreature((*m_creature), *itr))
|
||||
if (Creature* pUnit = Unit::GetCreature((*m_creature), *itr))
|
||||
pUnit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
SoulRetrieveTimer = 0;
|
||||
@@ -779,10 +779,10 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
}
|
||||
}else SoulRetrieveTimer -= diff;
|
||||
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(DestructivePoisonTimer < diff)
|
||||
if (DestructivePoisonTimer < diff)
|
||||
{
|
||||
Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
|
||||
if (Shade && Shade->isAlive())
|
||||
@@ -790,7 +790,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
DestructivePoisonTimer = 15000;
|
||||
}else DestructivePoisonTimer -= diff;
|
||||
|
||||
if(LightningBoltTimer < diff)
|
||||
if (LightningBoltTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT);
|
||||
LightningBoltTimer = 10000;
|
||||
@@ -820,23 +820,23 @@ CreatureAI* GetAI_npc_akama_shade(Creature *_Creature)
|
||||
return new npc_akamaAI (_Creature);
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_akama(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_akama(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_akamaAI, _Creature->AI())->BeginEvent(player);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_akamaAI, _Creature->AI())->BeginEvent(pPlayer);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_akama(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_akama(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if(player->isAlive())
|
||||
if (pPlayer->isAlive())
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(907, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(907, _Creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -79,9 +79,9 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
{
|
||||
pInstance->SetData(DATA_SUPREMUSEVENT, NOT_STARTED);
|
||||
//ToggleDoors(true);
|
||||
@@ -97,7 +97,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SUPREMUSEVENT, IN_PROGRESS);
|
||||
|
||||
ChangePhase();
|
||||
@@ -107,7 +107,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
|
||||
void ChangePhase()
|
||||
{
|
||||
if(!phase || phase == PHASE_CHASE)
|
||||
if (!phase || phase == PHASE_CHASE)
|
||||
{
|
||||
phase = PHASE_STRIKE;
|
||||
summons.DoAction(EVENT_VOLCANO, 0);
|
||||
@@ -133,7 +133,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_SUPREMUSEVENT, DONE);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_GAMEOBJECT_SUPREMUS_DOORS), true);
|
||||
@@ -154,9 +154,9 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
for (i = m_threatlist.begin(); i!= m_threatlist.end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
|
||||
if(pUnit && m_creature->IsWithinMeleeRange(pUnit))
|
||||
if (pUnit && m_creature->IsWithinMeleeRange(pUnit))
|
||||
{
|
||||
if(pUnit->GetHealth() > health)
|
||||
if (pUnit->GetHealth() > health)
|
||||
{
|
||||
health = pUnit->GetHealth();
|
||||
target = pUnit;
|
||||
@@ -187,13 +187,13 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
events.ScheduleEvent(EVENT_FLAME, 20000, GCD_CAST);
|
||||
break;
|
||||
case EVENT_HATEFUL_STRIKE:
|
||||
if(Unit* target = CalculateHatefulStrikeTarget())
|
||||
if (Unit* target = CalculateHatefulStrikeTarget())
|
||||
DoCast(target, SPELL_HATEFUL_STRIKE);
|
||||
events.DelayEvents(1000, GCD_CAST);
|
||||
events.ScheduleEvent(EVENT_HATEFUL_STRIKE, 5000, GCD_CAST, PHASE_STRIKE);
|
||||
break;
|
||||
case EVENT_SWITCH_TARGET:
|
||||
if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
{
|
||||
DoResetThreat();
|
||||
m_creature->AddThreat(target, 5000000.0f);
|
||||
@@ -204,8 +204,8 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
case EVENT_VOLCANO:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true);
|
||||
if(!target) target = m_creature->getVictim();
|
||||
if(target)
|
||||
if (!target) target = m_creature->getVictim();
|
||||
if (target)
|
||||
{
|
||||
//DoCast(target, SPELL_VOLCANIC_SUMMON);//movement bugged
|
||||
m_creature->SummonCreature(CREATURE_VOLCANO,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
|
||||
@@ -250,7 +250,7 @@ struct TRINITY_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(wait<=diff)//wait 3secs before casting
|
||||
if (wait<=diff)//wait 3secs before casting
|
||||
{
|
||||
DoCast(m_creature, SPELL_VOLCANIC_ERUPTION);
|
||||
wait = 60000;
|
||||
|
||||
@@ -76,14 +76,14 @@ struct TRINITY_DLL_DECL mob_doom_blossomAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(CheckTeronTimer < diff)
|
||||
if (CheckTeronTimer < diff)
|
||||
{
|
||||
if(TeronGUID)
|
||||
if (TeronGUID)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
|
||||
Creature* Teron = (Unit::GetCreature((*m_creature), TeronGUID));
|
||||
if((Teron) && (!Teron->isAlive() || Teron->IsInEvadeMode()))
|
||||
if ((Teron) && (!Teron->isAlive() || Teron->IsInEvadeMode()))
|
||||
Despawn();
|
||||
}
|
||||
else
|
||||
@@ -92,7 +92,7 @@ struct TRINITY_DLL_DECL mob_doom_blossomAI : public ScriptedAI
|
||||
CheckTeronTimer = 5000;
|
||||
}else CheckTeronTimer -= diff;
|
||||
|
||||
if(ShadowBoltTimer < diff && m_creature->isInCombat())
|
||||
if (ShadowBoltTimer < diff && m_creature->isInCombat())
|
||||
{
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT);
|
||||
ShadowBoltTimer = 10000;
|
||||
@@ -126,7 +126,7 @@ struct TRINITY_DLL_DECL mob_shadowy_constructAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if(!who || (!who->isAlive()) || (who->GetGUID() == GhostGUID))
|
||||
if (!who || (!who->isAlive()) || (who->GetGUID() == GhostGUID))
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL mob_shadowy_constructAI : public ScriptedAI
|
||||
/* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if(done_by->GetGUID() != GhostGUID)
|
||||
if (done_by->GetGUID() != GhostGUID)
|
||||
damage = 0; // Only the ghost can deal damage.
|
||||
}
|
||||
*/
|
||||
@@ -143,19 +143,19 @@ struct TRINITY_DLL_DECL mob_shadowy_constructAI : public ScriptedAI
|
||||
void CheckPlayers()
|
||||
{
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
if(m_threatlist.empty())
|
||||
if (m_threatlist.empty())
|
||||
return; // No threat list. Don't continue.
|
||||
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
|
||||
std::list<Unit*> targets;
|
||||
for( ; itr != m_threatlist.end(); ++itr)
|
||||
for(; itr != m_threatlist.end(); ++itr)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
|
||||
if(pUnit && pUnit->isAlive())
|
||||
if (pUnit && pUnit->isAlive())
|
||||
targets.push_back(pUnit);
|
||||
}
|
||||
targets.sort(ObjectDistanceOrder(m_creature));
|
||||
Unit* target = targets.front();
|
||||
if(target && m_creature->IsWithinDistInMap(target, m_creature->GetAttackDistance(target)))
|
||||
if (target && m_creature->IsWithinDistInMap(target, m_creature->GetAttackDistance(target)))
|
||||
{
|
||||
DoCast(target, SPELL_ATROPHY);
|
||||
m_creature->AI()->AttackStart(target);
|
||||
@@ -164,16 +164,16 @@ struct TRINITY_DLL_DECL mob_shadowy_constructAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(CheckPlayerTimer < diff)
|
||||
if (CheckPlayerTimer < diff)
|
||||
{
|
||||
CheckPlayers();
|
||||
CheckPlayerTimer = 3000;
|
||||
}else CheckPlayerTimer -= diff;
|
||||
|
||||
if(CheckTeronTimer < diff)
|
||||
if (CheckTeronTimer < diff)
|
||||
{
|
||||
Creature* Teron = (Unit::GetCreature((*m_creature), TeronGUID));
|
||||
if(!Teron || !Teron->isAlive() || Teron->IsInEvadeMode())
|
||||
if (!Teron || !Teron->isAlive() || Teron->IsInEvadeMode())
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
|
||||
CheckTeronTimer = 5000;
|
||||
@@ -207,7 +207,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_TERONGOREFIENDEVENT, NOT_STARTED);
|
||||
|
||||
IncinerateTimer = 20000 + rand()%11000;
|
||||
@@ -235,7 +235,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(pWho, VISIBLE_RANGE) && m_creature->IsWithinLOSInMap(pWho))
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
|
||||
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
@@ -246,7 +246,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
Intro = true;
|
||||
}
|
||||
}
|
||||
if(Done)
|
||||
if (Done)
|
||||
ScriptedAI::MoveInLineOfSight(pWho);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_TERONGOREFIENDEVENT, DONE);
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
@@ -284,14 +284,14 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
|
||||
void SetThreatList(Creature* Blossom)
|
||||
{
|
||||
if(!Blossom) return;
|
||||
if (!Blossom) return;
|
||||
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator i = m_threatlist.begin();
|
||||
for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
|
||||
if(pUnit && pUnit->isAlive())
|
||||
if (pUnit && pUnit->isAlive())
|
||||
{
|
||||
float threat = DoGetThreat(pUnit);
|
||||
Blossom->AddThreat(pUnit, threat);
|
||||
@@ -309,14 +309,14 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
/************************************************************************/
|
||||
|
||||
Unit* Ghost = NULL;
|
||||
if(GhostGUID)
|
||||
if (GhostGUID)
|
||||
Ghost = Unit::GetUnit((*m_creature), GhostGUID);
|
||||
if(Ghost && Ghost->isAlive() && Ghost->HasAura(SPELL_SHADOW_OF_DEATH))
|
||||
if (Ghost && Ghost->isAlive() && Ghost->HasAura(SPELL_SHADOW_OF_DEATH))
|
||||
{
|
||||
/*float x,y,z;
|
||||
Ghost->GetPosition(x,y,z);
|
||||
Creature* control = m_creature->SummonCreature(CREATURE_GHOST, x, y, z, 0, TEMPSUMMON_TIMED_DESAWN, 30000);
|
||||
if(control)
|
||||
if (control)
|
||||
{
|
||||
CAST_PLR(Ghost)->Possess(control);
|
||||
Ghost->DealDamage(Ghost, Ghost->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL,
|
||||
@@ -328,16 +328,16 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
float X = CalculateRandomLocation(Ghost->GetPositionX(), 10);
|
||||
float Y = CalculateRandomLocation(Ghost->GetPositionY(), 10);
|
||||
Construct = m_creature->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, Y, Ghost->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
|
||||
if(Construct)
|
||||
if (Construct)
|
||||
{
|
||||
Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true);
|
||||
SetThreatList(Construct); // Use same function as Doom Blossom to set Threat List.
|
||||
CAST_AI(mob_shadowy_constructAI, Construct->AI())->GhostGUID = GhostGUID;
|
||||
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();
|
||||
|
||||
if(target)
|
||||
if (target)
|
||||
Construct->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
}
|
||||
@@ -346,19 +346,19 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(Intro && !Done)
|
||||
if (Intro && !Done)
|
||||
{
|
||||
if(AggroTimer < diff)
|
||||
if (AggroTimer < diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
Done = true;
|
||||
if(AggroTargetGUID)
|
||||
if (AggroTargetGUID)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), AggroTargetGUID);
|
||||
if(pUnit)
|
||||
if (pUnit)
|
||||
AttackStart(pUnit);
|
||||
|
||||
DoZoneInCombat();
|
||||
@@ -371,10 +371,10 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
|
||||
if(!UpdateVictim() || !Done)
|
||||
if (!UpdateVictim() || !Done)
|
||||
return;
|
||||
|
||||
if(SummonShadowsTimer < diff)
|
||||
if (SummonShadowsTimer < diff)
|
||||
{
|
||||
//MindControlGhost();
|
||||
|
||||
@@ -383,20 +383,20 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
Creature* Shadow = NULL;
|
||||
float X = CalculateRandomLocation(m_creature->GetPositionX(), 10);
|
||||
Shadow = m_creature->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0);
|
||||
if(Shadow)
|
||||
if (Shadow)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if(!target)
|
||||
if (!target)
|
||||
target = m_creature->getVictim();
|
||||
|
||||
if(target)
|
||||
if (target)
|
||||
Shadow->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
SummonShadowsTimer = 60000;
|
||||
}else SummonShadowsTimer -= diff;
|
||||
|
||||
if(SummonDoomBlossomTimer < diff)
|
||||
if (SummonDoomBlossomTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
@@ -405,7 +405,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
float Z = target->GetPositionZ();
|
||||
Z = m_creature->GetMap()->GetVmapHeight(X, Y, Z, true);
|
||||
Creature* DoomBlossom = m_creature->SummonCreature(CREATURE_DOOM_BLOSSOM, X, Y, Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000);
|
||||
if(DoomBlossom)
|
||||
if (DoomBlossom)
|
||||
{
|
||||
DoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoomBlossom->setFaction(m_creature->getFaction());
|
||||
@@ -418,13 +418,13 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
}
|
||||
}else SummonDoomBlossomTimer -= diff;
|
||||
|
||||
if(IncinerateTimer < diff)
|
||||
if (IncinerateTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if(!target)
|
||||
if (!target)
|
||||
target = m_creature->getVictim();
|
||||
|
||||
if(target)
|
||||
if (target)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
@@ -436,23 +436,23 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
}
|
||||
}else IncinerateTimer -= diff;
|
||||
|
||||
if(CrushingShadowsTimer < diff)
|
||||
if (CrushingShadowsTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target && target->isAlive())
|
||||
if (target && target->isAlive())
|
||||
DoCast(target, SPELL_CRUSHING_SHADOWS);
|
||||
CrushingShadowsTimer = 10000 + rand()%16 * 1000;
|
||||
}else CrushingShadowsTimer -= diff;
|
||||
|
||||
/*** NOTE FOR FUTURE DEV: UNCOMMENT BELOW ONLY IF MIND CONTROL IS FULLY IMPLEMENTED **/
|
||||
/*if(ShadowOfDeathTimer < diff)
|
||||
/*if (ShadowOfDeathTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if(!target)
|
||||
if (!target)
|
||||
target = m_creature->getVictim();
|
||||
|
||||
if(target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoCast(target, SPELL_SHADOW_OF_DEATH);
|
||||
GhostGUID = target->GetGUID();
|
||||
@@ -461,7 +461,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
}
|
||||
}else ShadowOfDeathTimer -= diff;*/
|
||||
|
||||
if(RandomYellTimer < diff)
|
||||
if (RandomYellTimer < diff)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
@@ -471,9 +471,9 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
RandomYellTimer = 50000 + rand()%51 * 1000;
|
||||
}else RandomYellTimer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK))
|
||||
if (!m_creature->HasAura(SPELL_BERSERK))
|
||||
{
|
||||
if(EnrageTimer < diff)
|
||||
if (EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
|
||||
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
SpineTargetGUID = 0;
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
@@ -96,7 +96,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if(spell->Id == SPELL_HURL_SPINE && m_creature->HasAura(SPELL_TIDAL_SHIELD))
|
||||
if (spell->Id == SPELL_HURL_SPINE && m_creature->HasAura(SPELL_TIDAL_SHIELD))
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD);
|
||||
m_creature->CastSpell(m_creature, SPELL_TIDAL_BURST, true);
|
||||
@@ -106,7 +106,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, IN_PROGRESS);
|
||||
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
@@ -118,9 +118,9 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
bool RemoveImpalingSpine()
|
||||
{
|
||||
if(!SpineTargetGUID) return false;
|
||||
if (!SpineTargetGUID) return false;
|
||||
Unit* target = Unit::GetUnit(*m_creature, SpineTargetGUID);
|
||||
if(target && target->HasAura(SPELL_IMPALING_SPINE))
|
||||
if (target && target->HasAura(SPELL_IMPALING_SPINE))
|
||||
target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
SpineTargetGUID=0;
|
||||
return true;
|
||||
@@ -156,8 +156,8 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
case EVENT_SPINE:
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if(!target) target = m_creature->getVictim();
|
||||
if(target)
|
||||
if (!target) target = m_creature->getVictim();
|
||||
if (target)
|
||||
{
|
||||
m_creature->CastSpell(target, SPELL_IMPALING_SPINE, true);
|
||||
SpineTargetGUID = target->GetGUID();
|
||||
@@ -193,13 +193,13 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
}
|
||||
};
|
||||
|
||||
bool GOHello_go_najentus_spine(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_najentus_spine(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if(ScriptedInstance* pInstance = _GO->GetInstanceData())
|
||||
if(Creature* Najentus = Unit::GetCreature(*_GO, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
|
||||
if(CAST_AI(boss_najentusAI, Najentus->AI())->RemoveImpalingSpine())
|
||||
if (ScriptedInstance* pInstance = _GO->GetInstanceData())
|
||||
if (Creature* Najentus = Unit::GetCreature(*_GO, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
|
||||
if (CAST_AI(boss_najentusAI, Najentus->AI())->RemoveImpalingSpine())
|
||||
{
|
||||
player->CastSpell(player, SPELL_CREATE_NAJENTUS_SPINE, true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CREATE_NAJENTUS_SPINE, true);
|
||||
_GO->DeleteObjectWithOwner();
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedA
|
||||
// finds and stores the GUIDs for each Council member using instance data system.
|
||||
void LoadCouncilGUIDs()
|
||||
{
|
||||
if(ScriptedInstance* pInstance = (m_creature->GetInstanceData()))
|
||||
if (ScriptedInstance* pInstance = (m_creature->GetInstanceData()))
|
||||
{
|
||||
Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER);
|
||||
Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW);
|
||||
@@ -153,32 +153,32 @@ struct TRINITY_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedA
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!EventStarted)
|
||||
if (!EventStarted)
|
||||
return;
|
||||
|
||||
if(YellCounter > 3)
|
||||
if (YellCounter > 3)
|
||||
return;
|
||||
|
||||
if(AggroYellTimer)
|
||||
if (AggroYellTimer)
|
||||
{
|
||||
if(AggroYellTimer <= diff)
|
||||
if (AggroYellTimer <= diff)
|
||||
{
|
||||
if(Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
|
||||
if (Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
|
||||
{
|
||||
DoScriptText(CouncilAggro[YellCounter].entry, pMember);
|
||||
AggroYellTimer = CouncilAggro[YellCounter].timer;
|
||||
}
|
||||
++YellCounter;
|
||||
if(YellCounter > 3)
|
||||
if (YellCounter > 3)
|
||||
YellCounter = 0; // Reuse for Enrage Yells
|
||||
}else AggroYellTimer -= diff;
|
||||
}
|
||||
|
||||
if(EnrageTimer)
|
||||
if (EnrageTimer)
|
||||
{
|
||||
if(EnrageTimer <= diff)
|
||||
if (EnrageTimer <= diff)
|
||||
{
|
||||
if(Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
|
||||
if (Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
|
||||
{
|
||||
pMember->CastSpell(pMember, SPELL_BERSERK, true);
|
||||
DoScriptText(CouncilEnrage[YellCounter].entry, pMember);
|
||||
@@ -220,9 +220,9 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
Creature* pMember = NULL;
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if(pMember = (Unit::GetCreature((*m_creature), Council[i])))
|
||||
if (pMember = (Unit::GetCreature((*m_creature), Council[i])))
|
||||
{
|
||||
if(!pMember->isAlive())
|
||||
if (!pMember->isAlive())
|
||||
{
|
||||
pMember->RemoveCorpse();
|
||||
pMember->Respawn();
|
||||
@@ -231,10 +231,10 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_ILLIDARICOUNCILEVENT, NOT_STARTED);
|
||||
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))))
|
||||
VoiceTrigger->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
@@ -251,9 +251,9 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
|
||||
void StartEvent(Unit *target)
|
||||
{
|
||||
if(!pInstance) return;
|
||||
if (!pInstance) return;
|
||||
|
||||
if(target && target->isAlive())
|
||||
if (target && target->isAlive())
|
||||
{
|
||||
Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER);
|
||||
Council[1] = pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR);
|
||||
@@ -261,7 +261,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
Council[3] = pInstance->GetData64(DATA_VERASDARKSHADOW);
|
||||
|
||||
// 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))))
|
||||
{
|
||||
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->LoadCouncilGUIDs();
|
||||
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->EventStarted = true;
|
||||
@@ -270,10 +270,10 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Unit* Member = NULL;
|
||||
if(Council[i])
|
||||
if (Council[i])
|
||||
{
|
||||
Member = Unit::GetUnit((*m_creature), Council[i]);
|
||||
if(Member && Member->isAlive())
|
||||
if (Member && Member->isAlive())
|
||||
CAST_CRE(Member)->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
@@ -286,17 +286,17 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!EventBegun) return;
|
||||
if (!EventBegun) return;
|
||||
|
||||
if(EndEventTimer)
|
||||
if (EndEventTimer)
|
||||
{
|
||||
if(EndEventTimer <= diff)
|
||||
if (EndEventTimer <= diff)
|
||||
{
|
||||
if(DeathCount > 3)
|
||||
if (DeathCount > 3)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
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))))
|
||||
VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
pInstance->SetData(DATA_ILLIDARICOUNCILEVENT, DONE);
|
||||
m_creature->SummonCreature(AKAMAID,746.466980f,304.394989f,311.90208f,6.272870f,TEMPSUMMON_DEAD_DESPAWN,0);
|
||||
@@ -306,28 +306,28 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
}
|
||||
|
||||
Creature* pMember = (Unit::GetCreature(*m_creature, Council[DeathCount]));
|
||||
if(pMember && pMember->isAlive())
|
||||
if (pMember && pMember->isAlive())
|
||||
pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
++DeathCount;
|
||||
EndEventTimer = 1500;
|
||||
}else EndEventTimer -= diff;
|
||||
}
|
||||
|
||||
if(CheckTimer)
|
||||
if (CheckTimer)
|
||||
{
|
||||
if(CheckTimer <= diff)
|
||||
if (CheckTimer <= diff)
|
||||
{
|
||||
uint8 EvadeCheck = 0;
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if(Council[i])
|
||||
if (Council[i])
|
||||
{
|
||||
if(Creature* Member = (Unit::GetCreature((*m_creature), Council[i])))
|
||||
if (Creature* Member = (Unit::GetCreature((*m_creature), Council[i])))
|
||||
{
|
||||
// This is the evade/death check.
|
||||
if(Member->isAlive() && !Member->getVictim())
|
||||
if (Member->isAlive() && !Member->getVictim())
|
||||
++EvadeCheck; //If all members evade, we reset so that players can properly reset the event
|
||||
else if(!Member->isAlive()) // If even one member dies, kill the rest, set instance data, and kill self.
|
||||
else if (!Member->isAlive()) // If even one member dies, kill the rest, set instance data, and kill self.
|
||||
{
|
||||
EndEventTimer = 1000;
|
||||
CheckTimer = 0;
|
||||
@@ -337,7 +337,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
if(EvadeCheck > 3)
|
||||
if (EvadeCheck > 3)
|
||||
Reset();
|
||||
|
||||
CheckTimer = 2000;
|
||||
@@ -365,10 +365,10 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
Creature* Controller = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ILLIDARICOUNCIL)));
|
||||
if(Controller)
|
||||
if (Controller)
|
||||
CAST_AI(mob_illidari_councilAI, Controller->AI())->StartEvent(who);
|
||||
}
|
||||
else
|
||||
@@ -382,7 +382,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
||||
// this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are
|
||||
// not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures
|
||||
// have been loaded and have their GUIDs set in the instance data system.
|
||||
if(!LoadedGUIDs)
|
||||
if (!LoadedGUIDs)
|
||||
LoadGUIDs();
|
||||
}
|
||||
|
||||
@@ -390,8 +390,8 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
||||
{
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if(Unit* pUnit = Unit::GetUnit(*m_creature, Council[i]))
|
||||
if(pUnit != m_creature && pUnit->getVictim())
|
||||
if (Unit* pUnit = Unit::GetUnit(*m_creature, Council[i]))
|
||||
if (pUnit != m_creature && pUnit->getVictim())
|
||||
{
|
||||
AttackStart(pUnit->getVictim());
|
||||
return;
|
||||
@@ -402,14 +402,14 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if(done_by == m_creature)
|
||||
if (done_by == m_creature)
|
||||
return;
|
||||
|
||||
damage /= 4;
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if(Creature* pUnit = Unit::GetCreature(*m_creature, Council[i]))
|
||||
if(pUnit != m_creature && damage < pUnit->GetHealth())
|
||||
if (Creature* pUnit = Unit::GetCreature(*m_creature, Council[i]))
|
||||
if (pUnit != m_creature && damage < pUnit->GetHealth())
|
||||
{
|
||||
pUnit->SetHealth(pUnit->GetHealth() - damage);
|
||||
pUnit->LowerPlayerDamageReq(damage);
|
||||
@@ -419,7 +419,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
||||
|
||||
void LoadGUIDs()
|
||||
{
|
||||
if(!pInstance)
|
||||
if (!pInstance)
|
||||
{
|
||||
error_log(ERROR_INST_DATA);
|
||||
return;
|
||||
@@ -468,10 +468,10 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
Unit* pUnit = m_creature;
|
||||
uint32 member = 0; // He chooses Lady Malande most often
|
||||
|
||||
if(rand()%10 == 0) // But there is a chance he picks someone else.
|
||||
if (rand()%10 == 0) // But there is a chance he picks someone else.
|
||||
member = urand(1, 3);
|
||||
|
||||
if(member != 2) // No need to create another pointer to us using Unit::GetUnit
|
||||
if (member != 2) // No need to create another pointer to us using Unit::GetUnit
|
||||
pUnit = Unit::GetUnit((*m_creature), Council[member]);
|
||||
return pUnit;
|
||||
}
|
||||
@@ -487,19 +487,19 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), Council[i]);
|
||||
if(pUnit)
|
||||
if (pUnit)
|
||||
pUnit->CastSpell(pUnit, spellid, true, 0, 0, m_creature->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(BlessingTimer < diff)
|
||||
if (BlessingTimer < diff)
|
||||
{
|
||||
if(Unit* pUnit = SelectCouncilMember())
|
||||
if (Unit* pUnit = SelectCouncilMember())
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
@@ -510,15 +510,15 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
BlessingTimer = 60000;
|
||||
}else BlessingTimer -= diff;
|
||||
|
||||
if(ConsecrationTimer < diff)
|
||||
if (ConsecrationTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_CONSECRATION);
|
||||
ConsecrationTimer = 40000;
|
||||
}else ConsecrationTimer -= diff;
|
||||
|
||||
if(HammerOfJusticeTimer < diff)
|
||||
if (HammerOfJusticeTimer < diff)
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
// is in ~10-40 yd range
|
||||
if (m_creature->IsInRange(target, 10.0f, 40.0f, false))
|
||||
@@ -529,7 +529,7 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
}
|
||||
}else HammerOfJusticeTimer -= diff;
|
||||
|
||||
if(SealTimer < diff)
|
||||
if (SealTimer < diff)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
@@ -539,7 +539,7 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
SealTimer = 40000;
|
||||
}else SealTimer -= diff;
|
||||
|
||||
if(AuraTimer < diff)
|
||||
if (AuraTimer < diff)
|
||||
{
|
||||
CastAuraOnCouncil();
|
||||
AuraTimer = 90000;
|
||||
@@ -582,12 +582,12 @@ struct TRINITY_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(Cooldown)
|
||||
if (Cooldown)
|
||||
{
|
||||
if(Cooldown < diff) Cooldown = 0;
|
||||
if (Cooldown < diff) Cooldown = 0;
|
||||
else
|
||||
{
|
||||
Cooldown -= diff;
|
||||
@@ -595,7 +595,7 @@ struct TRINITY_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_
|
||||
}
|
||||
}
|
||||
|
||||
if(DampenMagicTimer < diff)
|
||||
if (DampenMagicTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_DAMPEN_MAGIC);
|
||||
Cooldown = 1000;
|
||||
@@ -603,23 +603,23 @@ struct TRINITY_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_
|
||||
ArcaneBoltTimer += 1000; // Give the Mage some time to spellsteal Dampen.
|
||||
}else DampenMagicTimer -= diff;
|
||||
|
||||
if(ArcaneExplosionTimer < diff)
|
||||
if (ArcaneExplosionTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION);
|
||||
Cooldown = 1000;
|
||||
ArcaneExplosionTimer = 14000;
|
||||
}else ArcaneExplosionTimer -= diff;
|
||||
|
||||
if(ArcaneBoltTimer < diff)
|
||||
if (ArcaneBoltTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ARCANE_BOLT);
|
||||
ArcaneBoltTimer = 3000;
|
||||
Cooldown = 2000;
|
||||
}else ArcaneBoltTimer -= diff;
|
||||
|
||||
if(BlizzardTimer < diff)
|
||||
if (BlizzardTimer < diff)
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_BLIZZARD);
|
||||
BlizzardTimer = 45000 + rand()%46 * 1000;
|
||||
@@ -628,9 +628,9 @@ struct TRINITY_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_
|
||||
}
|
||||
}else BlizzardTimer -= diff;
|
||||
|
||||
if(FlamestrikeTimer < diff)
|
||||
if (FlamestrikeTimer < diff)
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_FLAMESTRIKE);
|
||||
FlamestrikeTimer = 55000 + rand()%46 * 1000;
|
||||
@@ -670,34 +670,34 @@ struct TRINITY_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(EmpoweredSmiteTimer < diff)
|
||||
if (EmpoweredSmiteTimer < diff)
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_EMPOWERED_SMITE);
|
||||
EmpoweredSmiteTimer = 38000;
|
||||
}
|
||||
}else EmpoweredSmiteTimer -= diff;
|
||||
|
||||
if(CircleOfHealingTimer < diff)
|
||||
if (CircleOfHealingTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_CIRCLE_OF_HEALING);
|
||||
CircleOfHealingTimer = 60000;
|
||||
}else CircleOfHealingTimer -= diff;
|
||||
|
||||
if(DivineWrathTimer < diff)
|
||||
if (DivineWrathTimer < diff)
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_DIVINE_WRATH);
|
||||
DivineWrathTimer = 40000 + rand()%41 * 1000;
|
||||
}
|
||||
}else DivineWrathTimer -= diff;
|
||||
|
||||
if(ReflectiveShieldTimer < diff)
|
||||
if (ReflectiveShieldTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_REFLECTIVE_SHIELD);
|
||||
ReflectiveShieldTimer = 65000;
|
||||
@@ -744,26 +744,26 @@ struct TRINITY_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(!HasVanished)
|
||||
if (!HasVanished)
|
||||
{
|
||||
if(DeadlyPoisonTimer < diff)
|
||||
if (DeadlyPoisonTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
|
||||
DeadlyPoisonTimer = 15000 + rand()%31 * 1000;
|
||||
}else DeadlyPoisonTimer -= diff;
|
||||
|
||||
if(AppearEnvenomTimer < diff) // Cast Envenom. This is cast 4 seconds after Vanish is over
|
||||
if (AppearEnvenomTimer < diff) // Cast Envenom. This is cast 4 seconds after Vanish is over
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ENVENOM);
|
||||
AppearEnvenomTimer = 90000;
|
||||
}else AppearEnvenomTimer -= diff;
|
||||
|
||||
if(VanishTimer < diff) // Disappear and stop attacking, but follow a random unit
|
||||
if (VanishTimer < diff) // Disappear and stop attacking, but follow a random unit
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
VanishTimer = 30000;
|
||||
AppearEnvenomTimer= 28000;
|
||||
@@ -781,7 +781,7 @@ struct TRINITY_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
}
|
||||
else
|
||||
{
|
||||
if(VanishTimer < diff) // Become attackable and poison current target
|
||||
if (VanishTimer < diff) // Become attackable and poison current target
|
||||
{
|
||||
Unit* target = m_creature->getVictim();
|
||||
DoCast(target, SPELL_DEADLY_POISON);
|
||||
@@ -794,7 +794,7 @@ struct TRINITY_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
HasVanished = false;
|
||||
}else VanishTimer -= diff;
|
||||
|
||||
if(AppearEnvenomTimer < diff) // Appear 2 seconds before becoming attackable (Shifting out of vanish)
|
||||
if (AppearEnvenomTimer < diff) // Appear 2 seconds before becoming attackable (Shifting out of vanish)
|
||||
{
|
||||
m_creature->GetMotionMaster()->Clear();
|
||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
|
||||
@@ -40,7 +40,7 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
{
|
||||
instance_black_temple(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
instance_black_temple(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint32 Encounters[ENCOUNTERS];
|
||||
std::string str_data;
|
||||
@@ -107,7 +107,7 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) return true;
|
||||
if (Encounters[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -153,24 +153,24 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 185483: NajentusGate = go->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
|
||||
if(Encounters[0] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[0] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185882: MainTempleDoors = go->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
|
||||
if(Encounters[1] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[1] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185478: ShadeOfAkamaDoor = go->GetGUID();break;
|
||||
case 185480: CommonDoor = go->GetGUID();
|
||||
if(Encounters[3] == DONE)HandleGameObject(NULL,true,go);;break;
|
||||
if (Encounters[3] == DONE)HandleGameObject(NULL,true,go);;break;
|
||||
case 186153: TeronDoor = go->GetGUID();
|
||||
if(Encounters[3] == DONE)HandleGameObject(NULL,true,go);;break;
|
||||
if (Encounters[3] == DONE)HandleGameObject(NULL,true,go);;break;
|
||||
case 185892: GuurtogDoor = go->GetGUID();
|
||||
if(Encounters[4] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[4] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185479: TempleDoor = go->GetGUID();
|
||||
if(Encounters[5] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[5] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185482: MotherDoor = go->GetGUID();
|
||||
if(Encounters[6] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[6] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185481: CouncilDoor = go->GetGUID();
|
||||
if(Encounters[7] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[7] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 186152: SimpleDoor = go->GetGUID();
|
||||
if(Encounters[7] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
if (Encounters[7] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185905: IllidanGate = go->GetGUID(); break; // Gate leading to Temple Summit
|
||||
case 186261: IllidanDoor[0] = go->GetGUID(); break; // Right door at Temple Summit
|
||||
case 186262: IllidanDoor[1] = go->GetGUID(); break; // Left door at Temple Summit
|
||||
@@ -208,25 +208,25 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
switch(type)
|
||||
{
|
||||
case DATA_HIGHWARLORDNAJENTUSEVENT:
|
||||
if(data == DONE)
|
||||
if (data == DONE)
|
||||
{
|
||||
HandleGameObject(NajentusGate, true);
|
||||
}
|
||||
Encounters[0] = data;break;
|
||||
case DATA_SUPREMUSEVENT:
|
||||
if(data == DONE)
|
||||
if (data == DONE)
|
||||
{
|
||||
HandleGameObject(NajentusGate, true);
|
||||
}
|
||||
Encounters[1] = data; break;
|
||||
case DATA_SHADEOFAKAMAEVENT:
|
||||
if(data == IN_PROGRESS)
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
HandleGameObject(ShadeOfAkamaDoor, false);
|
||||
}else HandleGameObject(ShadeOfAkamaDoor, true);
|
||||
Encounters[2] = data; break;
|
||||
case DATA_TERONGOREFIENDEVENT:
|
||||
if(data == IN_PROGRESS)
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
HandleGameObject(TeronDoor, false);
|
||||
HandleGameObject(CommonDoor, false);
|
||||
@@ -237,25 +237,25 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
}
|
||||
Encounters[3] = data; break;
|
||||
case DATA_GURTOGGBLOODBOILEVENT:
|
||||
if(data == DONE)
|
||||
if (data == DONE)
|
||||
{
|
||||
HandleGameObject(GuurtogDoor, true);
|
||||
}
|
||||
Encounters[4] = data; break;
|
||||
case DATA_RELIQUARYOFSOULSEVENT:
|
||||
if(data == DONE)
|
||||
if (data == DONE)
|
||||
{
|
||||
HandleGameObject(TempleDoor, true);
|
||||
}
|
||||
Encounters[5] = data; break;
|
||||
case DATA_MOTHERSHAHRAZEVENT:
|
||||
if(data == DONE)
|
||||
if (data == DONE)
|
||||
{
|
||||
HandleGameObject(MotherDoor, true);
|
||||
}
|
||||
Encounters[6] = data; break;
|
||||
case DATA_ILLIDARICOUNCILEVENT:
|
||||
if(data == IN_PROGRESS)
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
HandleGameObject(CouncilDoor, false);
|
||||
HandleGameObject(SimpleDoor, false);
|
||||
@@ -331,9 +331,9 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_black_temple(Map* map)
|
||||
InstanceData* GetInstanceData_instance_black_temple(Map* pMap)
|
||||
{
|
||||
return new instance_black_temple(map);
|
||||
return new instance_black_temple(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_black_temple()
|
||||
|
||||
@@ -65,9 +65,9 @@ uint32 RingBoss[]=
|
||||
9032, // Hedrum
|
||||
};
|
||||
|
||||
bool AreaTrigger_at_ring_of_law(Player *player, AreaTriggerEntry *at)
|
||||
bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry *at)
|
||||
{
|
||||
ScriptedInstance* pInstance = (player->GetInstanceData());
|
||||
ScriptedInstance* pInstance = (pPlayer->GetInstanceData());
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ bool AreaTrigger_at_ring_of_law(Player *player, AreaTriggerEntry *at)
|
||||
return false;
|
||||
|
||||
pInstance->SetData(TYPE_RING_OF_LAW,IN_PROGRESS);
|
||||
player->SummonCreature(C_GRIMSTONE,625.559,-205.618,-52.735,2.609,TEMPSUMMON_DEAD_DESPAWN,0);
|
||||
pPlayer->SummonCreature(C_GRIMSTONE,625.559,-205.618,-52.735,2.609,TEMPSUMMON_DEAD_DESPAWN,0);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -339,18 +339,18 @@ struct TRINITY_DLL_DECL mob_phalanxAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ThunderClap_Timer
|
||||
if( ThunderClap_Timer < diff )
|
||||
if (ThunderClap_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP);
|
||||
ThunderClap_Timer = 10000;
|
||||
}else ThunderClap_Timer -= diff;
|
||||
|
||||
//FireballVolley_Timer
|
||||
if( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51)
|
||||
{
|
||||
if (FireballVolley_Timer < diff)
|
||||
{
|
||||
@@ -360,7 +360,7 @@ struct TRINITY_DLL_DECL mob_phalanxAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//MightyBlow_Timer
|
||||
if( MightyBlow_Timer < diff )
|
||||
if (MightyBlow_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW);
|
||||
MightyBlow_Timer = 10000;
|
||||
@@ -393,68 +393,68 @@ CreatureAI* GetAI_mob_phalanx(Creature *_Creature)
|
||||
#define GOSSIP_ITEM_KHARAN_9 "Indeed."
|
||||
#define GOSSIP_ITEM_KHARAN_10 "The door is open, Kharan. You are a free man."
|
||||
|
||||
bool GossipHello_npc_kharan_mighthammer(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if( _Creature->isQuestGiver() )
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
if (_Creature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if( player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (pPlayer->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
if( player->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
if (pPlayer->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
|
||||
if (player->GetTeam() == HORDE)
|
||||
player->SEND_GOSSIP_MENU(2473, _Creature->GetGUID());
|
||||
if (pPlayer->GetTeam() == HORDE)
|
||||
pPlayer->SEND_GOSSIP_MENU(2473, _Creature->GetGUID());
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(2474, _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(2474, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_kharan_mighthammer(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(2475, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(2475, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->SEND_GOSSIP_MENU(2476, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->SEND_GOSSIP_MENU(2476, _Creature->GetGUID());
|
||||
break;
|
||||
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
player->SEND_GOSSIP_MENU(2477, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
pPlayer->SEND_GOSSIP_MENU(2477, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
player->SEND_GOSSIP_MENU(2478, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
pPlayer->SEND_GOSSIP_MENU(2478, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
player->SEND_GOSSIP_MENU(2479, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
pPlayer->SEND_GOSSIP_MENU(2479, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
|
||||
player->SEND_GOSSIP_MENU(2480, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
|
||||
pPlayer->SEND_GOSSIP_MENU(2480, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+7:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
|
||||
player->SEND_GOSSIP_MENU(2481, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
|
||||
pPlayer->SEND_GOSSIP_MENU(2481, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+8:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
|
||||
player->SEND_GOSSIP_MENU(2482, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
|
||||
pPlayer->SEND_GOSSIP_MENU(2482, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+9:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (player->GetTeam() == HORDE)
|
||||
player->AreaExploredOrEventHappens(QUEST_4001);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
if (pPlayer->GetTeam() == HORDE)
|
||||
pPlayer->AreaExploredOrEventHappens(QUEST_4001);
|
||||
else
|
||||
player->AreaExploredOrEventHappens(QUEST_4342);
|
||||
pPlayer->AreaExploredOrEventHappens(QUEST_4342);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -472,38 +472,38 @@ bool GossipSelect_npc_kharan_mighthammer(Player *player, Creature *_Creature, ui
|
||||
#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos."
|
||||
#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract"
|
||||
|
||||
bool GossipHello_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_lokhtos_darkbargainer(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if (_Creature->isVendor() && player->GetReputationRank(59) >= REP_FRIENDLY)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
if (_Creature->isVendor() && pPlayer->GetReputationRank(59) >= REP_FRIENDLY)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
if (player->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 &&
|
||||
!player->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) &&
|
||||
player->HasItemCount(ITEM_SULFURON_INGOT, 1))
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 &&
|
||||
!pPlayer->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) &&
|
||||
pPlayer->HasItemCount(ITEM_SULFURON_INGOT, 1))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
}
|
||||
|
||||
if (player->GetReputationRank(59) < REP_FRIENDLY)
|
||||
player->SEND_GOSSIP_MENU(3673, _Creature->GetGUID());
|
||||
if (pPlayer->GetReputationRank(59) < REP_FRIENDLY)
|
||||
pPlayer->SEND_GOSSIP_MENU(3673, _Creature->GetGUID());
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(3677, _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(3677, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_lokhtos_darkbargainer(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
|
||||
}
|
||||
if (action == GOSSIP_ACTION_TRADE)
|
||||
player->SEND_VENDORLIST( _Creature->GetGUID() );
|
||||
pPlayer->SEND_VENDORLIST(_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -552,8 +552,8 @@ struct TRINITY_DLL_DECL npc_dughal_stormwingAI : public npc_escortAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if( (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED )
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if ((pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -578,22 +578,22 @@ CreatureAI* GetAI_npc_dughal_stormwing(Creature *_Creature)
|
||||
|
||||
return dughal_stormwingAI;
|
||||
}
|
||||
bool GossipHello_npc_dughal_stormwing(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_dughal_stormwing(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if(player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS )
|
||||
if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(2846, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2846, _Creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, pPlayer->GetGUID());
|
||||
_Creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
@@ -615,7 +615,7 @@ bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint
|
||||
#define SAY_WINDSOR_9 "Ah, there it is!"
|
||||
#define MOB_ENTRY_REGINALD_WINDSOR 9682
|
||||
|
||||
Player* PlayerStart;
|
||||
Player* pPlayerStart;
|
||||
/*
|
||||
struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
|
||||
{
|
||||
@@ -626,7 +626,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
switch( i )
|
||||
switch(i)
|
||||
{
|
||||
case 1:
|
||||
m_creature->Say(SAY_WINDSOR_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
@@ -688,20 +688,20 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if(pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if (pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
IsOnHold = false;
|
||||
if(!pInstance->GetData(DATA_GATE_D) && pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_NOT_STARTED )
|
||||
if (!pInstance->GetData(DATA_GATE_D) && pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
m_creature->Say(SAY_WINDSOR_4_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
pInstance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_BEFORE_START);
|
||||
}
|
||||
if( pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED )
|
||||
if (pInstance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
{
|
||||
m_creature->Say(SAY_WINDSOR_4_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
pInstance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
if( (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& pInstance->GetData(DATA_SUPPLY_ROOM) == ENCOUNTER_STATE_ENDED )
|
||||
if ((pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& pInstance->GetData(DATA_SUPPLY_ROOM) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -744,13 +744,13 @@ CreatureAI* GetAI_npc_marshal_windsor(Creature *_Creature)
|
||||
return marshal_windsorAI;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_marshal_windsor(Player *player, Creature *creature, Quest const *quest )
|
||||
bool QuestAccept_npc_marshal_windsor(Player* pPlayer, Creature *creature, Quest const *quest)
|
||||
{
|
||||
if( quest->GetQuestId() == 4322 )
|
||||
if (quest->GetQuestId() == 4322)
|
||||
{PlayerStart = player;
|
||||
if( pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED )
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
creature->setFaction(11);
|
||||
}
|
||||
@@ -791,7 +791,7 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
wp=i;
|
||||
switch( i )
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
m_creature->setFaction(11);
|
||||
@@ -848,15 +848,15 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if( IsBeingEscorted )
|
||||
if (IsBeingEscorted)
|
||||
return;
|
||||
|
||||
if( who->GetTypeId() == TYPEID_PLAYER )
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if( CAST_PLR(who)->GetQuestStatus(4322) == QUEST_STATUS_INCOMPLETE )
|
||||
if (CAST_PLR(who)->GetQuestStatus(4322) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
float Radius = 10.0;
|
||||
if( m_creature->IsWithinDistInMap(who, Radius) )
|
||||
if (m_creature->IsWithinDistInMap(who, Radius))
|
||||
{
|
||||
IsOnHold = false;
|
||||
Start(true, false, who->GetGUID());
|
||||
@@ -883,48 +883,48 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if(wp==7)
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if (wp==7)
|
||||
{
|
||||
if(!pInstance->GetData(DATA_GATE_J) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED )
|
||||
if (!pInstance->GetData(DATA_GATE_J) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
pInstance->SetData(DATA_CREATURE_JAZ,1);
|
||||
pInstance->SetData(DATA_JAZ,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if( pInstance->GetData(DATA_CREATURE_JAZ) && pInstance->GetData(DATA_CREATURE_OGRABISI) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS )
|
||||
if (pInstance->GetData(DATA_CREATURE_JAZ) && pInstance->GetData(DATA_CREATURE_OGRABISI) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
IsOnHold = false;
|
||||
pInstance->SetData(DATA_JAZ,ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
else if(wp==11)
|
||||
else if (wp==11)
|
||||
{
|
||||
if(!pInstance->GetData(DATA_GATE_S) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED )
|
||||
if (!pInstance->GetData(DATA_GATE_S) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
pInstance->SetData(DATA_CREATURE_SHILL,1);
|
||||
pInstance->SetData(DATA_SHILL,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if( pInstance->GetData(DATA_CREATURE_SHILL) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS )
|
||||
if (pInstance->GetData(DATA_CREATURE_SHILL) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
pInstance->SetData(DATA_SHILL,ENCOUNTER_STATE_ENDED);
|
||||
IsOnHold = false;
|
||||
}
|
||||
}
|
||||
else if(wp==20)
|
||||
else if (wp==20)
|
||||
{
|
||||
if(!pInstance->GetData(DATA_GATE_C) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
if (!pInstance->GetData(DATA_GATE_C) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
pInstance->SetData(DATA_CREATURE_CREST,1);
|
||||
m_creature->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
pInstance->SetData(DATA_CREST,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if( pInstance->GetData(DATA_CREATURE_CREST) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS )
|
||||
if (pInstance->GetData(DATA_CREATURE_CREST) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
IsOnHold = false;
|
||||
pInstance->SetData(DATA_CREST,ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
if( pInstance->GetData(DATA_TOBIAS)==ENCOUNTER_STATE_OBJECTIVE_COMPLETED ) IsOnHold = false;
|
||||
if (pInstance->GetData(DATA_TOBIAS)==ENCOUNTER_STATE_OBJECTIVE_COMPLETED) IsOnHold = false;
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
@@ -1013,8 +1013,8 @@ struct TRINITY_DLL_DECL npc_tobias_seecherAI : public npc_escortAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if( (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& pInstance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_ENDED )
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if ((pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& pInstance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -1043,22 +1043,22 @@ CreatureAI* GetAI_npc_tobias_seecher(Creature *_Creature)
|
||||
return tobias_seecherAI;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_tobias_seecher(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_tobias_seecher(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if(player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS )
|
||||
if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Get out of here, Tobias, you're free!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(2847, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Get out of here, Tobias, you're free!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2847, _Creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_tobias_seecher(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, player->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(false, true, pPlayer->GetGUID());
|
||||
_Creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
@@ -1174,7 +1174,7 @@ CreatureAI* GetAI_npc_rocknot(Creature *_Creature)
|
||||
return Rocknot_AI;
|
||||
}
|
||||
|
||||
bool ChooseReward_npc_rocknot(Player *player, Creature *_Creature, const Quest *_Quest, uint32 item)
|
||||
bool ChooseReward_npc_rocknot(Player* pPlayer, Creature *_Creature, const Quest *_Quest, uint32 item)
|
||||
{
|
||||
ScriptedInstance* pInstance = (_Creature->GetInstanceData());
|
||||
|
||||
|
||||
@@ -60,14 +60,14 @@ struct TRINITY_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI
|
||||
case 1: RandY += Rand; break;
|
||||
}
|
||||
Summoned = DoSpawnCreature(9178, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
|
||||
if(Summoned)
|
||||
if (Summoned)
|
||||
(Summoned->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FireBlast_Timer
|
||||
|
||||
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_anubshiahAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowBolt_Timer
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (HandOfThaurissan_Timer < diff)
|
||||
|
||||
@@ -75,7 +75,7 @@ struct TRINITY_DLL_DECL boss_general_angerforgeAI : public ScriptedAI
|
||||
}
|
||||
Rand1 = 0;
|
||||
SummonedAdds = DoSpawnCreature(8901, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
||||
if(SummonedAdds)
|
||||
if (SummonedAdds)
|
||||
(SummonedAdds->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
@@ -96,14 +96,14 @@ struct TRINITY_DLL_DECL boss_general_angerforgeAI : public ScriptedAI
|
||||
}
|
||||
Rand2 = 0;
|
||||
SummonedMedics = DoSpawnCreature(8894, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
||||
if(SummonedMedics)
|
||||
if (SummonedMedics)
|
||||
(SummonedMedics->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MightyBlow_Timer
|
||||
@@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_general_angerforgeAI : public ScriptedAI
|
||||
}else Cleave_Timer -= diff;
|
||||
|
||||
//Adds_Timer
|
||||
if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21 )
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21)
|
||||
{
|
||||
if (Adds_Timer < diff)
|
||||
{
|
||||
@@ -142,7 +142,7 @@ struct TRINITY_DLL_DECL boss_general_angerforgeAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Summon Medics
|
||||
if ( !Medics && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21 )
|
||||
if (!Medics && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21)
|
||||
{
|
||||
SummonMedics(m_creature->getVictim());
|
||||
SummonMedics(m_creature->getVictim());
|
||||
|
||||
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_gorosh_the_dervishAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//WhirlWind_Timer
|
||||
|
||||
@@ -48,7 +48,7 @@ struct TRINITY_DLL_DECL boss_grizzleAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//GroundTremor_Timer
|
||||
@@ -59,7 +59,7 @@ struct TRINITY_DLL_DECL boss_grizzleAI : public ScriptedAI
|
||||
}else GroundTremor_Timer -= diff;
|
||||
|
||||
//Frenzy_Timer
|
||||
if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51)
|
||||
{
|
||||
if (Frenzy_Timer < diff)
|
||||
{
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowWordPain_Timer
|
||||
|
||||
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_magmusAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FieryBurst_Timer
|
||||
@@ -57,7 +57,7 @@ struct TRINITY_DLL_DECL boss_magmusAI : public ScriptedAI
|
||||
}else FieryBurst_Timer -= diff;
|
||||
|
||||
//WarStomp_Timer
|
||||
if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51)
|
||||
{
|
||||
if (WarStomp_Timer < diff)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MindBlast_Timer
|
||||
|
||||
@@ -60,16 +60,16 @@ struct TRINITY_DLL_DECL boss_angerrelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
@@ -144,16 +144,16 @@ struct TRINITY_DLL_DECL boss_doperelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
@@ -230,16 +230,16 @@ struct TRINITY_DLL_DECL boss_haterelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
@@ -327,16 +327,16 @@ struct TRINITY_DLL_DECL boss_vilerelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
@@ -426,16 +426,16 @@ struct TRINITY_DLL_DECL boss_seethrelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
@@ -528,22 +528,22 @@ struct TRINITY_DLL_DECL boss_gloomrelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Hamstring_Timer
|
||||
@@ -580,36 +580,36 @@ CreatureAI* GetAI_boss_gloomrel(Creature *_Creature)
|
||||
#define GOSSIP_ITEM_TEACH_2 "Continue..."
|
||||
#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute"
|
||||
|
||||
bool GossipHello_boss_gloomrel(Player *player, Creature *_Creature)
|
||||
bool GossipHello_boss_gloomrel(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(4083) == 1 && player->GetSkillValue(SKILL_MINING) >= 230 && !player->HasSpell(14891) )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
if (pPlayer->GetQuestRewardStatus(4083) == 1 && pPlayer->GetSkillValue(SKILL_MINING) >= 230 && !pPlayer->HasSpell(14891))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (player->GetQuestRewardStatus(4083) == 0 && player->GetSkillValue(SKILL_MINING) >= 230)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
if (pPlayer->GetQuestRewardStatus(4083) == 0 && pPlayer->GetSkillValue(SKILL_MINING) >= 230)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_gloomrel(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
player->SEND_GOSSIP_MENU(2606, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
pPlayer->SEND_GOSSIP_MENU(2606, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(player, 14894, false);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(pPlayer, 14894, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
player->SEND_GOSSIP_MENU(2604, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
pPlayer->SEND_GOSSIP_MENU(2604, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
if (ScriptedInstance* pInstance = _Creature->GetInstanceData())
|
||||
{
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
@@ -660,8 +660,8 @@ struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI
|
||||
// was set before event start, so set again
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
|
||||
if(pInstance)
|
||||
if(pInstance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
else
|
||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
@@ -677,22 +677,22 @@ struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop(true);
|
||||
m_creature->LoadCreaturesAddon();
|
||||
if(m_creature->isAlive())
|
||||
if (m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
@@ -726,7 +726,7 @@ struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI
|
||||
}else DemonArmor_Timer -= diff;
|
||||
|
||||
//Summon Voidwalkers
|
||||
if (!Voidwalkers && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
|
||||
if (!Voidwalkers && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51)
|
||||
{
|
||||
m_creature->CastSpell(m_creature->getVictim(), SPELL_SUMMON_VOIDWALKERS, true);
|
||||
Voidwalkers = true;
|
||||
@@ -743,31 +743,31 @@ CreatureAI* GetAI_boss_doomrel(Creature *_Creature)
|
||||
|
||||
#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!"
|
||||
|
||||
bool GossipHello_boss_doomrel(Player *player, Creature *_Creature)
|
||||
bool GossipHello_boss_doomrel(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(2601, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2601, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_doomrel(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_boss_doomrel(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(2605, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(2605, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
//start event here
|
||||
_Creature->setFaction(FACTION_HOSTILE);
|
||||
_Creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
_Creature->AI()->AttackStart(player);
|
||||
_Creature->AI()->AttackStart(pPlayer);
|
||||
ScriptedInstance* pInstance = _Creature->GetInstanceData();
|
||||
if(pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER,player->GetGUID());
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER,pPlayer->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -72,7 +72,7 @@ enum
|
||||
|
||||
struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
{
|
||||
instance_blackrock_depths(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
instance_blackrock_depths(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
std::string str_data;
|
||||
@@ -176,7 +176,7 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break;
|
||||
case GO_TOMB_EXIT:
|
||||
GoTombExitGUID = go->GetGUID();
|
||||
if(GhostKillCount >= 7)
|
||||
if (GhostKillCount >= 7)
|
||||
HandleGameObject(0, true, go);
|
||||
else
|
||||
HandleGameObject(0, false, go);
|
||||
@@ -197,7 +197,7 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
{
|
||||
case DATA_EVENSTARTER:
|
||||
TombEventStarterGUID = data;
|
||||
if(!TombEventStarterGUID)
|
||||
if (!TombEventStarterGUID)
|
||||
TombOfSevenReset();//reset
|
||||
else
|
||||
TombOfSevenStart();//start
|
||||
@@ -327,9 +327,9 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounter[i] == IN_PROGRESS)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
if(GhostKillCount > 0 && GhostKillCount < 7)
|
||||
if (GhostKillCount > 0 && GhostKillCount < 7)
|
||||
GhostKillCount = 0;//reset tomb of seven event
|
||||
if(GhostKillCount > 7)
|
||||
if (GhostKillCount > 7)
|
||||
GhostKillCount = 7;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
@@ -337,13 +337,13 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
|
||||
void TombOfSevenEvent()
|
||||
{
|
||||
if(GhostKillCount < 7 && TombBossGUIDs[TombEventCounter])
|
||||
if (GhostKillCount < 7 && TombBossGUIDs[TombEventCounter])
|
||||
{
|
||||
if(Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
|
||||
{
|
||||
boss->setFaction(FACTION_HOSTILE);
|
||||
boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
if(Unit* target = boss->SelectNearestTarget(500))
|
||||
if (Unit* target = boss->SelectNearestTarget(500))
|
||||
boss->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
@@ -355,9 +355,9 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
HandleGameObject(GoTombEnterGUID,true);//event reseted, open entrance door
|
||||
for(uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
if(Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
{
|
||||
if(!boss->isAlive())
|
||||
if (!boss->isAlive())
|
||||
{//do not call EnterEvadeMode(), it will create infinit loops
|
||||
boss->Respawn();
|
||||
boss->RemoveAllAuras();
|
||||
@@ -394,23 +394,23 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
}
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
if(TombEventStarterGUID && GhostKillCount < 7)
|
||||
if (TombEventStarterGUID && GhostKillCount < 7)
|
||||
{
|
||||
if(TombTimer <= diff)
|
||||
if (TombTimer <= diff)
|
||||
{
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter++;
|
||||
TombOfSevenEvent();
|
||||
}else TombTimer -= diff;
|
||||
}
|
||||
if(GhostKillCount >= 7 && TombEventStarterGUID)
|
||||
if (GhostKillCount >= 7 && TombEventStarterGUID)
|
||||
TombOfSevenEnd();
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_blackrock_depths(Map* map)
|
||||
InstanceData* GetInstanceData_instance_blackrock_depths(Map* pMap)
|
||||
{
|
||||
return new instance_blackrock_depths(map);
|
||||
return new instance_blackrock_depths(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_blackrock_depths()
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_drakkisathAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FireNova_Timer
|
||||
|
||||
@@ -96,7 +96,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
|
||||
//char buf[200];
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!RootSelf)
|
||||
@@ -174,7 +174,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
|
||||
|
||||
//Summon Rend
|
||||
if (!SummonedRend && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 11
|
||||
&& m_creature->GetHealth() > 0 )
|
||||
&& m_creature->GetHealth() > 0)
|
||||
{
|
||||
//summon Rend and Change model to normal Gyth
|
||||
//Inturrupt any spell casting
|
||||
|
||||
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_halyconAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//CrowdPummel_Timer
|
||||
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL boss_halyconAI : public ScriptedAI
|
||||
}else MightyBlow_Timer -= diff;
|
||||
|
||||
//Summon Gizrul
|
||||
if ( !Summoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25 )
|
||||
if (!Summoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25)
|
||||
{
|
||||
m_creature->SummonCreature(10268,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,300000);
|
||||
Summoned = true;
|
||||
|
||||
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL boss_highlordomokkAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//WarStomp_Timer
|
||||
|
||||
@@ -44,25 +44,25 @@ struct TRINITY_DLL_DECL boss_mothersmolderwebAI : public ScriptedAI
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
{
|
||||
if( m_creature->GetHealth() <= damage )
|
||||
if (m_creature->GetHealth() <= damage)
|
||||
m_creature->CastSpell(m_creature,SPELL_SUMMON_SPIRE_SPIDERLING,true);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Crystalize_Timer
|
||||
if( Crystalize_Timer < diff )
|
||||
if (Crystalize_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_CRYSTALIZE);
|
||||
Crystalize_Timer = 15000;
|
||||
}else Crystalize_Timer -= diff;
|
||||
|
||||
//MothersMilk_Timer
|
||||
if( MothersMilk_Timer < diff )
|
||||
if (MothersMilk_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_MOTHERSMILK);
|
||||
MothersMilk_Timer = 5000+rand()%7500;
|
||||
|
||||
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//BlastWave_Timer
|
||||
@@ -97,16 +97,16 @@ struct TRINITY_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI
|
||||
}else Knockaway_Timer -= diff;
|
||||
|
||||
//Summon two Beserks
|
||||
if ( !Summoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
|
||||
if (!Summoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
|
||||
SummonedCreature = m_creature->SummonCreature(9216,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,300000);
|
||||
if(SummonedCreature)
|
||||
if (SummonedCreature)
|
||||
(SummonedCreature->AI())->AttackStart(target);
|
||||
SummonedCreature = m_creature->SummonCreature(9268,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,300000);
|
||||
if(SummonedCreature)
|
||||
if (SummonedCreature)
|
||||
(SummonedCreature->AI())->AttackStart(target);
|
||||
Summoned = true;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FireNova_Timer
|
||||
|
||||
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_quatermasterzigrisAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Shoot_Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_rend_blackhandAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//WhirlWind_Timer
|
||||
|
||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_shadowvoshAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//CurseOfBlood_Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_thebeastAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Flamebreak_Timer
|
||||
|
||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_warmastervooneAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Snapkick_Timer
|
||||
|
||||
@@ -189,7 +189,7 @@ struct TRINITY_DLL_DECL boss_chromaggusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Shimmer_Timer Timer
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_ebonrocAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Shadowflame Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_firemawAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowFlame_Timer
|
||||
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL boss_firemawAI : public ScriptedAI
|
||||
if (WingBuffet_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_WINGBUFFET);
|
||||
if(DoGetThreat(m_creature->getVictim()))
|
||||
if (DoGetThreat(m_creature->getVictim()))
|
||||
DoModifyThreatPercent(m_creature->getVictim(),-75);
|
||||
|
||||
WingBuffet_Timer = 25000;
|
||||
|
||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_flamegorAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowFlame_Timer
|
||||
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL boss_flamegorAI : public ScriptedAI
|
||||
if (WingBuffet_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_WINGBUFFET);
|
||||
if(DoGetThreat(m_creature->getVictim()))
|
||||
if (DoGetThreat(m_creature->getVictim()))
|
||||
DoModifyThreatPercent(m_creature->getVictim(),-75);
|
||||
|
||||
WingBuffet_Timer = 25000;
|
||||
|
||||
@@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL boss_nefarianAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowFlame_Timer
|
||||
|
||||
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL boss_razorgoreAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Cleave_Timer
|
||||
@@ -94,7 +94,7 @@ struct TRINITY_DLL_DECL boss_razorgoreAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(),SPELL_CONFLAGRATION);
|
||||
//We will remove this threat reduction and add an aura check.
|
||||
|
||||
//if(DoGetThreat(m_creature->getVictim()))
|
||||
//if (DoGetThreat(m_creature->getVictim()))
|
||||
//DoModifyThreatPercent(m_creature->getVictim(),-50);
|
||||
|
||||
Conflagration_Timer = 12000;
|
||||
|
||||
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL boss_vaelAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// Yell if hp lower than 15%
|
||||
@@ -203,7 +203,7 @@ struct TRINITY_DLL_DECL boss_vaelAI : public ScriptedAI
|
||||
if (TailSwipe_Timer < diff)
|
||||
{
|
||||
//Only cast if we are behind
|
||||
/*if (!m_creature->HasInArc( M_PI, m_creature->getVictim()))
|
||||
/*if (!m_creature->HasInArc(M_PI, m_creature->getVictim()))
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_TAILSWIPE);
|
||||
}*/
|
||||
@@ -215,27 +215,27 @@ struct TRINITY_DLL_DECL boss_vaelAI : public ScriptedAI
|
||||
}
|
||||
};
|
||||
|
||||
void SendDefaultMenu_boss_vael(Player *player, Creature *_Creature, uint32 action)
|
||||
void SendDefaultMenu_boss_vael(Player* pPlayer, Creature *_Creature, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(boss_vaelAI, _Creature->AI())->BeginSpeach(player);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(boss_vaelAI, _Creature->AI())->BeginSpeach(pPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_vael(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_boss_vael(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (sender == GOSSIP_SENDER_MAIN)
|
||||
SendDefaultMenu_boss_vael(player, _Creature, action);
|
||||
SendDefaultMenu_boss_vael(pPlayer, _Creature, action);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello_boss_vael(Player *player, Creature *_Creature)
|
||||
bool GossipHello_boss_vael(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(907,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(907,_Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ struct TRINITY_DLL_DECL boss_victor_nefariusAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
//We simply use this function to find players until we can use Map->GetPlayers()
|
||||
//We simply use this function to find players until we can use pMap->GetPlayers()
|
||||
|
||||
if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who))
|
||||
{
|
||||
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL boss_victor_nefariusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Only do this if we haven't spawned nef yet
|
||||
@@ -350,29 +350,29 @@ CreatureAI* GetAI_boss_victor_nefarius(Creature *_Creature)
|
||||
return new boss_victor_nefariusAI (_Creature);
|
||||
}
|
||||
|
||||
bool GossipHello_boss_victor_nefarius(Player *player, Creature *_Creature)
|
||||
bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(7134,_Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(7134,_Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_victor_nefarius(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(7198, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(7198, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->SEND_GOSSIP_MENU(7199, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->SEND_GOSSIP_MENU(7199, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
DoScriptText(SAY_GAMESBEGIN_1, _Creature);
|
||||
CAST_AI(boss_victor_nefariusAI, _Creature->AI())->BeginEvent(player);
|
||||
CAST_AI(boss_victor_nefariusAI, _Creature->AI())->BeginEvent(pPlayer);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -206,7 +206,7 @@ struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (IntangiblePresence_Timer <= diff)
|
||||
@@ -281,22 +281,22 @@ CreatureAI* GetAI_npc_daranelle(Creature *_Creature)
|
||||
## npc_overseer_nuaar
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_overseer_nuaar(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_overseer_nuaar(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (pPlayer->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(10532, _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(10532, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_overseer_nuaar(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(10533, _Creature->GetGUID());
|
||||
player->AreaExploredOrEventHappens(10682);
|
||||
pPlayer->SEND_GOSSIP_MENU(10533, _Creature->GetGUID());
|
||||
pPlayer->AreaExploredOrEventHappens(10682);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -305,27 +305,27 @@ bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32
|
||||
## npc_saikkal_the_elder
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_saikkal_the_elder(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_saikkal_the_elder(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (pPlayer->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(10794, _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(10794, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(10795, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(10795, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(10796, _Creature->GetGUID());
|
||||
pPlayer->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(10796, _Creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -335,11 +335,11 @@ bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uin
|
||||
## go_legion_obelisk
|
||||
######*/
|
||||
|
||||
bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
|
||||
bool GOHello_go_legion_obelisk(Player* pPlayer, GameObject* _GO)
|
||||
{
|
||||
if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE )
|
||||
if (pPlayer->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
switch( _GO->GetEntry() )
|
||||
switch(_GO->GetEntry())
|
||||
{
|
||||
case LEGION_OBELISK_ONE:
|
||||
obelisk_one = true;
|
||||
@@ -358,7 +358,7 @@ bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
|
||||
break;
|
||||
}
|
||||
|
||||
if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true )
|
||||
if (obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true)
|
||||
{
|
||||
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
||||
//reset global var
|
||||
|
||||
@@ -38,22 +38,22 @@ EndContentData */
|
||||
#define SPELL_TELEPORT_SINGLE_IN_GROUP 13142
|
||||
#define SPELL_TELEPORT_GROUP 27686
|
||||
|
||||
bool GossipHello_npc_deathly_usher(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_deathly_usher(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if(player->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(10757, 1))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if (pPlayer->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(10757, 1))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_deathly_usher(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_deathly_usher(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF)
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(player, SPELL_TELEPORT_SINGLE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(pPlayer, SPELL_TELEPORT_SINGLE, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -73,71 +73,71 @@ bool GossipSelect_npc_deathly_usher(Player *player, Creature *_Creature, uint32
|
||||
#define GOSSIP_ITEM_FALLEN4 "You can count on me, Hero"
|
||||
#define GOSSIP_ITEM_FALLEN5 "I shall"
|
||||
|
||||
bool GossipHello_npc_fallen_hero_of_horde(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
if (player->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && player->GetTeam() == HORDE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == HORDE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
if (player->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && player->GetTeam() == ALLIANCE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == ALLIANCE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_fallen_hero_of_horde(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
player->SEND_GOSSIP_MENU(1392, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
pPlayer->SEND_GOSSIP_MENU(1392, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
player->SEND_GOSSIP_MENU(1411, _Creature->GetGUID());
|
||||
if (player->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(2784);
|
||||
if (player->GetTeam() == ALLIANCE)
|
||||
pPlayer->SEND_GOSSIP_MENU(1411, _Creature->GetGUID());
|
||||
if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(2784);
|
||||
if (pPlayer->GetTeam() == ALLIANCE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(1411, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(1411, _Creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
player->SEND_GOSSIP_MENU(1451, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
|
||||
pPlayer->SEND_GOSSIP_MENU(1451, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+21:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
player->SEND_GOSSIP_MENU(1452, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
pPlayer->SEND_GOSSIP_MENU(1452, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
player->SEND_GOSSIP_MENU(1453, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
|
||||
pPlayer->SEND_GOSSIP_MENU(1453, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+23:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
player->SEND_GOSSIP_MENU(1454, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
|
||||
pPlayer->SEND_GOSSIP_MENU(1454, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+24:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
|
||||
player->SEND_GOSSIP_MENU(1455, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
|
||||
pPlayer->SEND_GOSSIP_MENU(1455, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+25:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
|
||||
player->SEND_GOSSIP_MENU(1456, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
|
||||
pPlayer->SEND_GOSSIP_MENU(1456, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+26:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(2801);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->AreaExploredOrEventHappens(2801);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -86,14 +86,14 @@ struct TRINITY_DLL_DECL boss_kruulAI : public ScriptedAI
|
||||
}
|
||||
Rand = 0;
|
||||
Summoned = DoSpawnCreature(19207, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
|
||||
if(Summoned)
|
||||
if (Summoned)
|
||||
(Summoned->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
|
||||
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL mob_webbed_creatureAI : public ScriptedAI
|
||||
break;
|
||||
}
|
||||
|
||||
if(spawnCreatureID)
|
||||
if (spawnCreatureID)
|
||||
m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
}
|
||||
};
|
||||
@@ -79,46 +79,46 @@ CreatureAI* GetAI_mob_webbed_creature(Creature *_Creature)
|
||||
|
||||
#define C_SUNHAWK_TRIGGER 17974
|
||||
|
||||
bool GossipHello_npc_captured_sunhawk_agent(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_captured_sunhawk_agent(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (player->HasAura(31609) && player->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE)
|
||||
if (pPlayer->HasAura(31609) && pPlayer->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(9136, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(9136, _Creature->GetGUID());
|
||||
}
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(9134, _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(9134, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_captured_sunhawk_agent(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(9137, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->SEND_GOSSIP_MENU(9137, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->SEND_GOSSIP_MENU(9138, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->SEND_GOSSIP_MENU(9138, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
player->SEND_GOSSIP_MENU(9139, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
pPlayer->SEND_GOSSIP_MENU(9139, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
player->SEND_GOSSIP_MENU(9140, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
pPlayer->SEND_GOSSIP_MENU(9140, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
player->SEND_GOSSIP_MENU(9141, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
|
||||
pPlayer->SEND_GOSSIP_MENU(9141, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->TalkedToCreature(C_SUNHAWK_TRIGGER, _Creature->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->TalkedToCreature(C_SUNHAWK_TRIGGER, _Creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -34,19 +34,19 @@ EndContentData */
|
||||
|
||||
#define GOSSIP_ITEM_TELEPORT "Teleport me to Amber Ledge, please."
|
||||
|
||||
bool GossipHello_npc_tiare(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_tiare(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP);
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP);
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_tiare(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_tiare(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_OPTION_GOSSIP)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,50135,true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,50135,true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -58,31 +58,31 @@ bool GossipSelect_npc_tiare(Player *player, Creature *_Creature, uint32 sender,
|
||||
#define GOSSIP_ITEM_FREE_FLIGHT "I'd like passage to the Transitus Shield."
|
||||
#define GOSSIP_ITEM_FLIGHT "May I use a drake to fly elsewhere?"
|
||||
|
||||
bool GossipHello_npc_surristrasz(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_surristrasz(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu(_Creature->GetGUID());
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if (_Creature->isTaxi())
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FREE_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FREE_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR);
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_surristrasz(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_surristrasz(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_OPTION_GOSSIP)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,46064,true); //TaxiPath 795 (amber to coldarra)
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->CastSpell(pPlayer,46064,true); //TaxiPath 795 (amber to coldarra)
|
||||
}
|
||||
if (action == GOSSIP_OPTION_TAXIVENDOR)
|
||||
{
|
||||
player->GetSession()->SendTaxiMenu(_Creature);
|
||||
pPlayer->GetSession()->SendTaxiMenu(_Creature);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -209,14 +209,14 @@ struct TRINITY_DLL_DECL npc_khunok_the_behemothAI : public ScriptedAI
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
if(who->GetTypeId() != TYPEID_UNIT)
|
||||
if (who->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
if(who->GetEntry() == 25861 && me->IsWithinDistInMap(who, 10.0f))
|
||||
if (who->GetEntry() == 25861 && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if(Unit *owner = who->GetOwner())
|
||||
if (Unit *owner = who->GetOwner())
|
||||
{
|
||||
if(owner->GetTypeId() == TYPEID_PLAYER)
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoCast(owner, 46231, true);
|
||||
CAST_CRE(who)->ForcedDespawn();
|
||||
|
||||
@@ -52,9 +52,9 @@ struct TRINITY_DLL_DECL npc_ragged_johnAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if( who->HasAura(16468) )
|
||||
if (who->HasAura(16468))
|
||||
{
|
||||
if( who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 15) && who->isInAccessiblePlaceFor(m_creature) )
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 15) && who->isInAccessiblePlaceFor(m_creature))
|
||||
{
|
||||
DoCast(who,16472);
|
||||
CAST_PLR(who)->AreaExploredOrEventHappens(4866);
|
||||
@@ -72,69 +72,69 @@ CreatureAI* GetAI_npc_ragged_john(Creature *_Creature)
|
||||
return new npc_ragged_johnAI (_Creature);
|
||||
}
|
||||
|
||||
bool GossipHello_npc_ragged_john(Player *player, Creature *_Creature)
|
||||
bool GossipHello_npc_ragged_john(Player* pPlayer, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
pPlayer->PrepareQuestMenu(_Creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if (pPlayer->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(2713, _Creature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(2713, _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_ragged_john(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(2714, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2714, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(2715, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(2715, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(2716, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(2716, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
player->SEND_GOSSIP_MENU(2717, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
pPlayer->SEND_GOSSIP_MENU(2717, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
player->SEND_GOSSIP_MENU(2718, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
pPlayer->SEND_GOSSIP_MENU(2718, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
player->SEND_GOSSIP_MENU(2719, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
pPlayer->SEND_GOSSIP_MENU(2719, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
player->SEND_GOSSIP_MENU(2720, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
pPlayer->SEND_GOSSIP_MENU(2720, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+7:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
player->SEND_GOSSIP_MENU(2721, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
|
||||
pPlayer->SEND_GOSSIP_MENU(2721, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+8:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
player->SEND_GOSSIP_MENU(2722, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
pPlayer->SEND_GOSSIP_MENU(2722, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+9:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
player->SEND_GOSSIP_MENU(2723, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
|
||||
pPlayer->SEND_GOSSIP_MENU(2723, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+10:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
player->SEND_GOSSIP_MENU(2725, _Creature->GetGUID());
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
pPlayer->SEND_GOSSIP_MENU(2725, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(4224);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pPlayer->AreaExploredOrEventHappens(4224);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ struct TRINITY_DLL_DECL boss_epochAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user