Merge pull request #5733 from GyxTom/master
Core/Script: Clean-ups in scripts
This commit is contained in:
@@ -382,7 +382,7 @@ public:
|
||||
|
||||
// Let set addon state only for lesser (strong) security level
|
||||
// or to self account
|
||||
if (handler->GetSession() && handler->GetSession()->GetAccountId () != accountId &&
|
||||
if (handler->GetSession() && handler->GetSession()->GetAccountId() != accountId &&
|
||||
handler->HasLowerSecurityAccount(NULL, accountId, true))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -360,7 +360,9 @@ public:
|
||||
//Edit Player Spell
|
||||
static bool HandleModifySpellCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args) return false;
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* pspellflatid = strtok((char*)args, " ");
|
||||
if (!pspellflatid)
|
||||
return false;
|
||||
@@ -1141,10 +1143,10 @@ public:
|
||||
|
||||
static bool HandleModifyRepCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args) return false;
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player* target = handler->getSelectedPlayer();
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
|
||||
@@ -108,6 +108,7 @@ public:
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* charID = handler->extractKeyFromLink((char*)args, "Hcreature_entry");
|
||||
if (!charID)
|
||||
return false;
|
||||
@@ -135,7 +136,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature* creature = new Creature;
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o))
|
||||
{
|
||||
delete creature;
|
||||
@@ -1036,7 +1037,7 @@ public:
|
||||
}
|
||||
|
||||
if (/*creature->GetMotionMaster()->empty() ||*/
|
||||
creature->GetMotionMaster()->GetCurrentMovementGeneratorType () != FOLLOW_MOTION_TYPE)
|
||||
creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName());
|
||||
handler->SetSentErrorMessage(true);
|
||||
@@ -1131,17 +1132,17 @@ public:
|
||||
//npc tame handling
|
||||
static bool HandleNpcTameCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Creature* creatureTarget = handler->getSelectedCreature ();
|
||||
if (!creatureTarget || creatureTarget->isPet ())
|
||||
Creature* creatureTarget = handler->getSelectedCreature();
|
||||
if (!creatureTarget || creatureTarget->isPet())
|
||||
{
|
||||
handler->PSendSysMessage (LANG_SELECT_CREATURE);
|
||||
handler->SetSentErrorMessage (true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* player = handler->GetSession()->GetPlayer ();
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
if (player->GetPetGUID ())
|
||||
if (player->GetPetGUID())
|
||||
{
|
||||
handler->SendSysMessage (LANG_YOU_ALREADY_HAVE_PET);
|
||||
handler->SetSentErrorMessage (true);
|
||||
@@ -1168,8 +1169,8 @@ public:
|
||||
|
||||
// place pet before player
|
||||
float x, y, z;
|
||||
player->GetClosePoint (x, y, z, creatureTarget->GetObjectSize (), CONTACT_DISTANCE);
|
||||
pet->Relocate (x, y, z, M_PI-player->GetOrientation ());
|
||||
player->GetClosePoint (x, y, z, creatureTarget->GetObjectSize(), CONTACT_DISTANCE);
|
||||
pet->Relocate(x, y, z, M_PI-player->GetOrientation());
|
||||
|
||||
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
|
||||
pet->SetReactState(REACT_DEFENSIVE);
|
||||
|
||||
@@ -277,7 +277,8 @@ public:
|
||||
std::string show = show_str;
|
||||
|
||||
// Check
|
||||
if ((show != "add") && (show != "mod") && (show != "del") && (show != "listid")) return false;
|
||||
if ((show != "add") && (show != "mod") && (show != "del") && (show != "listid"))
|
||||
return false;
|
||||
|
||||
char* arg_id = strtok(NULL, " ");
|
||||
uint32 id = 0;
|
||||
|
||||
@@ -1089,7 +1089,7 @@ public:
|
||||
|
||||
struct npc_tobias_seecherAI : public npc_escortAI
|
||||
{
|
||||
npc_tobias_seecherAI(Creature* c) :npc_escortAI(c) {}
|
||||
npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void EnterCombat(Unit* who) {}
|
||||
void Reset() {}
|
||||
|
||||
@@ -416,7 +416,7 @@ public:
|
||||
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Shadow Priest
|
||||
boss_baroness_dorothea_millstipeAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
boss_baroness_dorothea_millstipeAI(Creature* creature) : boss_moroes_guestAI(creature) {}
|
||||
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 MindFlay_Timer;
|
||||
@@ -480,7 +480,7 @@ public:
|
||||
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Retr Pally
|
||||
boss_baron_rafe_dreugerAI(Creature* c) : boss_moroes_guestAI(c){}
|
||||
boss_baron_rafe_dreugerAI(Creature* creature) : boss_moroes_guestAI(creature){}
|
||||
|
||||
uint32 HammerOfJustice_Timer;
|
||||
uint32 SealOfCommand_Timer;
|
||||
@@ -538,7 +538,7 @@ public:
|
||||
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Holy Priest
|
||||
boss_lady_catriona_von_indiAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
boss_lady_catriona_von_indiAI(Creature* creature) : boss_moroes_guestAI(creature) {}
|
||||
|
||||
uint32 DispelMagic_Timer;
|
||||
uint32 GreaterHeal_Timer;
|
||||
@@ -609,7 +609,7 @@ public:
|
||||
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Holy Pally
|
||||
boss_lady_keira_berrybuckAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
boss_lady_keira_berrybuckAI(Creature* creature) : boss_moroes_guestAI(creature) {}
|
||||
|
||||
uint32 Cleanse_Timer;
|
||||
uint32 GreaterBless_Timer;
|
||||
@@ -684,7 +684,7 @@ public:
|
||||
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Arms Warr
|
||||
boss_lord_robin_darisAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
boss_lord_robin_darisAI(Creature* creature) : boss_moroes_guestAI(creature) {}
|
||||
|
||||
uint32 Hamstring_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
@@ -741,7 +741,7 @@ public:
|
||||
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Arms Warr
|
||||
boss_lord_crispin_ferenceAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
boss_lord_crispin_ferenceAI(Creature* creature) : boss_moroes_guestAI(creature) {}
|
||||
|
||||
uint32 Disarm_Timer;
|
||||
uint32 HeroicStrike_Timer;
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
|
||||
struct mob_fiendish_portalAI : public PassiveAI
|
||||
{
|
||||
mob_fiendish_portalAI(Creature* c) : PassiveAI(c), summons(me){}
|
||||
mob_fiendish_portalAI(Creature* creature) : PassiveAI(creature), summons(me){}
|
||||
|
||||
SummonList summons;
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ public:
|
||||
struct boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Rogue
|
||||
boss_kagani_nightstrikeAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_kagani_nightstrikeAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
uint32 Gouge_Timer;
|
||||
uint32 Kick_Timer;
|
||||
@@ -600,7 +600,7 @@ public:
|
||||
struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Warlock
|
||||
boss_ellris_duskhallowAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_ellris_duskhallowAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
uint32 Immolate_Timer;
|
||||
uint32 Shadow_Bolt_Timer;
|
||||
@@ -692,7 +692,7 @@ public:
|
||||
struct boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Monk
|
||||
boss_eramas_brightblazeAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_eramas_brightblazeAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
uint32 Knockdown_Timer;
|
||||
uint32 Snap_Kick_Timer;
|
||||
@@ -754,7 +754,7 @@ public:
|
||||
struct boss_yazzaiAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Mage
|
||||
boss_yazzaiAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_yazzaiAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
bool HasIceBlocked;
|
||||
|
||||
@@ -885,7 +885,7 @@ public:
|
||||
struct boss_warlord_salarisAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Warrior
|
||||
boss_warlord_salarisAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_warlord_salarisAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
uint32 Intercept_Stun_Timer;
|
||||
uint32 Disarm_Timer;
|
||||
@@ -1006,7 +1006,10 @@ public:
|
||||
struct boss_garaxxasAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Hunter
|
||||
boss_garaxxasAI(Creature* c) : boss_priestess_lackey_commonAI(c) { m_uiPetGUID = 0; }
|
||||
boss_garaxxasAI(Creature* creature) : boss_priestess_lackey_commonAI(creature)
|
||||
{
|
||||
m_uiPetGUID = 0;
|
||||
}
|
||||
|
||||
uint64 m_uiPetGUID;
|
||||
|
||||
@@ -1126,7 +1129,7 @@ public:
|
||||
struct boss_apokoAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Shaman
|
||||
boss_apokoAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_apokoAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
uint32 Totem_Timer;
|
||||
uint8 Totem_Amount;
|
||||
@@ -1225,7 +1228,7 @@ public:
|
||||
struct boss_zelfanAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Engineer
|
||||
boss_zelfanAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_zelfanAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
|
||||
|
||||
uint32 Goblin_Dragon_Gun_Timer;
|
||||
uint32 Rocket_Launch_Timer;
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
|
||||
struct npc_unworthy_initiate_anchorAI : public PassiveAI
|
||||
{
|
||||
npc_unworthy_initiate_anchorAI(Creature* c) : PassiveAI(c), prisonerGUID(0) {}
|
||||
npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature), prisonerGUID(0) {}
|
||||
|
||||
uint64 prisonerGUID;
|
||||
|
||||
@@ -303,9 +303,11 @@ public:
|
||||
prisonerGUID = guid;
|
||||
}
|
||||
|
||||
uint64 GetGUID(int32 /*id*/) { return prisonerGUID; }
|
||||
uint64 GetGUID(int32 /*id*/)
|
||||
{
|
||||
return prisonerGUID;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class go_acherus_soul_prison : public GameObjectScript
|
||||
@@ -702,7 +704,9 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
Creature* deathcharger = me->FindNearestCreature(28782, 30);
|
||||
if (!deathcharger) return;
|
||||
if (!deathcharger)
|
||||
return;
|
||||
|
||||
deathcharger->RestoreFaction();
|
||||
deathcharger->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
deathcharger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -713,7 +717,9 @@ public:
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Creature* deathcharger = me->FindNearestCreature(28782, 30);
|
||||
if (!deathcharger) return;
|
||||
if (!deathcharger)
|
||||
return;
|
||||
|
||||
if (killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->IsVehicle())
|
||||
{
|
||||
deathcharger->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
@@ -868,14 +874,14 @@ class npc_scarlet_miner_cart : public CreatureScript
|
||||
public:
|
||||
npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* _Creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_scarlet_miner_cartAI(_Creature);
|
||||
return new npc_scarlet_miner_cartAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_miner_cartAI : public PassiveAI
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature* c) : PassiveAI(c), minerGUID(0)
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature), minerGUID(0)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse.
|
||||
@@ -924,9 +930,9 @@ class npc_scarlet_miner : public CreatureScript
|
||||
public:
|
||||
npc_scarlet_miner() : CreatureScript("npc_scarlet_miner") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* _Creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_scarlet_minerAI(_Creature);
|
||||
return new npc_scarlet_minerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_minerAI : public npc_escortAI
|
||||
@@ -1057,7 +1063,7 @@ class go_inconspicuous_mine_car : public GameObjectScript
|
||||
public:
|
||||
go_inconspicuous_mine_car() : GameObjectScript("go_inconspicuous_mine_car") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
{
|
||||
if (player->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
struct npc_valkyr_battle_maidenAI : public PassiveAI
|
||||
{
|
||||
npc_valkyr_battle_maidenAI(Creature* c) : PassiveAI(c) {}
|
||||
npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) {}
|
||||
|
||||
uint32 FlyBackTimer;
|
||||
float x, y, z;
|
||||
|
||||
@@ -296,8 +296,11 @@ public:
|
||||
|
||||
if (spell->Id == SPELL_FLYING_HEAD)
|
||||
{
|
||||
if (Phase < 3) ++Phase;
|
||||
else Phase = 3;
|
||||
if (Phase < 3)
|
||||
++Phase;
|
||||
else
|
||||
Phase = 3;
|
||||
|
||||
withbody = false;
|
||||
if (!bodyGUID)
|
||||
bodyGUID = caster->GetGUID();
|
||||
@@ -319,7 +322,8 @@ public:
|
||||
if (wait <= diff)
|
||||
{
|
||||
wait = 1000;
|
||||
if (!me->getVictim()) return;
|
||||
if (!me->getVictim())
|
||||
return;
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveFleeing(me->getVictim());
|
||||
}
|
||||
@@ -485,12 +489,18 @@ public:
|
||||
instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
void AttackStart(Unit* who) {ScriptedAI::AttackStart(who);}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (withhead && Phase != 0)
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* player)
|
||||
{
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -595,6 +605,7 @@ public:
|
||||
|
||||
if (!headGUID)
|
||||
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID();
|
||||
|
||||
Unit* Head = Unit::GetUnit((*me), headGUID);
|
||||
if (Head && Head->isAlive())
|
||||
{
|
||||
@@ -803,14 +814,22 @@ public:
|
||||
|
||||
void Despawn()
|
||||
{
|
||||
if (!debuffGUID) return;
|
||||
if (!debuffGUID)
|
||||
return;
|
||||
|
||||
Unit* debuff = Unit::GetUnit((*me), debuffGUID);
|
||||
if (debuff)
|
||||
{
|
||||
debuff->SetVisible(false);
|
||||
debuffGUID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) { if (!sprouted) Despawn(); }
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (!sprouted)
|
||||
Despawn();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
|
||||
@@ -175,10 +175,7 @@ public:
|
||||
if (uiDarkOffering <= uiDiff)
|
||||
{
|
||||
if (Creature* pFriend = me->FindNearestCreature(me->GetEntry(), 25.0f, true))
|
||||
{
|
||||
if (pFriend)
|
||||
DoCast(pFriend, SPELL_DARK_OFFERING);
|
||||
}
|
||||
DoCast(pFriend, SPELL_DARK_OFFERING);
|
||||
else
|
||||
DoCast(me, SPELL_DARK_OFFERING);
|
||||
uiDarkOffering = urand(4400, 12500);
|
||||
|
||||
@@ -676,7 +676,9 @@ public:
|
||||
void TeleportAllPlayersBack()
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon()) return;
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ class boss_archaedas : public CreatureScript
|
||||
// wake a wall minion
|
||||
if (uiWallMinionTimer <= uiDiff)
|
||||
{
|
||||
instance->SetData (DATA_MINIONS, IN_PROGRESS);
|
||||
instance->SetData(DATA_MINIONS, IN_PROGRESS);
|
||||
|
||||
uiWallMinionTimer = 10000;
|
||||
} else uiWallMinionTimer -= uiDiff;
|
||||
@@ -394,7 +394,7 @@ class go_altar_of_archaedas : public GameObjectScript
|
||||
{
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
{
|
||||
InstanceScript* instance = player->GetInstanceScript();
|
||||
if (!instance)
|
||||
|
||||
@@ -184,8 +184,8 @@ class instance_uldaman : public InstanceMapScript
|
||||
return; // only want the first one we find
|
||||
}
|
||||
// if we get this far than all four are dead so open the door
|
||||
SetData (DATA_ALTAR_DOORS, DONE);
|
||||
SetDoor (uiArchaedasTempleDoor, true); //open next the door too
|
||||
SetData(DATA_ALTAR_DOORS, DONE);
|
||||
SetDoor(uiArchaedasTempleDoor, true); //open next the door too
|
||||
}
|
||||
|
||||
void ActivateWallMinions()
|
||||
@@ -320,7 +320,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
uiIronayaSealDoorTimer -= diff;
|
||||
}
|
||||
|
||||
void SetData (uint32 type, uint32 data)
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64 (uint32 type, uint64 data)
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
// Archaedas
|
||||
if (type == 0)
|
||||
@@ -425,7 +425,8 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch (creature->GetEntry()) {
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case 4857: // Stone Keeper
|
||||
SetFrozenState (creature);
|
||||
vStoneKeeper.push_back(creature->GetGUID());
|
||||
@@ -458,10 +459,10 @@ class instance_uldaman : public InstanceMapScript
|
||||
uiArchaedasGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
} // end switch
|
||||
} // end OnCreatureCreate
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64 (uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier)
|
||||
{
|
||||
if (identifier == 0) return uiWhoWokeuiArchaedasGUID;
|
||||
if (identifier == 1) return vVaultWalker[0]; // VaultWalker1
|
||||
|
||||
@@ -488,7 +488,7 @@ class boss_thurg : public CreatureScript
|
||||
struct boss_thurgAI : public boss_hexlord_addAI
|
||||
{
|
||||
|
||||
boss_thurgAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_thurgAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 bloodlust_timer;
|
||||
uint32 cleave_timer;
|
||||
@@ -548,7 +548,7 @@ class boss_alyson_antille : public CreatureScript
|
||||
struct boss_alyson_antilleAI : public boss_hexlord_addAI
|
||||
{
|
||||
//Holy Priest
|
||||
boss_alyson_antilleAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_alyson_antilleAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 flashheal_timer;
|
||||
uint32 dispelmagic_timer;
|
||||
@@ -637,7 +637,7 @@ class boss_alyson_antille : public CreatureScript
|
||||
|
||||
struct boss_gazakrothAI : public boss_hexlord_addAI
|
||||
{
|
||||
boss_gazakrothAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_gazakrothAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 firebolt_timer;
|
||||
|
||||
@@ -691,7 +691,7 @@ class boss_lord_raadan : public CreatureScript
|
||||
|
||||
struct boss_lord_raadanAI : public boss_hexlord_addAI
|
||||
{
|
||||
boss_lord_raadanAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_lord_raadanAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 flamebreath_timer;
|
||||
uint32 thunderclap_timer;
|
||||
@@ -744,7 +744,7 @@ class boss_darkheart : public CreatureScript
|
||||
|
||||
struct boss_darkheartAI : public boss_hexlord_addAI
|
||||
{
|
||||
boss_darkheartAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_darkheartAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 psychicwail_timer;
|
||||
|
||||
@@ -787,7 +787,7 @@ class boss_slither : public CreatureScript
|
||||
|
||||
struct boss_slitherAI : public boss_hexlord_addAI
|
||||
{
|
||||
boss_slitherAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_slitherAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 venomspit_timer;
|
||||
|
||||
@@ -847,7 +847,7 @@ class boss_fenstalker : public CreatureScript
|
||||
|
||||
struct boss_fenstalkerAI : public boss_hexlord_addAI
|
||||
{
|
||||
boss_fenstalkerAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_fenstalkerAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 volatileinf_timer;
|
||||
|
||||
@@ -894,7 +894,7 @@ class boss_koragg : public CreatureScript
|
||||
|
||||
struct boss_koraggAI : public boss_hexlord_addAI
|
||||
{
|
||||
boss_koraggAI(Creature* c) : boss_hexlord_addAI(c) {}
|
||||
boss_koraggAI(Creature* creature) : boss_hexlord_addAI(creature) {}
|
||||
|
||||
uint32 coldstare_timer;
|
||||
uint32 mightyblow_timer;
|
||||
|
||||
@@ -221,7 +221,8 @@ class boss_janalai : public CreatureScript
|
||||
dy = float(irand(-area_dy/2, area_dy/2));
|
||||
|
||||
Creature* bomb = DoSpawnCreature(MOB_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if (bomb) FireBombGUIDs[i] = bomb->GetGUID();
|
||||
if (bomb)
|
||||
FireBombGUIDs[i] = bomb->GetGUID();
|
||||
}
|
||||
BombCount = 0;
|
||||
}
|
||||
@@ -374,7 +375,9 @@ class boss_janalai : public CreatureScript
|
||||
|
||||
//Teleport every Player into the middle
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon()) return;
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->getSource())
|
||||
|
||||
@@ -109,7 +109,8 @@ class instance_zulaman : public InstanceMapScript
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -188,7 +189,9 @@ class instance_zulaman : public InstanceMapScript
|
||||
|
||||
void Load(const char* load)
|
||||
{
|
||||
if (!load) return;
|
||||
if (!load)
|
||||
return;
|
||||
|
||||
std::istringstream ss(load);
|
||||
//sLog->outError("TSCR: Zul'aman loaded, %s.", ss.str().c_str());
|
||||
char dataHead; // S
|
||||
|
||||
@@ -120,24 +120,29 @@ static uint32 ChestEntry[] = {186648, 187021, 186672, 186667};
|
||||
class npc_zulaman_hostage : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_zulaman_hostage()
|
||||
: CreatureScript("npc_zulaman_hostage")
|
||||
{
|
||||
}
|
||||
npc_zulaman_hostage() : CreatureScript("npc_zulaman_hostage") { }
|
||||
|
||||
struct npc_zulaman_hostageAI : public ScriptedAI
|
||||
{
|
||||
npc_zulaman_hostageAI(Creature* creature) : ScriptedAI(creature) {IsLoot = false;}
|
||||
npc_zulaman_hostageAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
IsLoot = false;
|
||||
}
|
||||
|
||||
bool IsLoot;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(*me, PlayerGUID);
|
||||
if (player) player->SendLoot(me->GetGUID(), LOOT_CORPSE);
|
||||
if (player)
|
||||
player->SendLoot(me->GetGUID(), LOOT_CORPSE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
if (IsLoot)
|
||||
@@ -160,11 +165,13 @@ class npc_zulaman_hostage : public CreatureScript
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
|
||||
if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
|
||||
@@ -61,10 +61,10 @@ class boss_arlokk : public CreatureScript
|
||||
{
|
||||
boss_arlokkAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 m_uiShadowWordPain_Timer;
|
||||
uint32 m_uiGouge_Timer;
|
||||
@@ -110,8 +110,8 @@ class boss_arlokk : public CreatureScript
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ARLOKK, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARLOKK, NOT_STARTED);
|
||||
|
||||
//we should be summoned, so despawn
|
||||
me->DespawnOrUnsummon();
|
||||
@@ -124,8 +124,8 @@ class boss_arlokk : public CreatureScript
|
||||
me->SetDisplayId(MODEL_ID_NORMAL);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ARLOKK, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARLOKK, DONE);
|
||||
}
|
||||
|
||||
void DoSummonPhanters()
|
||||
@@ -271,12 +271,12 @@ class go_gong_of_bethekk : public GameObjectScript
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
if (InstanceScript* m_instance = go->GetInstanceScript())
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
{
|
||||
if (m_instance->GetData(DATA_ARLOKK) == DONE || m_instance->GetData(DATA_ARLOKK) == IN_PROGRESS)
|
||||
if (instance->GetData(DATA_ARLOKK) == DONE || instance->GetData(DATA_ARLOKK) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
m_instance->SetData(DATA_ARLOKK, IN_PROGRESS);
|
||||
instance->SetData(DATA_ARLOKK, IN_PROGRESS);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ class boss_hakkar : public CreatureScript
|
||||
{
|
||||
boss_hakkarAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 BloodSiphon_Timer;
|
||||
uint32 CorruptedBlood_Timer;
|
||||
@@ -156,9 +156,9 @@ class boss_hakkar : public CreatureScript
|
||||
//Checking if Jeklik is dead. If not we cast her Aspect
|
||||
if (CheckJeklik_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_JEKLIK) != DONE)
|
||||
if (instance->GetData(DATA_JEKLIK) != DONE)
|
||||
{
|
||||
if (AspectOfJeklik_Timer <= diff)
|
||||
{
|
||||
@@ -173,9 +173,9 @@ class boss_hakkar : public CreatureScript
|
||||
//Checking if Venoxis is dead. If not we cast his Aspect
|
||||
if (CheckVenoxis_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_VENOXIS) != DONE)
|
||||
if (instance->GetData(DATA_VENOXIS) != DONE)
|
||||
{
|
||||
if (AspectOfVenoxis_Timer <= diff)
|
||||
{
|
||||
@@ -190,9 +190,9 @@ class boss_hakkar : public CreatureScript
|
||||
//Checking if Marli is dead. If not we cast her Aspect
|
||||
if (CheckMarli_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_MARLI) != DONE)
|
||||
if (instance->GetData(DATA_MARLI) != DONE)
|
||||
{
|
||||
if (AspectOfMarli_Timer <= diff)
|
||||
{
|
||||
@@ -208,9 +208,9 @@ class boss_hakkar : public CreatureScript
|
||||
//Checking if Thekal is dead. If not we cast his Aspect
|
||||
if (CheckThekal_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_THEKAL) != DONE)
|
||||
if (instance->GetData(DATA_THEKAL) != DONE)
|
||||
{
|
||||
if (AspectOfThekal_Timer <= diff)
|
||||
{
|
||||
@@ -225,9 +225,9 @@ class boss_hakkar : public CreatureScript
|
||||
//Checking if Arlokk is dead. If yes we cast her Aspect
|
||||
if (CheckArlokk_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_ARLOKK) != DONE)
|
||||
if (instance->GetData(DATA_ARLOKK) != DONE)
|
||||
{
|
||||
if (AspectOfArlokk_Timer <= diff)
|
||||
{
|
||||
|
||||
@@ -56,10 +56,10 @@ class boss_jeklik : public CreatureScript
|
||||
{
|
||||
boss_jeklikAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Charge_Timer;
|
||||
uint32 SonicBurst_Timer;
|
||||
@@ -98,8 +98,8 @@ class boss_jeklik : public CreatureScript
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_JEKLIK, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_JEKLIK, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -238,10 +238,10 @@ class mob_batrider : public CreatureScript
|
||||
{
|
||||
mob_batriderAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Bomb_Timer;
|
||||
uint32 Check_Timer;
|
||||
@@ -274,9 +274,9 @@ class mob_batrider : public CreatureScript
|
||||
//Check_Timer
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_JEKLIK) == DONE)
|
||||
if (instance->GetData(DATA_JEKLIK) == DONE)
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
|
||||
@@ -57,7 +57,7 @@ class boss_mandokir : public CreatureScript
|
||||
{
|
||||
boss_mandokirAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 KillCount;
|
||||
@@ -72,7 +72,7 @@ class boss_mandokir : public CreatureScript
|
||||
float targetY;
|
||||
float targetZ;
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
bool endWatch;
|
||||
bool someWatched;
|
||||
@@ -116,9 +116,9 @@ class boss_mandokir : public CreatureScript
|
||||
{
|
||||
DoScriptText(SAY_DING_KILL, me);
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
uint64 JindoGUID = m_instance->GetData64(DATA_JINDO);
|
||||
uint64 JindoGUID = instance->GetData64(DATA_JINDO);
|
||||
if (JindoGUID)
|
||||
{
|
||||
if (Unit* jTemp = Unit::GetUnit(*me, JindoGUID))
|
||||
@@ -256,9 +256,9 @@ class boss_mandokir : public CreatureScript
|
||||
//Checking if Ohgan is dead. If yes Mandokir will enrage.
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_OHGAN) == DONE)
|
||||
if (instance->GetData(DATA_OHGAN) == DONE)
|
||||
{
|
||||
if (!RaptorDead)
|
||||
{
|
||||
@@ -296,11 +296,11 @@ class mob_ohgan : public CreatureScript
|
||||
{
|
||||
mob_ohganAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 SunderArmor_Timer;
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -311,8 +311,8 @@ class mob_ohgan : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_OHGAN, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_OHGAN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
|
||||
@@ -53,10 +53,10 @@ class boss_marli : public CreatureScript
|
||||
{
|
||||
boss_marliAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 SpawnStartSpiders_Timer;
|
||||
uint32 PoisonVolley_Timer;
|
||||
@@ -91,8 +91,8 @@ class boss_marli : public CreatureScript
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_MARLI, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MARLI, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -68,7 +68,7 @@ class boss_thekal : public CreatureScript
|
||||
{
|
||||
boss_thekalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 MortalCleave_Timer;
|
||||
@@ -81,7 +81,7 @@ class boss_thekal : public CreatureScript
|
||||
uint32 Check_Timer;
|
||||
uint32 Resurrect_Timer;
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
bool Enraged;
|
||||
bool PhaseTwo;
|
||||
bool WasDead;
|
||||
@@ -111,14 +111,14 @@ class boss_thekal : public CreatureScript
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_THEKAL, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_THEKAL, DONE);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_THEKAL, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_THEKAL, NOT_STARTED);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -129,26 +129,26 @@ class boss_thekal : public CreatureScript
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!WasDead && Check_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_LORKHAN) == SPECIAL)
|
||||
if (instance->GetData(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit((*me), m_instance->GetData64(DATA_LORKHAN)))
|
||||
if (Unit* pLorKhan = Unit::GetUnit((*me), instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->SetFullHealth();
|
||||
|
||||
m_instance->SetData(DATA_LORKHAN, DONE);
|
||||
instance->SetData(DATA_LORKHAN, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_instance->GetData(DATA_ZATH) == SPECIAL)
|
||||
if (instance->GetData(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
Unit* pZath = Unit::GetUnit((*me), m_instance->GetData64(DATA_ZATH));
|
||||
Unit* pZath = Unit::GetUnit((*me), instance->GetData64(DATA_ZATH));
|
||||
if (pZath)
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
@@ -156,7 +156,7 @@ class boss_thekal : public CreatureScript
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->SetFullHealth();
|
||||
|
||||
m_instance->SetData(DATA_ZATH, DONE);
|
||||
instance->SetData(DATA_ZATH, DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,8 +185,8 @@ class boss_thekal : public CreatureScript
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
me->AttackStop();
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_THEKAL, SPECIAL);
|
||||
if (instance)
|
||||
instance->SetData(DATA_THEKAL, SPECIAL);
|
||||
|
||||
WasDead=true;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
{
|
||||
mob_zealot_lorkhanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 Shield_Timer;
|
||||
@@ -290,7 +290,7 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
|
||||
bool FakeDeath;
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -302,8 +302,8 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
|
||||
FakeDeath = false;
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_LORKHAN, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LORKHAN, NOT_STARTED);
|
||||
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -335,10 +335,10 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
//Casting Greaterheal to Thekal or Zath if they are in meele range.
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
Unit* pThekal = Unit::GetUnit((*me), m_instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = Unit::GetUnit((*me), m_instance->GetData64(DATA_ZATH));
|
||||
Unit* pThekal = Unit::GetUnit((*me), instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = Unit::GetUnit((*me), instance->GetData64(DATA_ZATH));
|
||||
|
||||
if (!pThekal || !pZath)
|
||||
return;
|
||||
@@ -369,12 +369,12 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!FakeDeath && Check_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_THEKAL) == SPECIAL)
|
||||
if (instance->GetData(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit((*me), m_instance->GetData64(DATA_THEKAL)))
|
||||
if (Unit* pThekal = Unit::GetUnit((*me), instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -383,10 +383,10 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
if (m_instance->GetData(DATA_ZATH) == SPECIAL)
|
||||
if (instance->GetData(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit((*me), m_instance->GetData64(DATA_ZATH)))
|
||||
if (Unit* pZath = Unit::GetUnit((*me), instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -409,8 +409,8 @@ class mob_zealot_lorkhan : public CreatureScript
|
||||
me->setFaction(35);
|
||||
me->AttackStop();
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_LORKHAN, SPECIAL);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LORKHAN, SPECIAL);
|
||||
|
||||
FakeDeath = true;
|
||||
}
|
||||
@@ -439,7 +439,7 @@ class mob_zealot_zath : public CreatureScript
|
||||
{
|
||||
mob_zealot_zathAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 SweepingStrikes_Timer;
|
||||
@@ -451,7 +451,7 @@ class mob_zealot_zath : public CreatureScript
|
||||
|
||||
bool FakeDeath;
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -464,8 +464,8 @@ class mob_zealot_zath : public CreatureScript
|
||||
|
||||
FakeDeath = false;
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ZATH, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZATH, NOT_STARTED);
|
||||
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -522,12 +522,12 @@ class mob_zealot_zath : public CreatureScript
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!FakeDeath && Check_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(DATA_LORKHAN) == SPECIAL)
|
||||
if (instance->GetData(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit((*me), m_instance->GetData64(DATA_LORKHAN)))
|
||||
if (Unit* pLorKhan = Unit::GetUnit((*me), instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -536,10 +536,10 @@ class mob_zealot_zath : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
if (m_instance->GetData(DATA_THEKAL) == SPECIAL)
|
||||
if (instance->GetData(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit((*me), m_instance->GetData64(DATA_THEKAL)))
|
||||
if (Unit* pThekal = Unit::GetUnit((*me), instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -562,8 +562,8 @@ class mob_zealot_zath : public CreatureScript
|
||||
me->setFaction(35);
|
||||
me->AttackStop();
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ZATH, SPECIAL);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZATH, SPECIAL);
|
||||
|
||||
FakeDeath = true;
|
||||
}
|
||||
|
||||
@@ -417,10 +417,10 @@ class go_second_trial : public GameObjectScript
|
||||
public:
|
||||
go_second_trial() : GameObjectScript("go_second_trial") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
// find spawn :: master_kelerun_bloodmourn
|
||||
if (Creature* creature = pGO->FindNearestCreature(MASTER_KELERUN_BLOODMOURN, 30.0f))
|
||||
if (Creature* creature = go->FindNearestCreature(MASTER_KELERUN_BLOODMOURN, 30.0f))
|
||||
CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->StartEvent();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
DoScriptText(SAY_END2, me, player);
|
||||
Unit* CaptainHelios = me->FindNearestCreature(NPC_CAPTAIN_HELIOS, 50);
|
||||
if (CaptainHelios)
|
||||
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
|
||||
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
uint32 SwarmTimer;
|
||||
@@ -76,7 +75,6 @@ public:
|
||||
uint32 AuraTimer;
|
||||
uint32 InfernoTimer;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -119,7 +117,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
uint32 RainTimer;
|
||||
@@ -70,7 +69,6 @@ public:
|
||||
bool enraged;
|
||||
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -115,7 +113,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
|
||||
@@ -56,7 +56,6 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
uint32 CleaveTimer;
|
||||
@@ -64,7 +63,6 @@ public:
|
||||
uint32 MarkTimer;
|
||||
uint32 MarkTimerBase;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -107,7 +105,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
|
||||
-3
@@ -62,7 +62,6 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
uint32 FrostArmorTimer;
|
||||
@@ -70,7 +69,6 @@ public:
|
||||
uint32 NovaTimer;
|
||||
uint32 IceboltTimer;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -109,7 +107,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
|
||||
@@ -405,7 +405,6 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(MODEL_INVIS);
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -413,7 +412,6 @@ public:
|
||||
bool CanMove;
|
||||
bool WpEnabled;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
uint32 spawnTimer;
|
||||
uint32 FlameBuffetTimer;
|
||||
bool imol;
|
||||
@@ -429,7 +427,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 0 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -543,13 +540,11 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool go;
|
||||
uint32 KnockDownTimer;
|
||||
uint32 pos;
|
||||
void Reset()
|
||||
{
|
||||
KnockDownTimer = 10000;
|
||||
@@ -557,7 +552,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -644,13 +638,11 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool go;
|
||||
uint32 FrenzyTimer;
|
||||
uint32 pos;
|
||||
uint32 MoveTimer;
|
||||
bool RandomMove;
|
||||
void Reset()
|
||||
@@ -662,7 +654,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -753,13 +744,13 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
SummonList summons;
|
||||
bool go;
|
||||
uint32 ShadowBoltTimer;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowBoltTimer = 1000+rand()%5000;
|
||||
@@ -773,10 +764,14 @@ public:
|
||||
summon->Attack(target, false);
|
||||
summons.Summon(summon);
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature* summon) {summons.Despawn(summon);}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -815,8 +810,10 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
hyjal_trashAI::UpdateAI(diff);
|
||||
|
||||
if (IsEvent || IsOverrun)
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!go)
|
||||
@@ -840,8 +837,10 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (ShadowBoltTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOW_BOLT);
|
||||
@@ -874,7 +873,6 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -882,7 +880,7 @@ public:
|
||||
uint32 CourseTimer;
|
||||
uint32 WailTimer;
|
||||
uint32 ShellTimer;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
CourseTimer = 20000+rand()%5000;
|
||||
@@ -892,7 +890,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -979,13 +976,12 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool go;
|
||||
uint32 WebTimer;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
WebTimer = 20000+rand()%5000;
|
||||
@@ -993,7 +989,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -1071,13 +1066,12 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool go;
|
||||
uint32 ManaBurnTimer;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ManaBurnTimer = 9000+rand()%5000;
|
||||
@@ -1085,7 +1079,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
@@ -1163,13 +1156,11 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool go;
|
||||
uint32 FrostBreathTimer;
|
||||
uint32 pos;
|
||||
uint32 MoveTimer;
|
||||
|
||||
void Reset()
|
||||
@@ -1181,7 +1172,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 2 && instance && !IsOverrun)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
@@ -1280,14 +1270,12 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
DummyTarget[0] = 0;DummyTarget[1] = 0;DummyTarget[2] = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool go;
|
||||
uint32 StrikeTimer;
|
||||
uint32 pos;
|
||||
uint32 MoveTimer;
|
||||
float Zpos;
|
||||
bool forcemove;
|
||||
@@ -1303,7 +1291,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 2 && instance && !IsOverrun)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
@@ -1382,8 +1369,9 @@ public:
|
||||
float x, y, z;
|
||||
me->getVictim()->GetPosition(x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z+Zpos);
|
||||
Zpos-=1.0f;
|
||||
if (Zpos <= 0)Zpos=0;
|
||||
Zpos -= 1.0f;
|
||||
if (Zpos <= 0)
|
||||
Zpos = 0;
|
||||
MoveTimer = 2000;
|
||||
} else MoveTimer-=diff;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
instance->SetData(TYPE_MEDIVH, IN_PROGRESS);
|
||||
DoCast(me, SPELL_CHANNEL, false);
|
||||
Check_Timer = 5000;
|
||||
}
|
||||
}
|
||||
else if (who->GetTypeId() == TYPEID_UNIT && me->IsWithinDistInMap(who, 15.0f))
|
||||
{
|
||||
if (instance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
{
|
||||
if (SpellCorrupt_Timer <= diff)
|
||||
{
|
||||
instance->SetData(TYPE_MEDIVH, SPECIAL);
|
||||
instance->SetData(TYPE_MEDIVH, SPECIAL);
|
||||
|
||||
if (me->HasAura(SPELL_CORRUPT_AEONUS))
|
||||
SpellCorrupt_Timer = 1000;
|
||||
|
||||
+2
-2
@@ -36,9 +36,9 @@ class go_barrel_old_hillsbrad : public GameObjectScript
|
||||
public:
|
||||
go_barrel_old_hillsbrad() : GameObjectScript("go_barrel_old_hillsbrad") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
if (InstanceScript* instance = pGO->GetInstanceScript())
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
{
|
||||
if (instance->GetData(TYPE_BARREL_DIVERSION) == DONE)
|
||||
return false;
|
||||
|
||||
@@ -114,11 +114,11 @@ public:
|
||||
{
|
||||
boss_onyxiaAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
|
||||
uint32 m_uiPhase;
|
||||
@@ -169,11 +169,11 @@ public:
|
||||
m_uiSummonWhelpCount = 0;
|
||||
m_bIsMoving = false;
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(DATA_ONYXIA, NOT_STARTED);
|
||||
m_instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
m_instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
instance->SetData(DATA_ONYXIA, NOT_STARTED);
|
||||
instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,17 +182,17 @@ public:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->SetInCombatWithZone();
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(DATA_ONYXIA, IN_PROGRESS);
|
||||
m_instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
instance->SetData(DATA_ONYXIA, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ONYXIA, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ONYXIA, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
@@ -265,8 +265,8 @@ public:
|
||||
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25);
|
||||
me->SetSpeed(MOVE_FLIGHT, 1.0f);
|
||||
DoScriptText(SAY_PHASE_2_TRANS, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
m_uiWhelpTimer = 5000;
|
||||
m_uiLairGuardTimer = 15000;
|
||||
break;
|
||||
@@ -301,9 +301,9 @@ public:
|
||||
(pSpell->Id >= 22267 && pSpell->Id <= 22268)) &&
|
||||
(target->GetTypeId() == TYPEID_PLAYER))
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(DATA_SHE_DEEP_BREATH_MORE, FAIL);
|
||||
instance->SetData(DATA_SHE_DEEP_BREATH_MORE, FAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,8 +362,8 @@ public:
|
||||
Trinity::GameObjectInRangeCheck check(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 15);
|
||||
Trinity::GameObjectLastSearcher<Trinity::GameObjectInRangeCheck> searcher(me, pFloor, check);
|
||||
me->VisitNearbyGridObject(30, searcher);
|
||||
if (m_instance && pFloor)
|
||||
m_instance->SetData64(DATA_FLOOR_ERUPTION_GUID, pFloor->GetGUID());
|
||||
if (instance && pFloor)
|
||||
instance->SetData64(DATA_FLOOR_ERUPTION_GUID, pFloor->GetGUID());
|
||||
m_uiBellowingRoarTimer = 30000;
|
||||
}
|
||||
else
|
||||
@@ -409,8 +409,8 @@ public:
|
||||
if (HealthBelowPct(40))
|
||||
{
|
||||
m_uiPhase = PHASE_END;
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
DoScriptText(SAY_PHASE_3_TRANS, me);
|
||||
|
||||
SetCombatMovement(true);
|
||||
|
||||
@@ -93,10 +93,10 @@ class go_gong : public GameObjectScript
|
||||
public:
|
||||
go_gong() : GameObjectScript("go_gong") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
//basic support, not blizzlike data is missing...
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
if (instance)
|
||||
{
|
||||
|
||||
@@ -607,7 +607,8 @@ public:
|
||||
if (WisperTimer <= diff)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon()) return;
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
//Play random sound to the zone
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
struct boss_veknilashAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() {return false;}
|
||||
boss_veknilashAI(Creature* c) : boss_twinemperorsAI(c) {}
|
||||
boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature) {}
|
||||
|
||||
uint32 UpperCut_Timer;
|
||||
uint32 UnbalancingStrike_Timer;
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
struct boss_veklorAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() {return true;}
|
||||
boss_veklorAI(Creature* c) : boss_twinemperorsAI(c) {}
|
||||
boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature) {}
|
||||
|
||||
uint32 ShadowBolt_Timer;
|
||||
uint32 Blizzard_Timer;
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64 (uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier)
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
|
||||
@@ -308,7 +308,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpawnPyramidWave(uint32 wave){
|
||||
void SpawnPyramidWave(uint32 wave)
|
||||
{
|
||||
for (int i = 0; i < pyramidSpawnTotal; i++)
|
||||
{
|
||||
if (pyramidSpawns[i][0] == (float)wave)
|
||||
@@ -321,7 +322,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool IsWaveAllDead(){
|
||||
bool IsWaveAllDead()
|
||||
{
|
||||
for (std::list<uint64>::iterator itr = addsAtBase.begin(); itr != addsAtBase.end(); ++itr)
|
||||
{
|
||||
if (Creature* add = instance->GetCreature((*itr)))
|
||||
|
||||
@@ -199,18 +199,6 @@ public:
|
||||
+## go_troll_cage
|
||||
+######*/
|
||||
|
||||
void initBlyCrewMember(InstanceScript* instance, uint32 entry, float x, float y, float z)
|
||||
{
|
||||
if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry)))
|
||||
{
|
||||
crew->SetReactState(REACT_AGGRESSIVE);
|
||||
crew->SetWalk(true);
|
||||
crew->SetHomePosition(x, y, z, 0);
|
||||
crew->GetMotionMaster()->MovePoint(1, x, y, z);
|
||||
crew->setFaction(FACTION_FREED);
|
||||
}
|
||||
}
|
||||
|
||||
class go_troll_cage : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
@@ -231,6 +219,18 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
void initBlyCrewMember(InstanceScript* instance, uint32 entry, float x, float y, float z)
|
||||
{
|
||||
if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry)))
|
||||
{
|
||||
crew->SetReactState(REACT_AGGRESSIVE);
|
||||
crew->SetWalk(true);
|
||||
crew->SetHomePosition(x, y, z, 0);
|
||||
crew->GetMotionMaster()->MovePoint(1, x, y, z);
|
||||
crew->setFaction(FACTION_FREED);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
|
||||
@@ -234,7 +234,6 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
uint32 m_uiRebuffTimer;
|
||||
bool work;
|
||||
|
||||
void Reset ()
|
||||
void Reset()
|
||||
{
|
||||
uiPlayerGUID = 0;
|
||||
m_uiRebuffTimer = 0;
|
||||
|
||||
@@ -53,12 +53,12 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
uint32 eCreature = creature->GetEntry();
|
||||
|
||||
if (creature->isQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (eCreature == 9528)
|
||||
uint32 creatureId = creature->GetEntry();
|
||||
|
||||
if (creatureId == 9528)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(4101))
|
||||
{
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
player->SEND_GOSSIP_MENU(2844, creature->GetGUID());
|
||||
}
|
||||
|
||||
if (eCreature == 9529)
|
||||
if (creatureId == 9529)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(4102))
|
||||
{
|
||||
@@ -84,7 +84,6 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void AddSC_felwood()
|
||||
|
||||
@@ -385,7 +385,8 @@ public:
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || (!who->isAlive())) return;
|
||||
if (!who || (!who->isAlive()))
|
||||
return;
|
||||
|
||||
if (me->IsWithinDistInMap(who, 10.0f) && (who->GetTypeId() == TYPEID_PLAYER) && CAST_PLR(who)->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE && !EventInProgress)
|
||||
{
|
||||
@@ -433,8 +434,10 @@ public:
|
||||
if (BigWill)
|
||||
{
|
||||
Creature* creature = Unit::GetCreature((*me), BigWill);
|
||||
if (creature) {
|
||||
if (creature->isAlive()) {
|
||||
if (creature)
|
||||
{
|
||||
if (creature->isAlive())
|
||||
{
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
creature->setDeathState(JUST_DIED);
|
||||
|
||||
@@ -387,20 +387,20 @@ class prince_taldaram_sphere : public GameObjectScript
|
||||
public:
|
||||
prince_taldaram_sphere() : GameObjectScript("prince_taldaram_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
if (!instance)
|
||||
return true;
|
||||
|
||||
Creature* pPrinceTaldaram = Unit::GetCreature(*pGO, instance->GetData64(DATA_PRINCE_TALDARAM));
|
||||
Creature* pPrinceTaldaram = Unit::GetCreature(*go, instance->GetData64(DATA_PRINCE_TALDARAM));
|
||||
if (pPrinceTaldaram && pPrinceTaldaram->isAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
switch (pGO->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_SPHERE1: instance->SetData(DATA_SPHERE1_EVENT, IN_PROGRESS); break;
|
||||
case GO_SPHERE2: instance->SetData(DATA_SPHERE2_EVENT, IN_PROGRESS); break;
|
||||
|
||||
@@ -87,7 +87,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -236,7 +237,8 @@ public:
|
||||
for (std::set<uint64>::const_iterator itr = InitiandGUIDs.begin(); itr != InitiandGUIDs.end(); ++itr)
|
||||
{
|
||||
Creature* cr = instance->GetCreature(*itr);
|
||||
if (!cr || (cr && cr->isAlive())) return 0;
|
||||
if (!cr || (cr && cr->isAlive()))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
case DATA_JEDOGA_TRIGGER_SWITCH: return switchtrigger;
|
||||
|
||||
@@ -136,7 +136,8 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge!
|
||||
CheckDistance(fMaxDistance, diff);
|
||||
|
||||
@@ -64,7 +64,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -926,9 +926,7 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
if (instance && instance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
|
||||
instance->SetData(TYPE_SHADRON_PREKILLED, 1);
|
||||
if (Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
|
||||
{
|
||||
pAcolyte->Kill(pAcolyte);
|
||||
}
|
||||
break;
|
||||
case NPC_VESPERON:
|
||||
iTextId = SAY_VESPERON_DEATH;
|
||||
@@ -936,9 +934,7 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
if (instance && instance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
|
||||
instance->SetData(TYPE_VESPERON_PREKILLED, 1);
|
||||
if (Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f))
|
||||
{
|
||||
pAcolyte->Kill(pAcolyte);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -125,8 +125,8 @@ public:
|
||||
break;
|
||||
case DATA_IN_POSITION: //movement done.
|
||||
me->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
|
||||
if (GameObject* pGO = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
|
||||
instance->HandleGameObject(pGO->GetGUID(), false);
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
|
||||
instance->HandleGameObject(go->GetGUID(), false);
|
||||
NextStep(10000, false, 3);
|
||||
break;
|
||||
case DATA_LESSER_CHAMPIONS_DEFEATED:
|
||||
|
||||
+17
-17
@@ -141,10 +141,10 @@ public:
|
||||
{
|
||||
boss_anubarak_trialAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
SummonList Summons;
|
||||
std::list<uint64> m_vBurrowGUID;
|
||||
@@ -195,8 +195,8 @@ public:
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,8 +211,8 @@ public:
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_ANUBARAK, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_ANUBARAK, FAIL);
|
||||
//Summon Scarab Swarms neutral at random places
|
||||
for (int i=0; i < 10; i++)
|
||||
if (Creature* temp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
|
||||
@@ -223,8 +223,8 @@ public:
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_ANUBARAK, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_ANUBARAK, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
@@ -260,8 +260,8 @@ public:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetInCombatWithZone();
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
|
||||
//Despawn Scarab Swarms neutral
|
||||
Summons.DoAction(NPC_SCARAB, ACTION_SCARAB_SUBMERGE);
|
||||
//Spawn Burrow
|
||||
@@ -426,10 +426,10 @@ public:
|
||||
{
|
||||
mob_swarm_scarabAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 m_uiDeterminationTimer;
|
||||
|
||||
@@ -493,10 +493,10 @@ public:
|
||||
{
|
||||
mob_nerubian_burrowerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 m_uiSpiderFrenzyTimer;
|
||||
uint32 m_uiSubmergeTimer;
|
||||
@@ -639,10 +639,10 @@ public:
|
||||
{
|
||||
mob_anubarak_spikeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiIncreaseSpeedTimer;
|
||||
uint8 m_uiSpeed;
|
||||
uint64 m_uiTargetGUID;
|
||||
@@ -674,7 +674,7 @@ public:
|
||||
Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID);
|
||||
if (!target || !target->isAlive() || !target->HasAura(SPELL_MARK))
|
||||
{
|
||||
if (Creature* pAnubarak = Unit::GetCreature((*me), m_instance->GetData64(NPC_ANUBARAK)))
|
||||
if (Creature* pAnubarak = Unit::GetCreature((*me), instance->GetData64(NPC_ANUBARAK)))
|
||||
pAnubarak->CastSpell(pAnubarak, SPELL_SPIKE_TELE, false);
|
||||
me->DisappearAndDie();
|
||||
return;
|
||||
|
||||
+53
-39
@@ -64,10 +64,10 @@ public:
|
||||
{
|
||||
boss_toc_champion_controllerAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*) creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
uint32 m_uiChampionsNotStarted;
|
||||
uint32 m_uiChampionsFailed;
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_WARRIOR : NPC_ALLIANCE_WARRIOR);
|
||||
|
||||
uint8 healersSubtracted = 2;
|
||||
if (m_instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL || m_instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
|
||||
if (instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL || instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
|
||||
healersSubtracted = 1;
|
||||
for (uint8 i = 0; i < healersSubtracted; ++i)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
vHealersEntries.erase(vHealersEntries.begin()+pos);
|
||||
}
|
||||
|
||||
if (m_instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL || m_instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
|
||||
if (instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL || instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
vOtherEntries.erase(vOtherEntries.begin()+urand(0, vOtherEntries.size()-1));
|
||||
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
m_uiChampionsFailed++;
|
||||
if (m_uiChampionsFailed + m_uiChampionsKilled >= Summons.size())
|
||||
{
|
||||
m_instance->SetData(TYPE_CRUSADERS, FAIL);
|
||||
instance->SetData(TYPE_CRUSADERS, FAIL);
|
||||
Summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -227,16 +227,16 @@ public:
|
||||
m_uiChampionsKilled = 0;
|
||||
m_bInProgress = true;
|
||||
Summons.DoZoneInCombat();
|
||||
m_instance->SetData(TYPE_CRUSADERS, IN_PROGRESS);
|
||||
instance->SetData(TYPE_CRUSADERS, IN_PROGRESS);
|
||||
}
|
||||
break;
|
||||
case DONE:
|
||||
m_uiChampionsKilled++;
|
||||
if (m_uiChampionsKilled == 1)
|
||||
m_instance->SetData(TYPE_CRUSADERS, SPECIAL);
|
||||
instance->SetData(TYPE_CRUSADERS, SPECIAL);
|
||||
else if (m_uiChampionsKilled >= Summons.size())
|
||||
{
|
||||
m_instance->SetData(TYPE_CRUSADERS, DONE);
|
||||
instance->SetData(TYPE_CRUSADERS, DONE);
|
||||
Summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -253,11 +253,11 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
{
|
||||
boss_faction_championsAI(Creature* creature, uint32 aitype) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*) creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
mAIType = aitype;
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 championControllerGUID;
|
||||
uint32 mAIType;
|
||||
@@ -273,8 +273,8 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, FAIL);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -326,8 +326,8 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (mAIType != AI_PET)
|
||||
if (m_instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, DONE);
|
||||
}
|
||||
|
||||
@@ -335,8 +335,8 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
{
|
||||
DoCast(me, SPELL_ANTI_AOE, true);
|
||||
me->SetInCombatWithZone();
|
||||
if (m_instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (instance)
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(2, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -351,18 +351,18 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
if (Player* player = players.begin()->getSource())
|
||||
TeamInInstance = player->GetTeam();
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
{
|
||||
if (Creature* temp = Unit::GetCreature(*me, m_instance->GetData64(NPC_VARIAN)))
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_VARIAN)))
|
||||
DoScriptText(SAY_VARIAN_KILL_HORDE_PLAYER4+urand(0, 3), temp); // + cause we are on negative
|
||||
}
|
||||
else
|
||||
if (Creature* temp = me->FindNearestCreature(NPC_GARROSH, 300.f))
|
||||
DoScriptText(SAY_GARROSH_KILL_ALLIANCE_PLAYER4+urand(0, 3), temp); // + cause we are on negative
|
||||
|
||||
m_instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -408,7 +408,8 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!who) return;
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
@@ -494,7 +495,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiNatureGraspTimer <= uiDiff)
|
||||
{
|
||||
@@ -588,7 +590,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiHeroismOrBloodlustTimer <= uiDiff)
|
||||
{
|
||||
@@ -687,7 +690,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiBubbleTimer <= uiDiff)
|
||||
{
|
||||
@@ -786,7 +790,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiPsychicScreamTimer <= uiDiff)
|
||||
{
|
||||
@@ -879,7 +884,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiPsychicScreamTimer <= uiDiff)
|
||||
{
|
||||
@@ -990,7 +996,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiFearTimer <= uiDiff)
|
||||
{
|
||||
@@ -1093,7 +1100,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiCounterspellTimer <= uiDiff)
|
||||
{
|
||||
@@ -1204,7 +1212,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiDisengageTimer <= uiDiff)
|
||||
{
|
||||
@@ -1312,7 +1321,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiBarkskinTimer <= uiDiff)
|
||||
{
|
||||
@@ -1424,7 +1434,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiBladestormTimer <= uiDiff)
|
||||
{
|
||||
@@ -1534,7 +1545,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiIceboundFortitudeTimer <= uiDiff)
|
||||
{
|
||||
@@ -1636,7 +1648,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiFanOfKnivesTimer <= uiDiff)
|
||||
{
|
||||
@@ -1773,7 +1786,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiHeroismOrBloodlustTimer <= uiDiff)
|
||||
{
|
||||
@@ -1873,7 +1887,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiRepeteanceTimer <= uiDiff)
|
||||
{
|
||||
@@ -1951,7 +1966,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiDevourMagicTimer <= uiDiff)
|
||||
{
|
||||
@@ -2000,7 +2016,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_uiClawTimer <= uiDiff)
|
||||
{
|
||||
@@ -2011,11 +2028,8 @@ public:
|
||||
boss_faction_championsAI::UpdateAI(uiDiff);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/*========================================================*/
|
||||
|
||||
void AddSC_boss_faction_champions()
|
||||
{
|
||||
new boss_toc_champion_controller();
|
||||
|
||||
+26
-26
@@ -106,11 +106,11 @@ public:
|
||||
{
|
||||
boss_jaraxxusAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
SummonList Summons;
|
||||
|
||||
@@ -124,8 +124,8 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_JARAXXUS, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_JARAXXUS, NOT_STARTED);
|
||||
SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED);
|
||||
m_uiFelFireballTimer = 5*IN_MILLISECONDS;
|
||||
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
@@ -139,8 +139,8 @@ public:
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_JARAXXUS, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_JARAXXUS, FAIL);
|
||||
DoCast(me, SPELL_JARAXXUS_CHAINS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -150,8 +150,8 @@ public:
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ public:
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_JARAXXUS, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_JARAXXUS, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
@@ -171,8 +171,8 @@ public:
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
@@ -289,11 +289,11 @@ public:
|
||||
{
|
||||
mob_infernal_volcanoAI(Creature* creature) : Scripted_NoMovementAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
SummonList Summons;
|
||||
|
||||
@@ -344,11 +344,11 @@ public:
|
||||
{
|
||||
mob_fel_infernalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiFelStreakTimer;
|
||||
|
||||
void Reset()
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_instance && m_instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
|
||||
if (instance && instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
|
||||
me->DespawnOrUnsummon();
|
||||
|
||||
if (m_uiFelStreakTimer <= uiDiff)
|
||||
@@ -398,11 +398,11 @@ public:
|
||||
{
|
||||
mob_nether_portalAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
SummonList Summons;
|
||||
|
||||
@@ -453,13 +453,13 @@ public:
|
||||
{
|
||||
mob_mistress_of_painAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, INCREASE);
|
||||
instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, INCREASE);
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiShivanSlashTimer;
|
||||
uint32 m_uiSpinningStrikeTimer;
|
||||
uint32 m_uiMistressKissTimer;
|
||||
@@ -474,13 +474,13 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (m_instance && m_instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
|
||||
if (instance && instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
|
||||
+36
-35
@@ -123,10 +123,10 @@ public:
|
||||
{
|
||||
boss_gormokAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 m_uiImpaleTimer;
|
||||
uint32 m_uiStaggeringStompTimer;
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
switch (pointId)
|
||||
{
|
||||
case 0:
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetInCombatWithZone();
|
||||
@@ -173,16 +173,16 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
m_instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
}
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
m_instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
@@ -263,12 +263,12 @@ public:
|
||||
{
|
||||
mob_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
|
||||
instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiFireBombTimer;
|
||||
uint32 m_uiBatterTimer;
|
||||
uint32 m_uiHeadCrackTimer;
|
||||
@@ -284,15 +284,15 @@ public:
|
||||
|
||||
m_uiTargetGUID = 0;
|
||||
m_bTargetDied = false;
|
||||
if (m_instance)
|
||||
m_uiBossGUID = m_instance->GetData64(NPC_GORMOK);
|
||||
if (instance)
|
||||
m_uiBossGUID = instance->GetData64(NPC_GORMOK);
|
||||
//Workaround for Snobold
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
@@ -328,8 +328,8 @@ public:
|
||||
if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
|
||||
if (target->isAlive())
|
||||
target->RemoveAurasDueToSpell(SPELL_SNOBOLLED);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_SNOBOLD_COUNT, DECREASE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_SNOBOLD_COUNT, DECREASE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
@@ -341,9 +341,9 @@ public:
|
||||
{
|
||||
if (!target->isAlive())
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
Unit* gormok = ObjectAccessor::GetCreature(*me, m_instance->GetData64(NPC_GORMOK));
|
||||
Unit* gormok = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GORMOK));
|
||||
if (gormok && gormok->isAlive())
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
@@ -454,7 +454,8 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (instanceScript && instanceScript->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged)
|
||||
{
|
||||
@@ -757,10 +758,10 @@ public:
|
||||
{
|
||||
boss_icehowlAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 m_uiFerociousButtTimer;
|
||||
uint32 m_uiArticBreathTimer;
|
||||
@@ -794,8 +795,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 pointId)
|
||||
@@ -826,7 +827,7 @@ public:
|
||||
m_bMovementFinish = true;
|
||||
break;
|
||||
case 2:
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetInCombatWithZone();
|
||||
@@ -836,16 +837,16 @@ public:
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
m_instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
}
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -854,15 +855,15 @@ public:
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
|
||||
+33
-31
@@ -143,10 +143,10 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
{
|
||||
boss_twin_baseAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
|
||||
AuraStateType m_uiAuraState;
|
||||
@@ -190,8 +190,8 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_VALKIRIES, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_VALKIRIES, FAIL);
|
||||
|
||||
Summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
@@ -199,12 +199,13 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId)
|
||||
{
|
||||
if (uiType != POINT_MOTION_TYPE) return;
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
switch (uiId)
|
||||
{
|
||||
case 1:
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
break;
|
||||
@@ -216,8 +217,8 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, me);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
if (instance)
|
||||
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,12 +232,12 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
switch (summoned->GetEntry())
|
||||
{
|
||||
case NPC_LIGHT_ESSENCE:
|
||||
m_instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_LIGHT_ESSENCE_HELPER);
|
||||
m_instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POWERING_UP_HELPER);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_LIGHT_ESSENCE_HELPER);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POWERING_UP_HELPER);
|
||||
break;
|
||||
case NPC_DARK_ESSENCE:
|
||||
m_instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DARK_ESSENCE_HELPER);
|
||||
m_instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POWERING_UP_HELPER);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DARK_ESSENCE_HELPER);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POWERING_UP_HELPER);
|
||||
break;
|
||||
case NPC_BULLET_CONTROLLER:
|
||||
me->m_Events.AddEvent(new OrbsDespawner(me), me->m_Events.CalculateTime(100));
|
||||
@@ -248,7 +249,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
{
|
||||
@@ -257,13 +258,13 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
|
||||
m_instance->SetData(TYPE_VALKIRIES, DONE);
|
||||
instance->SetData(TYPE_VALKIRIES, DONE);
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
m_instance->SetData(TYPE_VALKIRIES, SPECIAL);
|
||||
instance->SetData(TYPE_VALKIRIES, SPECIAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,20 +274,20 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
// Called when sister pointer needed
|
||||
Creature* GetSister()
|
||||
{
|
||||
return Unit::GetCreature((*me), m_instance->GetData64(m_uiSisterNpcId));
|
||||
return Unit::GetCreature((*me), instance->GetData64(m_uiSisterNpcId));
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
{
|
||||
me->AddAura(m_uiMyEmphatySpellId, pSister);
|
||||
pSister->SetInCombatWithZone();
|
||||
}
|
||||
m_instance->SetData(TYPE_VALKIRIES, IN_PROGRESS);
|
||||
instance->SetData(TYPE_VALKIRIES, IN_PROGRESS);
|
||||
}
|
||||
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
@@ -315,7 +316,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance || !UpdateVictim())
|
||||
if (!instance || !UpdateVictim())
|
||||
return;
|
||||
|
||||
switch (m_uiStage)
|
||||
@@ -406,10 +407,10 @@ public:
|
||||
{
|
||||
boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() {
|
||||
boss_twin_baseAI::Reset();
|
||||
@@ -429,17 +430,17 @@ public:
|
||||
m_uiTouchSpellId = SPELL_LIGHT_TOUCH;
|
||||
m_uiSpikeSpellId = SPELL_LIGHT_TWIN_SPIKE;
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
}
|
||||
|
||||
me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
@@ -448,14 +449,14 @@ public:
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
boss_twin_baseAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
if (instance)
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
|
||||
boss_twin_baseAI::JustReachedHome();
|
||||
}
|
||||
@@ -552,10 +553,10 @@ struct mob_unleashed_ballAI : public ScriptedAI
|
||||
{
|
||||
mob_unleashed_ballAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiRangeCheckTimer;
|
||||
|
||||
void MoveToNextPoint()
|
||||
@@ -585,7 +586,8 @@ struct mob_unleashed_ballAI : public ScriptedAI
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId)
|
||||
{
|
||||
if (uiType != POINT_MOTION_TYPE) return;
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
switch (uiId)
|
||||
{
|
||||
|
||||
+153
-138
@@ -106,10 +106,10 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
{
|
||||
npc_announcer_toc10AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -239,10 +239,10 @@ class boss_lich_king_toc : public CreatureScript
|
||||
{
|
||||
boss_lich_king_tocAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiUpdateTimer;
|
||||
|
||||
void Reset()
|
||||
@@ -254,7 +254,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
summoned->CastSpell(summoned, 51807, false);
|
||||
summoned->SetDisplayId(11686);
|
||||
}
|
||||
if (m_instance) m_instance->SetData(TYPE_LICH_KING, IN_PROGRESS);
|
||||
if (instance) instance->SetData(TYPE_LICH_KING, IN_PROGRESS);
|
||||
me->SetWalk(true);
|
||||
}
|
||||
|
||||
@@ -265,77 +265,80 @@ class boss_lich_king_toc : public CreatureScript
|
||||
switch (uiId)
|
||||
{
|
||||
case 0:
|
||||
m_instance->SetData(TYPE_EVENT, 5030);
|
||||
instance->SetData(TYPE_EVENT, 5030);
|
||||
break;
|
||||
case 1:
|
||||
m_instance->SetData(TYPE_EVENT, 5050);
|
||||
instance->SetData(TYPE_EVENT, 5050);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance) return;
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1) return;
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = m_instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (m_uiUpdateTimer <= uiDiff)
|
||||
{
|
||||
switch (m_instance->GetData(TYPE_EVENT))
|
||||
switch (instance->GetData(TYPE_EVENT))
|
||||
{
|
||||
case 5010:
|
||||
DoScriptText(SAY_STAGE_4_02, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
me->GetMotionMaster()->MovePoint(0, LichKingLoc[0]);
|
||||
m_instance->SetData(TYPE_EVENT, 5020);
|
||||
instance->SetData(TYPE_EVENT, 5020);
|
||||
break;
|
||||
case 5030:
|
||||
DoScriptText(SAY_STAGE_4_04, me);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
|
||||
m_uiUpdateTimer = 10000;
|
||||
m_instance->SetData(TYPE_EVENT, 5040);
|
||||
instance->SetData(TYPE_EVENT, 5040);
|
||||
break;
|
||||
case 5040:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
me->GetMotionMaster()->MovePoint(1, LichKingLoc[1]);
|
||||
m_uiUpdateTimer = 1000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 5050:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 5060);
|
||||
instance->SetData(TYPE_EVENT, 5060);
|
||||
break;
|
||||
case 5060:
|
||||
DoScriptText(SAY_STAGE_4_05, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
m_uiUpdateTimer = 2500;
|
||||
m_instance->SetData(TYPE_EVENT, 5070);
|
||||
instance->SetData(TYPE_EVENT, 5070);
|
||||
break;
|
||||
case 5070:
|
||||
me->CastSpell(me, 68198, false);
|
||||
m_uiUpdateTimer = 1500;
|
||||
m_instance->SetData(TYPE_EVENT, 5080);
|
||||
instance->SetData(TYPE_EVENT, 5080);
|
||||
break;
|
||||
case 5080:
|
||||
if (GameObject* pGoFloor = m_instance->instance->GetGameObject(m_instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
pGoFloor->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
|
||||
if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
|
||||
me->CastSpell(me, 69016, false);
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(TYPE_LICH_KING, DONE);
|
||||
Creature* temp = Unit::GetCreature(*me, m_instance->GetData64(NPC_ANUBARAK));
|
||||
instance->SetData(TYPE_LICH_KING, DONE);
|
||||
Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_ANUBARAK));
|
||||
if (!temp || !temp->isAlive())
|
||||
temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
}
|
||||
me->DespawnOrUnsummon();
|
||||
m_uiUpdateTimer = 20000;
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
m_instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -355,10 +358,10 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
npc_fizzlebang_tocAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = (InstanceScript*)me->GetInstanceScript();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
uint32 m_uiUpdateTimer;
|
||||
uint64 m_uiPortalGUID;
|
||||
@@ -367,8 +370,8 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_STAGE_1_06, me, killer);
|
||||
m_instance->SetData(TYPE_EVENT, 1180);
|
||||
if (Creature* temp = Unit::GetCreature(*me, m_instance->GetData64(NPC_JARAXXUS)))
|
||||
instance->SetData(TYPE_EVENT, 1180);
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
|
||||
{
|
||||
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
temp->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -385,17 +388,18 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId)
|
||||
{
|
||||
if (uiType != POINT_MOTION_TYPE) return;
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
switch (uiId)
|
||||
{
|
||||
case 1:
|
||||
me->SetWalk(false);
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
m_instance->SetData(TYPE_EVENT, 1120);
|
||||
m_instance->SetData(TYPE_EVENT_TIMER, 1000);
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->SetData(TYPE_EVENT, 1120);
|
||||
instance->SetData(TYPE_EVENT_TIMER, 1000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -408,22 +412,24 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance) return;
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG) return;
|
||||
if (instance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = m_instance->GetData(TYPE_EVENT_TIMER);
|
||||
m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (m_uiUpdateTimer <= uiDiff)
|
||||
{
|
||||
switch (m_instance->GetData(TYPE_EVENT))
|
||||
switch (instance->GetData(TYPE_EVENT))
|
||||
{
|
||||
case 1110:
|
||||
m_instance->SetData(TYPE_EVENT, 1120);
|
||||
instance->SetData(TYPE_EVENT, 1120);
|
||||
m_uiUpdateTimer = 4000;
|
||||
break;
|
||||
case 1120:
|
||||
DoScriptText(SAY_STAGE_1_02, me);
|
||||
m_instance->SetData(TYPE_EVENT, 1130);
|
||||
instance->SetData(TYPE_EVENT, 1130);
|
||||
m_uiUpdateTimer = 12000;
|
||||
break;
|
||||
case 1130:
|
||||
@@ -437,12 +443,12 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
pTrigger->SetDisplayId(22862);
|
||||
pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false);
|
||||
}
|
||||
m_instance->SetData(TYPE_EVENT, 1132);
|
||||
instance->SetData(TYPE_EVENT, 1132);
|
||||
m_uiUpdateTimer = 4000;
|
||||
break;
|
||||
case 1132:
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
m_instance->SetData(TYPE_EVENT, 1134);
|
||||
instance->SetData(TYPE_EVENT, 1134);
|
||||
m_uiUpdateTimer = 4000;
|
||||
break;
|
||||
case 1134:
|
||||
@@ -455,10 +461,10 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
m_uiPortalGUID = pPortal->GetGUID();
|
||||
}
|
||||
m_uiUpdateTimer = 4000;
|
||||
m_instance->SetData(TYPE_EVENT, 1135);
|
||||
instance->SetData(TYPE_EVENT, 1135);
|
||||
break;
|
||||
case 1135:
|
||||
m_instance->SetData(TYPE_EVENT, 1140);
|
||||
instance->SetData(TYPE_EVENT, 1140);
|
||||
m_uiUpdateTimer = 3000;
|
||||
break;
|
||||
case 1140:
|
||||
@@ -469,27 +475,27 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
temp->SetReactState(REACT_PASSIVE);
|
||||
temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()-10, ToCCommonLoc[1].GetPositionZ());
|
||||
}
|
||||
m_instance->SetData(TYPE_EVENT, 1142);
|
||||
instance->SetData(TYPE_EVENT, 1142);
|
||||
m_uiUpdateTimer = 5000;
|
||||
break;
|
||||
case 1142:
|
||||
if (Creature* temp = Unit::GetCreature(*me, m_instance->GetData64(NPC_JARAXXUS)))
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
|
||||
temp->SetTarget(me->GetGUID());
|
||||
if (Creature* pTrigger = Unit::GetCreature(*me, m_uiTriggerGUID))
|
||||
pTrigger->DespawnOrUnsummon();
|
||||
if (Creature* pPortal = Unit::GetCreature(*me, m_uiPortalGUID))
|
||||
pPortal->DespawnOrUnsummon();
|
||||
m_instance->SetData(TYPE_EVENT, 1144);
|
||||
instance->SetData(TYPE_EVENT, 1144);
|
||||
m_uiUpdateTimer = 10000;
|
||||
break;
|
||||
case 1144:
|
||||
if (Creature* temp = Unit::GetCreature(*me, m_instance->GetData64(NPC_JARAXXUS)))
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
|
||||
DoScriptText(SAY_STAGE_1_05, temp);
|
||||
m_instance->SetData(TYPE_EVENT, 1150);
|
||||
instance->SetData(TYPE_EVENT, 1150);
|
||||
m_uiUpdateTimer = 5000;
|
||||
break;
|
||||
case 1150:
|
||||
if (Creature* temp = Unit::GetCreature(*me, m_instance->GetData64(NPC_JARAXXUS)))
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
|
||||
{
|
||||
//1-shot Fizzlebang
|
||||
temp->CastSpell(me, 67888, false);
|
||||
@@ -497,12 +503,12 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
temp->AddThreat(me, 1000.0f);
|
||||
temp->AI()->AttackStart(me);
|
||||
}
|
||||
m_instance->SetData(TYPE_EVENT, 1160);
|
||||
instance->SetData(TYPE_EVENT, 1160);
|
||||
m_uiUpdateTimer = 3000;
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
m_instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -522,10 +528,10 @@ class npc_tirion_toc : public CreatureScript
|
||||
{
|
||||
npc_tirion_tocAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)me->GetInstanceScript();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiUpdateTimer;
|
||||
|
||||
void Reset() {}
|
||||
@@ -534,31 +540,34 @@ class npc_tirion_toc : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance) return;
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION) return;
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = m_instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (m_uiUpdateTimer <= uiDiff)
|
||||
{
|
||||
switch (m_instance->GetData(TYPE_EVENT))
|
||||
switch (instance->GetData(TYPE_EVENT))
|
||||
{
|
||||
case 110:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_01, me);
|
||||
m_uiUpdateTimer = 22000;
|
||||
m_instance->SetData(TYPE_EVENT, 120);
|
||||
instance->SetData(TYPE_EVENT, 120);
|
||||
break;
|
||||
case 140:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_02, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 150);
|
||||
instance->SetData(TYPE_EVENT, 150);
|
||||
break;
|
||||
case 150:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
if (m_instance->GetData(TYPE_BEASTS) != DONE)
|
||||
if (instance->GetData(TYPE_BEASTS) != DONE)
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
|
||||
if (Creature* temp = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS))
|
||||
{
|
||||
@@ -568,26 +577,26 @@ class npc_tirion_toc : public CreatureScript
|
||||
}
|
||||
}
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 155);
|
||||
instance->SetData(TYPE_EVENT, 155);
|
||||
break;
|
||||
case 155:
|
||||
m_instance->SetData(TYPE_BEASTS, IN_PROGRESS);
|
||||
instance->SetData(TYPE_BEASTS, IN_PROGRESS);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 160);
|
||||
instance->SetData(TYPE_EVENT, 160);
|
||||
break;
|
||||
case 200:
|
||||
DoScriptText(SAY_STAGE_0_04, me);
|
||||
m_uiUpdateTimer = 8000;
|
||||
m_instance->SetData(TYPE_EVENT, 205);
|
||||
instance->SetData(TYPE_EVENT, 205);
|
||||
break;
|
||||
case 205:
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 210);
|
||||
instance->SetData(TYPE_EVENT, 210);
|
||||
break;
|
||||
case 210:
|
||||
if (m_instance->GetData(TYPE_BEASTS) != DONE)
|
||||
if (instance->GetData(TYPE_BEASTS) != DONE)
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
if (Creature* temp = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
|
||||
@@ -602,24 +611,24 @@ class npc_tirion_toc : public CreatureScript
|
||||
}
|
||||
}
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 220);
|
||||
instance->SetData(TYPE_EVENT, 220);
|
||||
break;
|
||||
case 220:
|
||||
m_instance->SetData(TYPE_EVENT, 230);
|
||||
instance->SetData(TYPE_EVENT, 230);
|
||||
break;
|
||||
case 300:
|
||||
DoScriptText(SAY_STAGE_0_05, me);
|
||||
m_uiUpdateTimer = 8000;
|
||||
m_instance->SetData(TYPE_EVENT, 305);
|
||||
instance->SetData(TYPE_EVENT, 305);
|
||||
break;
|
||||
case 305:
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 310);
|
||||
instance->SetData(TYPE_EVENT, 310);
|
||||
break;
|
||||
case 310:
|
||||
if (m_instance->GetData(TYPE_BEASTS) != DONE)
|
||||
if (instance->GetData(TYPE_BEASTS) != DONE)
|
||||
{
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
if (Creature* temp = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN))
|
||||
{
|
||||
temp->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
|
||||
@@ -629,92 +638,92 @@ class npc_tirion_toc : public CreatureScript
|
||||
}
|
||||
}
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 315);
|
||||
instance->SetData(TYPE_EVENT, 315);
|
||||
break;
|
||||
case 315:
|
||||
m_instance->SetData(TYPE_EVENT, 320);
|
||||
instance->SetData(TYPE_EVENT, 320);
|
||||
break;
|
||||
case 400:
|
||||
DoScriptText(SAY_STAGE_0_06, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 666:
|
||||
DoScriptText(SAY_STAGE_0_WIPE, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 1010:
|
||||
DoScriptText(SAY_STAGE_1_01, me);
|
||||
m_uiUpdateTimer = 7000;
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
me->SummonCreature(NPC_FIZZLEBANG, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 1180:
|
||||
DoScriptText(SAY_STAGE_1_07, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 2000:
|
||||
DoScriptText(SAY_STAGE_1_08, me);
|
||||
m_uiUpdateTimer = 18000;
|
||||
m_instance->SetData(TYPE_EVENT, 2010);
|
||||
instance->SetData(TYPE_EVENT, 2010);
|
||||
break;
|
||||
case 2030:
|
||||
DoScriptText(SAY_STAGE_1_11, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 3000:
|
||||
DoScriptText(SAY_STAGE_2_01, me);
|
||||
m_uiUpdateTimer = 12000;
|
||||
m_instance->SetData(TYPE_EVENT, 3050);
|
||||
instance->SetData(TYPE_EVENT, 3050);
|
||||
break;
|
||||
case 3001:
|
||||
DoScriptText(SAY_STAGE_2_01, me);
|
||||
m_uiUpdateTimer = 12000;
|
||||
m_instance->SetData(TYPE_EVENT, 3051);
|
||||
instance->SetData(TYPE_EVENT, 3051);
|
||||
break;
|
||||
case 3060:
|
||||
DoScriptText(SAY_STAGE_2_03, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 3070);
|
||||
instance->SetData(TYPE_EVENT, 3070);
|
||||
break;
|
||||
case 3061:
|
||||
DoScriptText(SAY_STAGE_2_03, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 3071);
|
||||
instance->SetData(TYPE_EVENT, 3071);
|
||||
break;
|
||||
//Summoning crusaders
|
||||
case 3091:
|
||||
if (Creature* pChampionController = me->SummonCreature(NPC_CHAMPIONS_CONTROLLER, ToCCommonLoc[1]))
|
||||
pChampionController->AI()->SetData(0, HORDE);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 3092);
|
||||
instance->SetData(TYPE_EVENT, 3092);
|
||||
break;
|
||||
//Summoning crusaders
|
||||
case 3090:
|
||||
if (Creature* pChampionController = me->SummonCreature(NPC_CHAMPIONS_CONTROLLER, ToCCommonLoc[1]))
|
||||
pChampionController->AI()->SetData(0, ALLIANCE);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 3092);
|
||||
instance->SetData(TYPE_EVENT, 3092);
|
||||
break;
|
||||
case 3092:
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), m_instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
|
||||
pChampionController->AI()->SetData(1, NOT_STARTED);
|
||||
m_instance->SetData(TYPE_EVENT, 3095);
|
||||
instance->SetData(TYPE_EVENT, 3095);
|
||||
break;
|
||||
//Crusaders battle end
|
||||
case 3100:
|
||||
DoScriptText(SAY_STAGE_2_06, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 4000:
|
||||
DoScriptText(SAY_STAGE_3_01, me);
|
||||
m_uiUpdateTimer = 13000;
|
||||
m_instance->SetData(TYPE_EVENT, 4010);
|
||||
instance->SetData(TYPE_EVENT, 4010);
|
||||
break;
|
||||
case 4010:
|
||||
DoScriptText(SAY_STAGE_3_02, me);
|
||||
@@ -733,72 +742,72 @@ class npc_tirion_toc : public CreatureScript
|
||||
temp->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[3].GetPositionX(), TwinValkyrsLoc[3].GetPositionY(), TwinValkyrsLoc[3].GetPositionZ());
|
||||
}
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 4015);
|
||||
instance->SetData(TYPE_EVENT, 4015);
|
||||
break;
|
||||
case 4015:
|
||||
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
if (Creature* temp = Unit::GetCreature((*me), m_instance->GetData64(NPC_LIGHTBANE)))
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
|
||||
if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(NPC_LIGHTBANE)))
|
||||
{
|
||||
temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
|
||||
temp->SetVisible(true);
|
||||
}
|
||||
if (Creature* temp = Unit::GetCreature((*me), m_instance->GetData64(NPC_DARKBANE)))
|
||||
if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(NPC_DARKBANE)))
|
||||
{
|
||||
temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ());
|
||||
temp->SetVisible(true);
|
||||
}
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 4016);
|
||||
instance->SetData(TYPE_EVENT, 4016);
|
||||
break;
|
||||
case 4016:
|
||||
m_instance->SetData(TYPE_EVENT, 4017);
|
||||
instance->SetData(TYPE_EVENT, 4017);
|
||||
break;
|
||||
case 4040:
|
||||
m_uiUpdateTimer = 60000;
|
||||
m_instance->SetData(TYPE_EVENT, 5000);
|
||||
instance->SetData(TYPE_EVENT, 5000);
|
||||
break;
|
||||
case 5000:
|
||||
DoScriptText(SAY_STAGE_4_01, me);
|
||||
m_uiUpdateTimer = 10000;
|
||||
m_instance->SetData(TYPE_EVENT, 5005);
|
||||
instance->SetData(TYPE_EVENT, 5005);
|
||||
break;
|
||||
case 5005:
|
||||
m_uiUpdateTimer = 8000;
|
||||
m_instance->SetData(TYPE_EVENT, 5010);
|
||||
instance->SetData(TYPE_EVENT, 5010);
|
||||
me->SummonCreature(NPC_LICH_KING_1, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5);
|
||||
break;
|
||||
case 5020:
|
||||
DoScriptText(SAY_STAGE_4_03, me);
|
||||
m_uiUpdateTimer = 1000;
|
||||
m_instance->SetData(TYPE_EVENT, 0);
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 6000:
|
||||
me->NearTeleportTo(AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 4.0f);
|
||||
m_uiUpdateTimer = 20000;
|
||||
m_instance->SetData(TYPE_EVENT, 6005);
|
||||
instance->SetData(TYPE_EVENT, 6005);
|
||||
break;
|
||||
case 6005:
|
||||
DoScriptText(SAY_STAGE_4_06, me);
|
||||
m_uiUpdateTimer = 20000;
|
||||
m_instance->SetData(TYPE_EVENT, 6010);
|
||||
instance->SetData(TYPE_EVENT, 6010);
|
||||
break;
|
||||
case 6010:
|
||||
if (IsHeroic())
|
||||
{
|
||||
DoScriptText(SAY_STAGE_4_07, me);
|
||||
m_uiUpdateTimer = 60000;
|
||||
m_instance->SetData(TYPE_ANUBARAK, SPECIAL);
|
||||
m_instance->SetData(TYPE_EVENT, 6020);
|
||||
} else m_instance->SetData(TYPE_EVENT, 6030);
|
||||
instance->SetData(TYPE_ANUBARAK, SPECIAL);
|
||||
instance->SetData(TYPE_EVENT, 6020);
|
||||
} else instance->SetData(TYPE_EVENT, 6030);
|
||||
break;
|
||||
case 6020:
|
||||
me->DespawnOrUnsummon();
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 6030);
|
||||
instance->SetData(TYPE_EVENT, 6030);
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
m_instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -818,10 +827,10 @@ class npc_garrosh_toc : public CreatureScript
|
||||
{
|
||||
npc_garrosh_tocAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)me->GetInstanceScript();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiUpdateTimer;
|
||||
|
||||
void Reset() {}
|
||||
@@ -830,53 +839,56 @@ class npc_garrosh_toc : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance) return;
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH) return;
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = m_instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (instance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (m_uiUpdateTimer <= uiDiff)
|
||||
{
|
||||
switch (m_instance->GetData(TYPE_EVENT))
|
||||
switch (instance->GetData(TYPE_EVENT))
|
||||
{
|
||||
case 130:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_03h, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 132);
|
||||
instance->SetData(TYPE_EVENT, 132);
|
||||
break;
|
||||
case 132:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 140);
|
||||
instance->SetData(TYPE_EVENT, 140);
|
||||
break;
|
||||
case 2010:
|
||||
DoScriptText(SAY_STAGE_1_09, me);
|
||||
m_uiUpdateTimer = 9000;
|
||||
m_instance->SetData(TYPE_EVENT, 2020);
|
||||
instance->SetData(TYPE_EVENT, 2020);
|
||||
break;
|
||||
case 3050:
|
||||
DoScriptText(SAY_STAGE_2_02h, me);
|
||||
m_uiUpdateTimer = 15000;
|
||||
m_instance->SetData(TYPE_EVENT, 3060);
|
||||
instance->SetData(TYPE_EVENT, 3060);
|
||||
break;
|
||||
case 3070:
|
||||
DoScriptText(SAY_STAGE_2_04h, me);
|
||||
m_uiUpdateTimer = 6000;
|
||||
m_instance->SetData(TYPE_EVENT, 3080);
|
||||
instance->SetData(TYPE_EVENT, 3080);
|
||||
break;
|
||||
case 3081:
|
||||
DoScriptText(SAY_STAGE_2_05h, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 3091);
|
||||
instance->SetData(TYPE_EVENT, 3091);
|
||||
break;
|
||||
case 4030:
|
||||
DoScriptText(SAY_STAGE_3_03h, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 4040);
|
||||
instance->SetData(TYPE_EVENT, 4040);
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
m_instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -896,10 +908,10 @@ class npc_varian_toc : public CreatureScript
|
||||
{
|
||||
npc_varian_tocAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = (InstanceScript*)me->GetInstanceScript();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
uint32 m_uiUpdateTimer;
|
||||
|
||||
void Reset() {}
|
||||
@@ -908,53 +920,56 @@ class npc_varian_toc : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance) return;
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_VARIAN) return;
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = m_instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (instance->GetData(TYPE_EVENT_NPC) != NPC_VARIAN)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (m_uiUpdateTimer <= uiDiff)
|
||||
{
|
||||
switch (m_instance->GetData(TYPE_EVENT))
|
||||
switch (instance->GetData(TYPE_EVENT))
|
||||
{
|
||||
case 120:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
|
||||
DoScriptText(SAY_STAGE_0_03a, me);
|
||||
m_uiUpdateTimer = 2000;
|
||||
m_instance->SetData(TYPE_EVENT, 122);
|
||||
instance->SetData(TYPE_EVENT, 122);
|
||||
break;
|
||||
case 122:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 130);
|
||||
instance->SetData(TYPE_EVENT, 130);
|
||||
break;
|
||||
case 2020:
|
||||
DoScriptText(SAY_STAGE_1_10, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 2030);
|
||||
instance->SetData(TYPE_EVENT, 2030);
|
||||
break;
|
||||
case 3051:
|
||||
DoScriptText(SAY_STAGE_2_02a, me);
|
||||
m_uiUpdateTimer = 10000;
|
||||
m_instance->SetData(TYPE_EVENT, 3061);
|
||||
instance->SetData(TYPE_EVENT, 3061);
|
||||
break;
|
||||
case 3071:
|
||||
DoScriptText(SAY_STAGE_2_04a, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 3081);
|
||||
instance->SetData(TYPE_EVENT, 3081);
|
||||
break;
|
||||
case 3080:
|
||||
DoScriptText(SAY_STAGE_2_05a, me);
|
||||
m_uiUpdateTimer = 3000;
|
||||
m_instance->SetData(TYPE_EVENT, 3090);
|
||||
instance->SetData(TYPE_EVENT, 3090);
|
||||
break;
|
||||
case 4020:
|
||||
DoScriptText(SAY_STAGE_3_03a, me);
|
||||
m_uiUpdateTimer = 5000;
|
||||
m_instance->SetData(TYPE_EVENT, 4040);
|
||||
instance->SetData(TYPE_EVENT, 4040);
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
m_instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -792,7 +792,7 @@ public:
|
||||
|
||||
struct npc_phantom_hallucinationAI : public npc_phantom_mage::npc_phantom_mageAI
|
||||
{
|
||||
npc_phantom_hallucinationAI(Creature* c) : npc_phantom_mage::npc_phantom_mageAI(c)
|
||||
npc_phantom_hallucinationAI(Creature* creature) : npc_phantom_mage::npc_phantom_mageAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -519,17 +520,17 @@ class go_gundrak_altar : public GameObjectScript
|
||||
public:
|
||||
go_gundrak_altar() : GameObjectScript("go_gundrak_altar") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
uint64 uiStatue = 0;
|
||||
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
switch (pGO->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case 192518:
|
||||
uiStatue = instance->GetData64(DATA_SLAD_RAN_STATUE);
|
||||
@@ -545,8 +546,8 @@ public:
|
||||
if (!instance->GetData64(DATA_STATUE_ACTIVATE))
|
||||
{
|
||||
instance->SetData64(DATA_STATUE_ACTIVATE, uiStatue);
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
struct boss_anubrekhanAI : public BossAI
|
||||
{
|
||||
boss_anubrekhanAI(Creature* c) : BossAI(c, BOSS_ANUBREKHAN) {}
|
||||
boss_anubrekhanAI(Creature* creature) : BossAI(creature, BOSS_ANUBREKHAN) {}
|
||||
|
||||
bool hasTaunted;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
|
||||
struct boss_four_horsemenAI : public BossAI
|
||||
{
|
||||
boss_four_horsemenAI(Creature* c) : BossAI(c, BOSS_HORSEMEN)
|
||||
boss_four_horsemenAI(Creature* creature) : BossAI(creature, BOSS_HORSEMEN)
|
||||
{
|
||||
id = Horsemen(0);
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
struct boss_gluthAI : public BossAI
|
||||
{
|
||||
boss_gluthAI(Creature* c) : BossAI(c, BOSS_GLUTH)
|
||||
boss_gluthAI(Creature* creature) : BossAI(creature, BOSS_GLUTH)
|
||||
{
|
||||
// Do not let Gluth be affected by zombies' debuff
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_INFECTED_WOUND, true);
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
struct boss_grobbulusAI : public BossAI
|
||||
{
|
||||
boss_grobbulusAI(Creature* c) : BossAI(c, BOSS_GROBBULUS)
|
||||
boss_grobbulusAI(Creature* creature) : BossAI(creature, BOSS_GROBBULUS)
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_POISON_CLOUD_ADD, true);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
struct boss_heiganAI : public BossAI
|
||||
{
|
||||
boss_heiganAI(Creature* c) : BossAI(c, BOSS_HEIGAN) {}
|
||||
boss_heiganAI(Creature* creature) : BossAI(creature, BOSS_HEIGAN) {}
|
||||
|
||||
uint32 eruptSection;
|
||||
bool eruptDirection;
|
||||
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
|
||||
struct boss_kelthuzadAI : public BossAI
|
||||
{
|
||||
boss_kelthuzadAI(Creature* c) : BossAI(c, BOSS_KELTHUZAD), spawns(c)
|
||||
boss_kelthuzadAI(Creature* creature) : BossAI(creature, BOSS_KELTHUZAD), spawns(creature)
|
||||
{
|
||||
uiFaction = me->getFaction();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
struct boss_maexxnaAI : public BossAI
|
||||
{
|
||||
boss_maexxnaAI(Creature* c) : BossAI(c, BOSS_MAEXXNA) {}
|
||||
boss_maexxnaAI(Creature* creature) : BossAI(creature, BOSS_MAEXXNA) {}
|
||||
|
||||
bool enraged;
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
|
||||
struct mob_webwrapAI : public NullCreatureAI
|
||||
{
|
||||
mob_webwrapAI(Creature* c) : NullCreatureAI(c), victimGUID(0) {}
|
||||
mob_webwrapAI(Creature* creature) : NullCreatureAI(creature), victimGUID(0) {}
|
||||
|
||||
uint64 victimGUID;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
struct boss_nothAI : public BossAI
|
||||
{
|
||||
boss_nothAI(Creature* c) : BossAI(c, BOSS_NOTH) {}
|
||||
boss_nothAI(Creature* creature) : BossAI(creature, BOSS_NOTH) {}
|
||||
|
||||
uint32 waveCount, balconyCount;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
struct boss_patchwerkAI : public BossAI
|
||||
{
|
||||
boss_patchwerkAI(Creature* c) : BossAI(c, BOSS_PATCHWERK) {}
|
||||
boss_patchwerkAI(Creature* creature) : BossAI(creature, BOSS_PATCHWERK) {}
|
||||
|
||||
bool Enraged;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
struct boss_razuviousAI : public BossAI
|
||||
{
|
||||
boss_razuviousAI(Creature* c) : BossAI(c, BOSS_RAZUVIOUS) {}
|
||||
boss_razuviousAI(Creature* creature) : BossAI(creature, BOSS_RAZUVIOUS) {}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
struct boss_sapphironAI : public BossAI
|
||||
{
|
||||
boss_sapphironAI(Creature* c) : BossAI(c, BOSS_SAPPHIRON)
|
||||
boss_sapphironAI(Creature* creature) : BossAI(creature, BOSS_SAPPHIRON)
|
||||
, phase(PHASE_NULL)
|
||||
{
|
||||
map = me->GetMap();
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
|
||||
struct boss_thaddiusAI : public BossAI
|
||||
{
|
||||
boss_thaddiusAI(Creature* c) : BossAI(c, BOSS_THADDIUS)
|
||||
boss_thaddiusAI(Creature* creature) : BossAI(creature, BOSS_THADDIUS)
|
||||
{
|
||||
// init is a bit tricky because thaddius shall track the life of both adds, but not if there was a wipe
|
||||
// and, in particular, if there was a crash after both adds were killed (should not respawn)
|
||||
|
||||
@@ -208,16 +208,16 @@ class containment_sphere : public GameObjectScript
|
||||
public:
|
||||
containment_sphere() : GameObjectScript("containment_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
Creature* pKeristrasza = Unit::GetCreature(*pGO, instance ? instance->GetData64(DATA_KERISTRASZA) : 0);
|
||||
Creature* pKeristrasza = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_KERISTRASZA) : 0);
|
||||
if (pKeristrasza && pKeristrasza->isAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
CAST_AI(boss_keristrasza::boss_keristraszaAI, pKeristrasza->AI())->CheckContainmentSpheres(true);
|
||||
}
|
||||
|
||||
@@ -93,13 +93,13 @@ public:
|
||||
{
|
||||
boss_bjarngrimAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
m_uiStance = STANCE_DEFENSIVE;
|
||||
memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID));
|
||||
canBuff = true;
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
bool m_bIsChangingStance;
|
||||
bool canBuff;
|
||||
@@ -167,8 +167,8 @@ public:
|
||||
|
||||
SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_BJARNGRIM, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_BJARNGRIM, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
@@ -188,8 +188,8 @@ public:
|
||||
//must get both lieutenants here and make sure they are with him
|
||||
me->CallForHelp(30.0f);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_BJARNGRIM, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_BJARNGRIM, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -201,8 +201,8 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_BJARNGRIM, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_BJARNGRIM, DONE);
|
||||
}
|
||||
|
||||
//TODO: remove when removal is done by the core
|
||||
@@ -385,10 +385,10 @@ public:
|
||||
{
|
||||
mob_stormforged_lieutenantAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 m_uiArcWeld_Timer;
|
||||
uint32 m_uiRenewSteel_Timer;
|
||||
@@ -401,9 +401,9 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pBjarngrim = m_instance->instance->GetCreature(m_instance->GetData64(DATA_BJARNGRIM)))
|
||||
if (Creature* pBjarngrim = instance->instance->GetCreature(instance->GetData64(DATA_BJARNGRIM)))
|
||||
{
|
||||
if (pBjarngrim->isAlive() && !pBjarngrim->getVictim())
|
||||
pBjarngrim->AI()->AttackStart(who);
|
||||
@@ -427,9 +427,9 @@ public:
|
||||
|
||||
if (m_uiRenewSteel_Timer <= uiDiff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pBjarngrim = m_instance->instance->GetCreature(m_instance->GetData64(DATA_BJARNGRIM)))
|
||||
if (Creature* pBjarngrim = instance->instance->GetCreature(instance->GetData64(DATA_BJARNGRIM)))
|
||||
{
|
||||
if (pBjarngrim->isAlive())
|
||||
DoCast(pBjarngrim, SPELL_RENEW_STEEL_N);
|
||||
|
||||
@@ -68,10 +68,10 @@ public:
|
||||
{
|
||||
boss_lokenAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
bool m_bIsAura;
|
||||
|
||||
@@ -93,10 +93,10 @@ public:
|
||||
|
||||
m_uiHealthAmountModifier = 1;
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(TYPE_LOKEN, NOT_STARTED);
|
||||
m_instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT);
|
||||
instance->SetData(TYPE_LOKEN, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,10 +104,10 @@ public:
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(TYPE_LOKEN, IN_PROGRESS);
|
||||
m_instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT);
|
||||
instance->SetData(TYPE_LOKEN, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,8 +115,8 @@ public:
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_LOKEN, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_LOKEN, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
|
||||
@@ -79,10 +79,10 @@ public:
|
||||
{
|
||||
boss_volkhanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
std::list<uint64> m_lGolemGUIDList;
|
||||
|
||||
@@ -117,16 +117,16 @@ public:
|
||||
DespawnGolem();
|
||||
m_lGolemGUIDList.clear();
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_VOLKHAN, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_VOLKHAN, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_VOLKHAN, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_VOLKHAN, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
@@ -147,8 +147,8 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
DespawnGolem();
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_VOLKHAN, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_VOLKHAN, DONE);
|
||||
|
||||
if (IsHeroic() && GolemsShattered < 5)
|
||||
{
|
||||
|
||||
@@ -643,7 +643,7 @@ class boss_flame_leviathan_defense_cannon : public CreatureScript
|
||||
|
||||
uint32 NapalmTimer;
|
||||
|
||||
void Reset ()
|
||||
void Reset()
|
||||
{
|
||||
NapalmTimer = 5*IN_MILLISECONDS;
|
||||
DoCast(me, AURA_STEALTH_DETECTION);
|
||||
|
||||
@@ -184,11 +184,8 @@ class boss_kologarn : public CreatureScript
|
||||
|
||||
if (Creature* rubbleStalker = who->FindNearestCreature(NPC_RUBBLE_STALKER, 70.0f))
|
||||
{
|
||||
if (rubbleStalker)
|
||||
{
|
||||
rubbleStalker->CastSpell(rubbleStalker, SPELL_FALLING_RUBBLE, true);
|
||||
rubbleStalker->CastSpell(rubbleStalker, SPELL_SUMMON_RUBBLE, true);
|
||||
}
|
||||
rubbleStalker->CastSpell(rubbleStalker, SPELL_FALLING_RUBBLE, true);
|
||||
rubbleStalker->CastSpell(rubbleStalker, SPELL_SUMMON_RUBBLE, true);
|
||||
}
|
||||
|
||||
if (!right && !left)
|
||||
|
||||
@@ -445,6 +445,7 @@ public:
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (uiDespawnTimer <= diff)
|
||||
@@ -455,7 +456,6 @@ public:
|
||||
} else uiDespawnTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_ingvar_the_plunderer()
|
||||
|
||||
@@ -100,7 +100,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -835,15 +835,15 @@ class go_palehoof_sphere : public GameObjectScript
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
Creature* pPalehoof = Unit::GetCreature(*pGO, instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
Creature* pPalehoof = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->isAlive())
|
||||
{
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
}
|
||||
|
||||
@@ -170,10 +170,10 @@ public:
|
||||
{
|
||||
boss_skadiAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
uint64 m_uiGraufGUID;
|
||||
std::vector<uint64> triggersGUID;
|
||||
@@ -208,10 +208,10 @@ public:
|
||||
me->SetSpeed(MOVE_FLIGHT, 3.0f);
|
||||
if ((Unit::GetCreature((*me), m_uiGraufGUID) == NULL) && !me->IsMounted())
|
||||
me->SummonCreature(CREATURE_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f);
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, NOT_STARTED);
|
||||
m_instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,10 +235,10 @@ public:
|
||||
m_uiMovementTimer = 1000;
|
||||
m_uiSummonTimer = 10000;
|
||||
me->SetInCombatWithZone();
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
m_instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, IN_PROGRESS);
|
||||
m_instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f);
|
||||
me->SetWalk(false);
|
||||
m_uiMountTimer = 1000;
|
||||
@@ -411,8 +411,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Summons.DespawnAll();
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -461,15 +461,15 @@ class go_harpoon_launcher : public GameObjectScript
|
||||
public:
|
||||
go_harpoon_launcher() : GameObjectScript("go_harpoon_launcher") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
InstanceScript* m_instance = pGO->GetInstanceScript();
|
||||
if (!m_instance) return false;
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
if (Creature* pSkadi = Unit::GetCreature((*pGO), m_instance->GetData64(DATA_SKADI_THE_RUTHLESS)))
|
||||
{
|
||||
if (Creature* pSkadi = Unit::GetCreature(*go, instance->GetData64(DATA_SKADI_THE_RUTHLESS)))
|
||||
player->CastSpell(pSkadi, SPELL_RAPID_FIRE, true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -795,7 +796,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*pGO*/, uint32 uiEventId)
|
||||
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId)
|
||||
{
|
||||
switch (uiEventId)
|
||||
{
|
||||
|
||||
@@ -403,9 +403,9 @@ public:
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
if (GameObject* pGO = me->FindNearestGameObject(GO_SCOURGE_CAGE, 5.0f))
|
||||
if (pGO->GetGoState() == GO_STATE_ACTIVE)
|
||||
pGO->SetGoState(GO_STATE_READY);
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_SCOURGE_CAGE, 5.0f))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -849,7 +849,7 @@ public:
|
||||
|
||||
struct npc_nexus_drake_hatchlingAI : public FollowerAI //The spell who makes the npc follow the player is missing, also we can use FollowerAI!
|
||||
{
|
||||
npc_nexus_drake_hatchlingAI(Creature* c) : FollowerAI(c) {}
|
||||
npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature) {}
|
||||
|
||||
uint64 HarpoonerGUID;
|
||||
bool WithRedDragonBlood;
|
||||
|
||||
@@ -194,9 +194,7 @@ public:
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (m_uiChatTimer <= uiDiff)
|
||||
{
|
||||
m_uiChatTimer = 12000;
|
||||
}
|
||||
else
|
||||
m_uiChatTimer -= uiDiff;
|
||||
}
|
||||
@@ -209,9 +207,7 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_QUEST_ACCEPT, creature);
|
||||
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(creature, NPC_MRFLOPPY, 180.0f))
|
||||
{
|
||||
Mrfloppy->GetMotionMaster()->MoveFollow(creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
}
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_emily::npc_emilyAI, (creature->AI())))
|
||||
pEscortAI->Start(true, false, player->GetGUID());
|
||||
@@ -318,7 +314,7 @@ public:
|
||||
void SpellHit(Unit* pCaster, const SpellInfo* pSpell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_OUTHOUSE_GROANS)
|
||||
{
|
||||
{
|
||||
++m_counter;
|
||||
if (m_counter < 5)
|
||||
DoCast(pCaster, SPELL_CAMERA_SHAKE, true);
|
||||
@@ -477,7 +473,7 @@ public:
|
||||
|
||||
uint32 DespawnTimer;
|
||||
|
||||
void Reset ()
|
||||
void Reset()
|
||||
{
|
||||
DespawnTimer = 5000;
|
||||
uiPlayerGUID = 0;
|
||||
@@ -503,7 +499,6 @@ public:
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->DespawnOrUnsummon(DespawnTimer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,6 +506,7 @@ public:
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -695,12 +691,12 @@ public:
|
||||
|
||||
void AddSC_grizzly_hills()
|
||||
{
|
||||
new npc_emily;
|
||||
new npc_mrfloppy;
|
||||
new npc_outhouse_bunny;
|
||||
new npc_tallhorn_stag;
|
||||
new npc_amberpine_woodsman;
|
||||
new npc_wounded_skirmisher;
|
||||
new npc_emily();
|
||||
new npc_mrfloppy();
|
||||
new npc_outhouse_bunny();
|
||||
new npc_tallhorn_stag();
|
||||
new npc_amberpine_woodsman();
|
||||
new npc_wounded_skirmisher();
|
||||
new npc_lightning_sentry();
|
||||
new npc_venture_co_straggler();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
npc_Apothecary_HanesAI(Creature* creature) : npc_escortAI(creature){}
|
||||
uint32 PotTimer;
|
||||
|
||||
void Reset ()
|
||||
void Reset()
|
||||
{
|
||||
SetDespawnAtFar(false);
|
||||
PotTimer = 10000; //10 sec cooldown on potion
|
||||
|
||||
@@ -709,7 +709,7 @@ class npc_hyldsmeet_protodrake : public CreatureScript
|
||||
class npc_hyldsmeet_protodrakeAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
npc_hyldsmeet_protodrakeAI(Creature* c) : CreatureAI(c), _accessoryRespawnTimer(0), _vehicleKit(c->GetVehicleKit()) {}
|
||||
npc_hyldsmeet_protodrakeAI(Creature* creature) : CreatureAI(creature), _accessoryRespawnTimer(0), _vehicleKit(creature->GetVehicleKit()) {}
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply)
|
||||
{
|
||||
|
||||
@@ -52,8 +52,7 @@ public:
|
||||
float x, y, z;
|
||||
me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, 0.1f);
|
||||
|
||||
if (Unit* summon = me->SummonCreature(NPC_RAGECLAW, x, y, z,
|
||||
0, TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
if (Unit* summon = me->SummonCreature(NPC_RAGECLAW, x, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
{
|
||||
RageclawGUID = summon->GetGUID();
|
||||
LockRageclaw();
|
||||
@@ -1397,14 +1396,14 @@ class go_scourge_enclosure : public GameObjectScript
|
||||
public:
|
||||
go_scourge_enclosure() : GameObjectScript("go_scourge_enclosure") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Creature* pGymerDummy = pGO->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f);
|
||||
Creature* pGymerDummy = go->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f);
|
||||
if (pGymerDummy)
|
||||
{
|
||||
pGO->UseDoorOrButton();
|
||||
go->UseDoorOrButton();
|
||||
player->KilledMonsterCredit(pGymerDummy->GetEntry(), pGymerDummy->GetGUID());
|
||||
pGymerDummy->CastSpell(pGymerDummy, 55529, true);
|
||||
pGymerDummy->DisappearAndDie();
|
||||
|
||||
@@ -58,10 +58,10 @@ public:
|
||||
{
|
||||
boss_ambassador_hellmawAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
m_instance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* m_instance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 EventCheck_Timer;
|
||||
uint32 CorrosiveAcid_Timer;
|
||||
@@ -81,17 +81,17 @@ public:
|
||||
IsBanished = true;
|
||||
Enraged = false;
|
||||
|
||||
if (m_instance && me->isAlive())
|
||||
if (instance && me->isAlive())
|
||||
{
|
||||
if (m_instance->GetData(TYPE_OVERSEER) != DONE)
|
||||
if (instance->GetData(TYPE_OVERSEER) != DONE)
|
||||
DoCast(me, SPELL_BANISH, true);
|
||||
}
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_HELLMAW, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HELLMAW, FAIL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
@@ -114,15 +114,15 @@ public:
|
||||
IsBanished = false;
|
||||
Intro = true;
|
||||
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(TYPE_HELLMAW) != FAIL)
|
||||
if (instance->GetData(TYPE_HELLMAW) != FAIL)
|
||||
{
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
Start(true, false, 0, NULL, false, true);
|
||||
}
|
||||
|
||||
m_instance->SetData(TYPE_HELLMAW, IN_PROGRESS);
|
||||
instance->SetData(TYPE_HELLMAW, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (m_instance)
|
||||
m_instance->SetData(TYPE_HELLMAW, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HELLMAW, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -150,9 +150,9 @@ public:
|
||||
{
|
||||
if (EventCheck_Timer <= diff)
|
||||
{
|
||||
if (m_instance)
|
||||
if (instance)
|
||||
{
|
||||
if (m_instance->GetData(TYPE_OVERSEER) == DONE)
|
||||
if (instance->GetData(TYPE_OVERSEER) == DONE)
|
||||
{
|
||||
DoIntro();
|
||||
return;
|
||||
|
||||
@@ -75,7 +75,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -430,7 +430,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGlaiveGUID(uint64 guid){ GlaiveGUID = guid; }
|
||||
void SetGlaiveGUID(uint64 guid)
|
||||
{
|
||||
GlaiveGUID = guid;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
@@ -566,7 +569,9 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim == me) return;
|
||||
if (victim == me)
|
||||
return;
|
||||
|
||||
// TODO: Find better way to handle emote
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
@@ -747,7 +752,8 @@ public:
|
||||
final.y = 2 * final.y - initial.y;
|
||||
|
||||
Creature* Trigger = me->SummonCreature(23069, initial.x, initial.y, initial.z, 0, TEMPSUMMON_TIMED_DESPAWN, 13000);
|
||||
if (!Trigger) return;
|
||||
if (!Trigger)
|
||||
return;
|
||||
|
||||
Trigger->SetSpeed(MOVE_WALK, 3);
|
||||
Trigger->SetWalk(true);
|
||||
@@ -1181,7 +1187,11 @@ public:
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
void EnterEvadeMode() {}
|
||||
void GetIllidanGUID(uint64 guid) { IllidanGUID = guid; }
|
||||
|
||||
void GetIllidanGUID(uint64 guid)
|
||||
{
|
||||
IllidanGUID = guid;
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
@@ -2137,9 +2147,11 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
{
|
||||
if (!UpdateVictim()) return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim()->GetTypeId() != TYPEID_PLAYER) return; // Only cast the below on players.
|
||||
if (me->getVictim()->GetTypeId() != TYPEID_PLAYER)
|
||||
return; // Only cast the below on players.
|
||||
|
||||
if (!me->getVictim()->HasAura(SPELL_PARALYZE))
|
||||
{
|
||||
@@ -2168,7 +2180,7 @@ public:
|
||||
|
||||
struct blade_of_azzinothAI : public NullCreatureAI
|
||||
{
|
||||
blade_of_azzinothAI(Creature* c) : NullCreatureAI(c) {}
|
||||
blade_of_azzinothAI(Creature* creature) : NullCreatureAI(creature) {}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
|
||||
{
|
||||
|
||||
@@ -197,8 +197,11 @@ public:
|
||||
uint32 random = rand()%6;
|
||||
float x = Coords[random].x;
|
||||
float y = Coords[random].y;
|
||||
|
||||
Creature* Soul = me->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (!Soul) return false;
|
||||
if (!Soul)
|
||||
return false;
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
CAST_AI(npc_enslaved_soul::npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = me->GetGUID();
|
||||
|
||||
@@ -121,7 +121,10 @@ public:
|
||||
|
||||
struct mob_ashtongue_channelerAI : public ScriptedAI
|
||||
{
|
||||
mob_ashtongue_channelerAI(Creature* creature) : ScriptedAI(creature) {ShadeGUID = 0;}
|
||||
mob_ashtongue_channelerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
ShadeGUID = 0;
|
||||
}
|
||||
|
||||
uint64 ShadeGUID;
|
||||
|
||||
@@ -147,7 +150,10 @@ public:
|
||||
|
||||
struct mob_ashtongue_sorcererAI : public ScriptedAI
|
||||
{
|
||||
mob_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature) {ShadeGUID = 0;}
|
||||
mob_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
ShadeGUID = 0;
|
||||
}
|
||||
|
||||
uint64 ShadeGUID;
|
||||
uint32 CheckTimer;
|
||||
@@ -320,7 +326,8 @@ public:
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!who || IsBanished) return;
|
||||
if (!who || IsBanished)
|
||||
return;
|
||||
|
||||
if (who->isTargetableForAttack() && who != me)
|
||||
DoStartMovement(who);
|
||||
@@ -662,7 +669,8 @@ public:
|
||||
me->CombatStart(Shade);
|
||||
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
Shade->SetTarget(me->GetGUID());
|
||||
if (player) Shade->AddThreat(player, 1.0f);
|
||||
if (player)
|
||||
Shade->AddThreat(player, 1.0f);
|
||||
DoZoneInCombat(Shade);
|
||||
EventBegun = true;
|
||||
}
|
||||
@@ -675,17 +683,19 @@ public:
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0: ++WayPointId; break;
|
||||
case 0:
|
||||
++WayPointId;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (Creature* Shade = Unit::GetCreature(*me, ShadeGUID))
|
||||
{
|
||||
me->SetTarget(ShadeGUID);
|
||||
DoCast(Shade, SPELL_AKAMA_SOUL_RETRIEVE);
|
||||
EndingTalkCount = 0;
|
||||
SoulRetrieveTimer = 16000;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (Creature* Shade = Unit::GetCreature(*me, ShadeGUID))
|
||||
{
|
||||
me->SetTarget(ShadeGUID);
|
||||
DoCast(Shade, SPELL_AKAMA_SOUL_RETRIEVE);
|
||||
EndingTalkCount = 0;
|
||||
SoulRetrieveTimer = 16000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -878,7 +888,6 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_shade_of_akama()
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
struct molten_flameAI : public NullCreatureAI
|
||||
{
|
||||
molten_flameAI(Creature* c) : NullCreatureAI(c) {}
|
||||
molten_flameAI(Creature* creature) : NullCreatureAI(creature) {}
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
@@ -165,8 +165,15 @@ public:
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) {summons.Summon(summon);}
|
||||
void SummonedCreatureDespawn(Creature* summon) {summons.Despawn(summon);}
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
Unit* CalculateHatefulStrikeTarget()
|
||||
{
|
||||
|
||||
@@ -112,9 +112,11 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
void SetTeronGUID(uint64 guid){ TeronGUID = guid; }
|
||||
void SetTeronGUID(uint64 guid)
|
||||
{
|
||||
TeronGUID = guid;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class mob_shadowy_construct : public CreatureScript
|
||||
@@ -316,7 +318,8 @@ public:
|
||||
|
||||
void SetThreatList(Creature* Blossom)
|
||||
{
|
||||
if (!Blossom) return;
|
||||
if (!Blossom)
|
||||
return;
|
||||
|
||||
std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
|
||||
std::list<HostileReference*>::const_iterator i = m_threatlist.begin();
|
||||
|
||||
@@ -130,7 +130,9 @@ public:
|
||||
|
||||
bool RemoveImpalingSpine()
|
||||
{
|
||||
if (!SpineTargetGUID) return false;
|
||||
if (!SpineTargetGUID)
|
||||
return false;
|
||||
|
||||
Unit* target = Unit::GetUnit(*me, SpineTargetGUID);
|
||||
if (target && target->HasAura(SPELL_IMPALING_SPINE))
|
||||
target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
|
||||
@@ -313,7 +313,8 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!EventBegun) return;
|
||||
if (!EventBegun)
|
||||
return;
|
||||
|
||||
if (EndEventTimer)
|
||||
{
|
||||
@@ -475,7 +476,7 @@ public:
|
||||
|
||||
struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_gathios_the_shattererAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_councilAI(creature) {}
|
||||
|
||||
uint32 ConsecrationTimer;
|
||||
uint32 HammerOfJusticeTimer;
|
||||
@@ -602,7 +603,7 @@ public:
|
||||
|
||||
struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_high_nethermancer_zerevorAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
boss_high_nethermancer_zerevorAI(Creature* creature) : boss_illidari_councilAI(creature) {}
|
||||
|
||||
uint32 BlizzardTimer;
|
||||
uint32 FlamestrikeTimer;
|
||||
@@ -706,7 +707,7 @@ public:
|
||||
|
||||
struct boss_lady_malandeAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_lady_malandeAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
boss_lady_malandeAI(Creature* creature) : boss_illidari_councilAI(creature) {}
|
||||
|
||||
uint32 EmpoweredSmiteTimer;
|
||||
uint32 CircleOfHealingTimer;
|
||||
@@ -784,7 +785,7 @@ public:
|
||||
|
||||
struct boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_veras_darkshadowAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
boss_veras_darkshadowAI(Creature* creature) : boss_illidari_councilAI(creature) {}
|
||||
|
||||
uint64 EnvenomTargetGUID;
|
||||
|
||||
|
||||
@@ -118,7 +118,8 @@ public:
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user