diff options
| author | Shocker <shocker@freakz.ro> | 2012-03-16 15:13:44 -0700 |
|---|---|---|
| committer | Shocker <shocker@freakz.ro> | 2012-03-16 15:13:44 -0700 |
| commit | 6f031b814edf8ed10984d2f094f163fec47b40fc (patch) | |
| tree | 41d098585bf4295570e53f922ee2c50a87f3a480 /src/server/scripts/EasternKingdoms | |
| parent | 91314b4cc30edbe498a8e949e37e4eca608ca617 (diff) | |
| parent | d8b4bc590a55d6c062f88275e21661f0b31078ad (diff) | |
Merge pull request #5733 from GyxTom/master
Core/Script: Clean-ups in scripts
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
23 files changed, 195 insertions, 154 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 8edf6260f58..566e8c977dc 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -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() {} diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index ec80ae02ca9..447703aa5a7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index d0716a0b565..a192a1de267 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 9984554208f..883932fdb9b 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 0b45144f51b..aab18cd57be 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -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) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp index bf09e008dff..0ef2dddda8d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index b71f0ef8b9a..31dc23d24af 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -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) { diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 09832007a0b..0ea55d170b3 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -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); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 7ac42ff8193..f783fcc1eb5 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -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) { diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 4e7192e966c..7a946e9d5bf 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -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) diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 60d17a7e5d2..fea64c55377 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -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 diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 944d13cc1be..683bed46bb0 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 3cf4f315cad..f2e6647dc59 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -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()) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index ac1554bd00e..884fe109785 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -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 diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index a78ec29be99..35b9781ea45 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -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(); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 737a8fade57..4ba0c187973 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -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; } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index b3dcfb5112b..9edd82c39b0 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -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) { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 15933e3ed4d..638e2675496 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -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(); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 6b8d4b11439..0ef5c7ac74d 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -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) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index 2016fe4cb5d..b5149701d1e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -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) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index a58c66c8584..0504d791a26 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -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; } diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index 49fd582a662..2655165e59f 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp index 02bfcef45a3..841e577e333 100644 --- a/src/server/scripts/EasternKingdoms/ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp @@ -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; } } |
