diff options
| author | click <click@gonnamakeyou.com> | 2011-07-02 23:16:45 +0200 |
|---|---|---|
| committer | click <click@gonnamakeyou.com> | 2011-07-02 23:16:45 +0200 |
| commit | 70115f52f7229254af99162f6f5639792a23da49 (patch) | |
| tree | c6acac7a3cf183fe14eadf82e07cac2ffde6c4c2 /src/server/scripts/Kalimdor | |
| parent | 169f5da8c3120da98c01ebd8117f7aa527106206 (diff) | |
Core: Cleaning up hungarian notation - Phase3: pTarget -> target
Diffstat (limited to 'src/server/scripts/Kalimdor')
30 files changed, 245 insertions, 245 deletions
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index 4c2d29e7cc3..33a96f1a763 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -161,10 +161,10 @@ public: { if (uiFrostBoltVolleyTimer <= uiDiff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { - if (pTarget) - DoCast(pTarget, SPELL_FROST_BOLT_VOLLEY); + if (target) + DoCast(target, SPELL_FROST_BOLT_VOLLEY); } uiFrostBoltVolleyTimer = urand(5000, 8000); } else uiFrostBoltVolleyTimer -= uiDiff; diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp index b39d222b948..9476380deb6 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp @@ -89,10 +89,10 @@ public: if (uiSleepTimer < diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { DoScriptText(SAY_SLEEP, me); - DoCast(pTarget, SPELL_SLEEP); + DoCast(target, SPELL_SLEEP); } uiSleepTimer = urand(15000, 20000); } else uiSleepTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index dc8784599de..6d6843c9720 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -128,9 +128,9 @@ public: pos = i; if (i == 7 && pInstance) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } @@ -174,8 +174,8 @@ public: if (SwarmTimer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(pTarget, SPELL_CARRION_SWARM); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_CARRION_SWARM); SwarmTimer = urand(45000, 60000); switch (urand(0, 1)) @@ -195,8 +195,8 @@ public: { for (uint8 i = 0; i < 3; ++i) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - pTarget->CastSpell(pTarget, SPELL_SLEEP, true); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + target->CastSpell(target, SPELL_SLEEP, true); } SleepTimer = 60000; switch (urand(0, 1)) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 0a9745123cb..5a28f3af333 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -154,7 +154,7 @@ public: }; /* This is the script for the Doomfire Spirit Mob. This mob simply follow players or - travels in random directions if pTarget cannot be found. */ + travels in random directions if target cannot be found. */ class mob_doomfire_targetting : public CreatureScript { public: @@ -216,10 +216,10 @@ public: /* Finally, Archimonde's script. His script isn't extremely complex, most are simply spells on timers. The only complicated aspect of the battle is Finger of Death and Doomfire, with Doomfire being the hardest bit to code. Finger of Death is simply a distance check - if no one is in melee range, then - select a random pTarget and cast the spell on them. However, if someone IS in melee range, and this + select a random target and cast the spell on them. However, if someone IS in melee range, and this is NOT the main tank (creature's victim), then we aggro that player and they become the new victim. For Doomfire, we summon a mob (Doomfire Spirit) for the Doomfire mob to follow. It's spirit will - randomly select it's pTarget to follow and then we create the random movement making it unpredictable. */ + randomly select it's target to follow and then we create the random movement making it unpredictable. */ class boss_archimonde : public CreatureScript { @@ -367,13 +367,13 @@ public: return false; targets.sort(Trinity::ObjectDistanceOrderPred(me)); - Unit* pTarget = targets.front(); - if (pTarget) + Unit* target = targets.front(); + if (target) { - if (!me->IsWithinDistInMap(pTarget, me->GetAttackDistance(pTarget))) + if (!me->IsWithinDistInMap(target, me->GetAttackDistance(target))) return true; // Cast Finger of Death else // This target is closest, he is our new tank - me->AddThreat(pTarget, me->getThreatManager().getThreat(me->getVictim())); + me->AddThreat(target, me->getThreatManager().getThreat(me->getVictim())); } return false; @@ -409,14 +409,14 @@ public: } //this is code doing close to what the summoning spell would do (spell 31903) - void SummonDoomfire(Unit* pTarget) + void SummonDoomfire(Unit* target) { me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, - pTarget->GetPositionX()+15.0f, pTarget->GetPositionY()+15.0f, pTarget->GetPositionZ(), 0, + target->GetPositionX()+15.0f, target->GetPositionY()+15.0f, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 27000); me->SummonCreature(CREATURE_DOOMFIRE, - pTarget->GetPositionX()-15.0f, pTarget->GetPositionY()-15.0f, pTarget->GetPositionZ(), 0, + target->GetPositionX()-15.0f, target->GetPositionY()-15.0f, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 27000); } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 7ec1cbed785..25474b47c0f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -121,9 +121,9 @@ public: pos = i; if (i == 7 && pInstance) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index ef6d4a4dcbe..f258444eb62 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -116,9 +116,9 @@ public: pos = i; if (i == 7 && pInstance) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } @@ -181,10 +181,10 @@ public: std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { - Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()); - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->getPowerType() == POWER_MANA) + Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); + if (target && target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() == POWER_MANA) { - pTarget->CastSpell(pTarget, SPELL_MARK, true);//only cast on mana users + target->CastSpell(target, SPELL_MARK, true);//only cast on mana users } } MarkTimerBase -= 5000; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index a40a431a620..e2e9372522f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -112,9 +112,9 @@ public: pos = i; if (i == 7 && pInstance) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 636354b367e..1d1b1902188 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -890,18 +890,18 @@ void hyjalAI::UpdateAI(const uint32 diff) if (me->IsNonMeleeSpellCasted(false)) me->InterruptNonMeleeSpells(false); - Unit* pTarget = NULL; + Unit* target = NULL; switch(Spells[i].TargetType) { - case TARGETTYPE_SELF: pTarget = me; break; - case TARGETTYPE_RANDOM: pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); break; - case TARGETTYPE_VICTIM: pTarget = me->getVictim(); break; + case TARGETTYPE_SELF: target = me; break; + case TARGETTYPE_RANDOM: target = SelectTarget(SELECT_TARGET_RANDOM, 0); break; + case TARGETTYPE_VICTIM: target = me->getVictim(); break; } - if (pTarget && pTarget->isAlive()) + if (target && target->isAlive()) { - DoCast(pTarget, Spells[i].SpellId); + DoCast(target, Spells[i].SpellId); SpellTimer[i] = Spells[i].Cooldown; } } else SpellTimer[i] -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 972267a4cca..a3d5e4886e0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -434,9 +434,9 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } } @@ -475,9 +475,9 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT) && !pInstance->GetData(DATA_HORDE_RETREAT)) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } else if (pInstance->GetData(DATA_ALLIANCE_RETREAT) && pInstance->GetData(DATA_HORDE_RETREAT)){ //do overrun } @@ -562,13 +562,13 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); }else{ - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } if (i == LastOverronPos && IsOverrun) @@ -667,13 +667,13 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); }else{ - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } if (i == LastOverronPos && IsOverrun) @@ -768,9 +768,9 @@ public: void JustSummoned(Creature* summon) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true); - if (pTarget && summon) - summon->Attack(pTarget, false); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true); + if (target && summon) + summon->Attack(target, false); summons.Summon(summon); } void SummonedCreatureDespawn(Creature* summon) {summons.Despawn(summon);} @@ -781,13 +781,13 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); }else{ - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } } @@ -897,13 +897,13 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); }else{ - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } } @@ -998,13 +998,13 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); }else{ - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } } @@ -1090,13 +1090,13 @@ public: { if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); }else{ - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); - if (pTarget && pTarget->isAlive()) - me->AddThreat(pTarget, 0.0f); + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE)); + if (target && target->isAlive()) + me->AddThreat(target, 0.0f); } } } @@ -1184,11 +1184,11 @@ public: pos = i; if (i == 2 && pInstance && !IsOverrun) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) { - me->AddThreat(pTarget, 0.0f); - DoCast(pTarget, SPELL_FROST_BREATH, true); + me->AddThreat(target, 0.0f); + DoCast(target, SPELL_FROST_BREATH, true); } } } @@ -1306,11 +1306,11 @@ public: pos = i; if (i == 2 && pInstance && !IsOverrun) { - Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); - if (pTarget && pTarget->isAlive()) + Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL)); + if (target && target->isAlive()) { - me->AddThreat(pTarget, 0.0f); - DoCast(pTarget, SPELL_GARGOYLE_STRIKE, true); + me->AddThreat(target, 0.0f); + DoCast(target, SPELL_GARGOYLE_STRIKE, true); } } } @@ -1373,9 +1373,9 @@ public: forcemove = false; if (forcemove) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget) - me->Attack(pTarget, false); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target) + me->Attack(target, false); } if (MoveTimer <= diff) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp index 882c7240ae3..b0b75c53e52 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp @@ -104,8 +104,8 @@ public: if (uiCurseOfExertionTimer < diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(pTarget, SPELL_CURSE_OF_EXERTION); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_CURSE_OF_EXERTION); uiCurseOfExertionTimer = 9300; } else uiCurseOfExertionTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp index 28378daf7ab..c37b0205603 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp @@ -171,8 +171,8 @@ public: if (uiMindBlastTimer < diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(pTarget, SPELL_MIND_BLAST); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_MIND_BLAST); uiMindBlastTimer = 6000; } else uiMindBlastTimer -= diff; @@ -185,8 +185,8 @@ public: if (uiSleepTimer < diff) { DoScriptText(RAND(SAY_SLEEP_1, SAY_SLEEP_2), me); - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(pTarget, SPELL_SLEEP); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_SLEEP); uiSleepTimer = urand(15000, 20000); } else uiSleepTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp index 9f4f46c2dd3..7f5ef2cb36e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp @@ -108,8 +108,8 @@ public: if (uiChainTimer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(pTarget, SPELL_CONSTRICTING_CHAINS); //anyone but the tank + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_CONSTRICTING_CHAINS); //anyone but the tank uiChainTimer = urand(2000, 4000); } else uiChainTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp index 46d8936670f..782d70070bd 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp @@ -117,8 +117,8 @@ public: //Shadow bolt timer if (uiShadowBoltTimer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_SHADOW_BOLT); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SHADOW_BOLT); uiShadowBoltTimer = urand(8000, 12000); } else uiShadowBoltTimer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp index 2d6256e4666..092ee779d75 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp @@ -124,8 +124,8 @@ public: //Arcane Discharge if (ArcaneDischarge_Timer <= diff) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - DoCast(pTarget, SPELL_ARCANE_DISCHARGE); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + DoCast(target, SPELL_ARCANE_DISCHARGE); ArcaneDischarge_Timer = 20000+rand()%10000; } else ArcaneDischarge_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index 45d28c6785b..a965fb74517 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -119,8 +119,8 @@ public: if (WingBuffet_Timer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_WING_BUFFET); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_WING_BUFFET); WingBuffet_Timer = 25000+rand()%10000; } else WingBuffet_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp index ea70cf6de3f..8b6b1bc26dc 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp @@ -69,10 +69,10 @@ public: //Wrath if (Wrath_Timer <= diff) { - Unit* pTarget = NULL; - pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget) - DoCast(pTarget, SPELL_WRATH); + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target) + DoCast(target, SPELL_WRATH); Wrath_Timer = 8000; } else Wrath_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp index f7b98988cd4..caa2327511c 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp @@ -81,10 +81,10 @@ public: //Boulder_Timer if (Boulder_Timer <= diff) { - Unit* pTarget = NULL; - pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget) - DoCast(pTarget, SPELL_BOULDER); + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target) + DoCast(target, SPELL_BOULDER); Boulder_Timer = 10000; } else Boulder_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index 196cbc218d2..7e9aac30a74 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -200,8 +200,8 @@ public: void JustSummoned(Creature* pSummoned) { pSummoned->SetInCombatWithZone(); - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(target); switch (pSummoned->GetEntry()) { @@ -457,8 +457,8 @@ public: { if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_FIREBALL); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_FIREBALL); m_uiFireballTimer = 8000; } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index b9c6c452fd7..a5efb416b76 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -193,13 +193,13 @@ public: //Charge_Timer if (Charge_Timer <= diff) { - Unit* pTarget = NULL; - pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget) + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target) { - DoCast(pTarget, SPELL_CHARGE); - //me->SendMonsterMove(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, true, 1); - AttackStart(pTarget); + DoCast(target, SPELL_CHARGE); + //me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1); + AttackStart(target); } Charge_Timer = 8000 + rand()%8000; @@ -273,10 +273,10 @@ public: for (uint8 i = 0; i < 10; ++i) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); Creature* Summoned = me->SummonCreature(15621, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000); - if (Summoned && pTarget) - Summoned->AI()->AttackStart(pTarget); + if (Summoned && target) + Summoned->AI()->AttackStart(target); } } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index ff9a593c08e..b7d37279b8b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -241,9 +241,9 @@ public: void SpawnEyeTentacle(float x, float y) { if (Creature* Spawned = DoSpawnCreature(MOB_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500)) - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) if (Spawned->AI()) - Spawned->AI()->AttackStart(pTarget); + Spawned->AI()->AttackStart(target); } void UpdateAI(const uint32 diff) @@ -284,13 +284,13 @@ public: if (BeamTimer <= diff) { //SPELL_GREEN_BEAM - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { me->InterruptNonMeleeSpells(false); - DoCast(pTarget, SPELL_GREEN_BEAM); + DoCast(target, SPELL_GREEN_BEAM); //Correctly update our target - me->SetUInt64Value(UNIT_FIELD_TARGET, pTarget->GetGUID()); + me->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); } //Beam every 3 seconds @@ -300,15 +300,15 @@ public: //ClawTentacleTimer if (ClawTentacleTimer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { Creature* Spawned = NULL; //Spawn claw tentacle on the random target - Spawned = me->SummonCreature(MOB_CLAW_TENTACLE, *pTarget, TEMPSUMMON_CORPSE_DESPAWN, 500); + Spawned = me->SummonCreature(MOB_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500); if (Spawned && Spawned->AI()) - Spawned->AI()->AttackStart(pTarget); + Spawned->AI()->AttackStart(target); } //One claw tentacle every 12.5 seconds @@ -328,10 +328,10 @@ public: me->SetUInt64Value(UNIT_FIELD_TARGET, 0); //Select random target for dark beam to start on - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { //Face our target - DarkGlareAngle = me->GetAngle(pTarget); + DarkGlareAngle = me->GetAngle(target); DarkGlareTickTimer = 1000; DarkGlareTick = 0; ClockWise = RAND(true, false); @@ -558,8 +558,8 @@ public: Creature* Spawned; Spawned = DoSpawnCreature(MOB_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500); if (Spawned && Spawned->AI()) - if (Unit* pTarget = SelectRandomNotStomach()) - Spawned->AI()->AttackStart(pTarget); + if (Unit* target = SelectRandomNotStomach()) + Spawned->AI()->AttackStart(target); } Unit* SelectRandomNotStomach() @@ -787,13 +787,13 @@ public: //Stomach Enter Timer if (StomachEnterTimer <= diff) { - if (Unit* pTarget = SelectRandomNotStomach()) + if (Unit* target = SelectRandomNotStomach()) { //Set target in stomach - Stomach_Map[pTarget->GetGUID()] = true; - pTarget->InterruptNonMeleeSpells(false); - pTarget->CastSpell(pTarget, SPELL_MOUTH_TENTACLE, true, NULL, NULL, me->GetGUID()); - StomachEnterTarget = pTarget->GetGUID(); + Stomach_Map[target->GetGUID()] = true; + target->InterruptNonMeleeSpells(false); + target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, me->GetGUID()); + StomachEnterTarget = target->GetGUID(); StomachEnterVisTimer = 3800; } @@ -820,12 +820,12 @@ public: //GientClawTentacleTimer if (GiantClawTentacleTimer <= diff) { - if (Unit* pTarget = SelectRandomNotStomach()) + if (Unit* target = SelectRandomNotStomach()) { //Spawn claw tentacle on the random target - if (Creature* spawned = me->SummonCreature(MOB_GIANT_CLAW_TENTACLE, *pTarget, TEMPSUMMON_CORPSE_DESPAWN, 500)) + if (Creature* spawned = me->SummonCreature(MOB_GIANT_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500)) if (spawned->AI()) - spawned->AI()->AttackStart(pTarget); + spawned->AI()->AttackStart(target); } //One giant claw tentacle every minute @@ -835,12 +835,12 @@ public: //GiantEyeTentacleTimer if (GiantEyeTentacleTimer <= diff) { - if (Unit* pTarget = SelectRandomNotStomach()) + if (Unit* target = SelectRandomNotStomach()) { //Spawn claw tentacle on the random target - if (Creature* spawned = me->SummonCreature(MOB_GIANT_EYE_TENTACLE, *pTarget, TEMPSUMMON_CORPSE_DESPAWN, 500)) + if (Creature* spawned = me->SummonCreature(MOB_GIANT_EYE_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500)) if (spawned->AI()) - spawned->AI()->AttackStart(pTarget); + spawned->AI()->AttackStart(target); } //One giant eye tentacle every minute @@ -988,9 +988,9 @@ public: //MindflayTimer if (MindflayTimer <= diff) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget && !pTarget->HasAura(SPELL_DIGESTIVE_ACID)) - DoCast(pTarget, SPELL_MIND_FLAY); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID)) + DoCast(target, SPELL_MIND_FLAY); //Mindflay every 10 seconds MindflayTimer = 10000; @@ -1064,16 +1064,16 @@ public: //Dissapear and reappear at new position me->SetVisible(false); - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (!pTarget) + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (!target) { me->Kill(me); return; } - if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID)) + if (!target->HasAura(SPELL_DIGESTIVE_ACID)) { - me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0); + me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); if (Creature* pPortal = me->SummonCreature(MOB_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN)) { pPortal->SetReactState(REACT_PASSIVE); @@ -1083,7 +1083,7 @@ public: GroundRuptureTimer = 500; HamstringTimer = 2000; EvadeTimer = 5000; - AttackStart(pTarget); + AttackStart(target); } me->SetVisible(true); @@ -1176,16 +1176,16 @@ public: //Dissapear and reappear at new position me->SetVisible(false); - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (!pTarget) + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (!target) { me->Kill(me); return; } - if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID)) + if (!target->HasAura(SPELL_DIGESTIVE_ACID)) { - me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0); + me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN)) { pPortal->SetReactState(REACT_PASSIVE); @@ -1196,7 +1196,7 @@ public: HamstringTimer = 2000; ThrashTimer = 5000; EvadeTimer = 5000; - AttackStart(pTarget); + AttackStart(target); } me->SetVisible(true); } else EvadeTimer -= diff; @@ -1281,9 +1281,9 @@ public: //BeamTimer if (BeamTimer <= diff) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget && !pTarget->HasAura(SPELL_DIGESTIVE_ACID)) - DoCast(pTarget, SPELL_GREEN_BEAM); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID)) + DoCast(target, SPELL_GREEN_BEAM); //Beam every 2 seconds BeamTimer = 2100; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index 26496020afa..8a40096bc33 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -136,61 +136,61 @@ public: { if (SpawnHatchlings_Timer <= diff) { - Unit* pTarget = NULL; - pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target && target->GetTypeId() == TYPEID_PLAYER) { - DoCast(pTarget, SPELL_ROOT); + DoCast(target, SPELL_ROOT); - if (DoGetThreat(pTarget)) - DoModifyThreatPercent(pTarget, -100); + if (DoGetThreat(target)) + DoModifyThreatPercent(target, -100); switch(urand(0, 2)) { case 0: - DoTeleportPlayer(pTarget, -8106.0142f, 1289.2900f, -74.419533f, 5.112f); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + DoTeleportPlayer(target, -8106.0142f, 1289.2900f, -74.419533f, 5.112f); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); + Hatchling->AI()->AttackStart(target); break; case 1: - DoTeleportPlayer(pTarget, -7990.135354f, 1155.1907f, -78.849319f, 2.608f); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + DoTeleportPlayer(target, -7990.135354f, 1155.1907f, -78.849319f, 2.608f); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); + Hatchling->AI()->AttackStart(target); break; case 2: - DoTeleportPlayer(pTarget, -8159.7753f, 1127.9064f, -76.868660f, 0.675f); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + DoTeleportPlayer(target, -8159.7753f, 1127.9064f, -76.868660f, 0.675f); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); - Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling->AI()->AttackStart(target); + Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) - Hatchling->AI()->AttackStart(pTarget); + Hatchling->AI()->AttackStart(target); break; } } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index 4e6dd4d7c32..f8cafea0ef2 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -95,8 +95,8 @@ public: // Wyvern Timer if (Wyvern_Timer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_WYVERNSTING); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_WYVERNSTING); Wyvern_Timer = 15000 + rand()%17000; } else Wyvern_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index 220bea8602d..01d26ed7726 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -111,11 +111,11 @@ public: //ChangeTarget_Timer if (Submerged && ChangeTarget_Timer <= diff) { - Unit* pTarget = NULL; - pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget) - DoTeleportTo(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + if (target) + DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); ChangeTarget_Timer = 10000 + rand()%10000; } else ChangeTarget_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 8374303bc6e..4fc02c70728 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -236,9 +236,9 @@ public: for (uint16 i = 0; i < 41; ++i) { - if (Player* pTarget = CAST_PLR(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))) + if (Player* target = CAST_PLR(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))) { - if (Group *pGrp = pTarget->GetGroup()) + if (Group *pGrp = target->GetGroup()) for (uint8 ico = 0; ico < TARGETICONCOUNT; ++ico) { //if (grp->m_targetIcons[ico] == me->GetGUID()) -- private member :( @@ -264,15 +264,15 @@ public: case 25: Images25 = true; break; } - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); Creature* Image1 = me->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000); if (Image1) { Image1->SetMaxHealth(me->GetMaxHealth() / 5); Image1->SetHealth(me->GetHealth() / 5); - if (pTarget) - Image1->AI()->AttackStart(pTarget); + if (target) + Image1->AI()->AttackStart(target); CAST_AI(boss_skeram::boss_skeramAI, Image1->AI())->IsImage = true; } @@ -281,8 +281,8 @@ public: { Image2->SetMaxHealth(me->GetMaxHealth() / 5); Image2->SetHealth(me->GetHealth() / 5); - if (pTarget) - Image2->AI()->AttackStart(pTarget); + if (target) + Image2->AI()->AttackStart(target); CAST_AI(boss_skeram::boss_skeramAI, Image2->AI())->IsImage = true; } Invisible = true; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index 50da169751b..bd66602a24b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -79,7 +79,7 @@ struct boss_twinemperorsAI : public ScriptedAI virtual bool IAmVeklor() = 0; virtual void Reset() = 0; - virtual void CastSpellOnBug(Creature* pTarget) = 0; + virtual void CastSpellOnBug(Creature* target) = 0; void TwinReset() { @@ -418,12 +418,12 @@ public: me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); } - void CastSpellOnBug(Creature* pTarget) + void CastSpellOnBug(Creature* target) { - pTarget->setFaction(14); - pTarget->AI()->AttackStart(me->getThreatManager().getHostilTarget()); - pTarget->AddAura(SPELL_MUTATE_BUG, pTarget); - pTarget->SetFullHealth(); + target->setFaction(14); + target->AI()->AttackStart(me->getThreatManager().getHostilTarget()); + target->AddAura(SPELL_MUTATE_BUG, target); + target->SetFullHealth(); } void UpdateAI(const uint32 diff) @@ -508,11 +508,11 @@ public: me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 0); } - void CastSpellOnBug(Creature* pTarget) + void CastSpellOnBug(Creature* target) { - pTarget->setFaction(14); - pTarget->AddAura(SPELL_EXPLODEBUG, pTarget); - pTarget->SetFullHealth(); + target->setFaction(14); + target->AddAura(SPELL_EXPLODEBUG, target); + target->SetFullHealth(); } void UpdateAI(const uint32 diff) @@ -542,10 +542,10 @@ public: //Blizzard_Timer if (Blizzard_Timer <= diff) { - Unit* pTarget = NULL; - pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45, true); - if (pTarget) - DoCast(pTarget, SPELL_BLIZZARD); + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45, true); + if (target) + DoCast(target, SPELL_BLIZZARD); Blizzard_Timer = 15000+rand()%15000; } else Blizzard_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index c1850b4e8ce..650463a02df 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -19,7 +19,7 @@ /* ScriptData SDName: mob_anubisath_sentinel SD%Complete: 95 -SDComment: Shadow storm is not properly implemented in core it should only pTarget ppl outside of melee range. +SDComment: Shadow storm is not properly implemented in core it should only target ppl outside of melee range. SDCategory: Temple of Ahn'Qiraj EndScriptData */ diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 9d7fcc11135..98c93ec3c34 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -142,8 +142,8 @@ public: break; case 3: me->setFaction(FACTION_HOSTILE); - if (Player* pTarget = Player::GetPlayer(*me, PlayerGUID)) - AttackStart(pTarget); + if (Player* target = Player::GetPlayer(*me, PlayerGUID)) + AttackStart(target); if (pInstance) { diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp index 035153e46f7..8bfefade07e 100644 --- a/src/server/scripts/Kalimdor/boss_azuregos.cpp +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -122,8 +122,8 @@ public: //ManaStorm_Timer if (ManaStorm_Timer <= diff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_MANASTORM); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_MANASTORM); ManaStorm_Timer = 7500 + rand()%5000; } else ManaStorm_Timer -= diff; diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp index 04cddc0c272..7baa2603b10 100644 --- a/src/server/scripts/Kalimdor/silithus.cpp +++ b/src/server/scripts/Kalimdor/silithus.cpp @@ -841,7 +841,7 @@ public: void UpdateAI(const uint32 diff) { - Unit* pTarget = NULL; + Unit* target = NULL; //Player* player = me->GetPlayer(PlayerGUID); if (!Timers) @@ -888,21 +888,21 @@ public: if (!hasTarget) { if (me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414) - pTarget = me->FindNearestCreature(15423, 20, true); + target = me->FindNearestCreature(15423, 20, true); if (me->GetEntry() == 15423) { uint8 tar = urand(0, 2); if (tar == 0) - pTarget = me->FindNearestCreature(15422, 20, true); + target = me->FindNearestCreature(15422, 20, true); else if (tar == 1) - pTarget = me->FindNearestCreature(15424, 20, true); + target = me->FindNearestCreature(15424, 20, true); else if (tar == 2) - pTarget = me->FindNearestCreature(15414, 20, true); + target = me->FindNearestCreature(15414, 20, true); } hasTarget = true; - if (pTarget) - me->AI()->AttackStart(pTarget); + if (target) + me->AI()->AttackStart(target); } if (!(me->FindNearestCreature(15379, 60))) DoCast(me, 33652); diff --git a/src/server/scripts/Kalimdor/thunder_bluff.cpp b/src/server/scripts/Kalimdor/thunder_bluff.cpp index e9766280aa1..36c81eecb9c 100644 --- a/src/server/scripts/Kalimdor/thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/thunder_bluff.cpp @@ -99,9 +99,9 @@ public: if (BerserkerCharge_Timer <= diff) { - Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (pTarget) - DoCast(pTarget, SPELL_BERSERKER_CHARGE); + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target) + DoCast(target, SPELL_BERSERKER_CHARGE); BerserkerCharge_Timer = 25000; } else BerserkerCharge_Timer -= diff; |
