diff options
author | Bootz <Stage6Dev@EMPulseGaming.com> | 2011-10-07 10:48:56 -0500 |
---|---|---|
committer | Bootz <Stage6Dev@EMPulseGaming.com> | 2011-10-07 10:48:56 -0500 |
commit | f1ccb83dc07c0036f832d38e7988816719ada43c (patch) | |
tree | 3a789b8542945b31a351a46dc2eb98243b24c469 /src/server/scripts/Outland | |
parent | e23fe1845fbe876f2ce50ebd25e3b135e5c2f1e2 (diff) |
REPO: Code-style change
* Fixed pUnit-unit
Diffstat (limited to 'src/server/scripts/Outland')
13 files changed, 108 insertions, 108 deletions
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index 66ef35f7400..21ecab02293 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -185,14 +185,14 @@ public: void RevertThreatOnTarget(uint64 guid) { - Unit* pUnit = NULL; - pUnit = Unit::GetUnit((*me), guid); - if (pUnit) + Unit* unit = NULL; + unit = Unit::GetUnit((*me), guid); + if (unit) { - if (DoGetThreat(pUnit)) - DoModifyThreatPercent(pUnit, -100); + if (DoGetThreat(unit)) + DoModifyThreatPercent(unit, -100); if (TargetThreat) - me->AddThreat(pUnit, TargetThreat); + me->AddThreat(unit, TargetThreat); } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 612065d5ee6..d602b4d2aac 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1474,9 +1474,9 @@ public: std::vector<Unit*> eliteList; for (std::list<HostileReference*>::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) { - Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); - if (pUnit && pUnit->GetEntry() == ILLIDARI_ELITE) - eliteList.push_back(pUnit); + Unit* unit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); + if (unit && unit->GetEntry() == ILLIDARI_ELITE) + eliteList.push_back(unit); } for (std::vector<Unit*>::const_iterator itr = eliteList.begin(); itr != eliteList.end(); ++itr) (*itr)->setDeathState(JUST_DIED); diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 4d79098689c..62e33f0913b 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -165,12 +165,12 @@ public: float Z = TeleportPoint[random].z; for (uint8 i = 0; i < 3; ++i) { - Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 1); - if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) + Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 1); + if (unit && unit->isAlive() && (unit->GetTypeId() == TYPEID_PLAYER)) { - TargetGUID[i] = pUnit->GetGUID(); - pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true); - DoTeleportPlayer(pUnit, X, Y, Z, pUnit->GetOrientation()); + TargetGUID[i] = unit->GetGUID(); + unit->CastSpell(unit, SPELL_TELEPORT_VISUAL, true); + DoTeleportPlayer(unit, X, Y, Z, unit->GetOrientation()); } } } @@ -247,12 +247,12 @@ public: { for (uint8 i = 0; i < 3; ++i) { - Unit* pUnit = NULL; + Unit* unit = NULL; if (TargetGUID[i]) { - pUnit = Unit::GetUnit((*me), TargetGUID[i]); - if (pUnit) - pUnit->CastSpell(pUnit, SPELL_ATTRACTION, true); + unit = Unit::GetUnit((*me), TargetGUID[i]); + if (unit) + unit->CastSpell(unit, SPELL_ATTRACTION, true); TargetGUID[i] = 0; } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 746ad9aa7ff..c3bb4ee3d2b 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -216,12 +216,12 @@ public: std::list<HostileReference*>::const_iterator itr = m_threatlist.begin(); for (; itr != m_threatlist.end(); ++itr) { - Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); - if (pUnit) + Unit* unit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); + if (unit) { - DoModifyThreatPercent(pUnit, -100); - float threat = target->getThreatManager().getThreat(pUnit); - me->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences). + DoModifyThreatPercent(unit, -100); + float threat = target->getThreatManager().getThreat(unit); + me->AddThreat(unit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences). } } } @@ -438,9 +438,9 @@ public: std::list<HostileReference*>::const_iterator itr = m_threatlist.begin(); for (; itr != m_threatlist.end(); ++itr) { - Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); - if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) // Only alive players - targets.push_back(pUnit); + Unit* unit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); + if (unit && unit->isAlive() && (unit->GetTypeId() == TYPEID_PLAYER)) // Only alive players + targets.push_back(unit); } if (targets.empty()) return; // No targets added for some reason. No point continuing. diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 04646fb10bc..cced0207ca1 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -821,14 +821,14 @@ public: { bool Yelled = false; for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr) - if (Creature* pUnit = Unit::GetCreature(*me, *itr)) + if (Creature* unit = Unit::GetCreature(*me, *itr)) { if (!Yelled) { - DoScriptText(SAY_BROKEN_FREE_01, pUnit); + DoScriptText(SAY_BROKEN_FREE_01, unit); Yelled = true; } - pUnit->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); + unit->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); } } ++EndingTalkCount; @@ -838,9 +838,9 @@ public: if (!BrokenList.empty()) { for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr) - if (Creature* pUnit = Unit::GetCreature(*me, *itr)) + if (Creature* unit = Unit::GetCreature(*me, *itr)) // This is the incorrect spell, but can't seem to find the right one. - pUnit->CastSpell(pUnit, 39656, true); + unit->CastSpell(unit, 39656, true); } ++EndingTalkCount; SoulRetrieveTimer = 5000; @@ -849,8 +849,8 @@ public: if (!BrokenList.empty()) { for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr) - if (Creature* pUnit = Unit::GetCreature((*me), *itr)) - pUnit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0); + if (Creature* unit = Unit::GetCreature((*me), *itr)) + unit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0); } SoulRetrieveTimer = 0; break; diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index 4b235906505..6785f7e4e9e 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -177,13 +177,13 @@ public: std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); for (i = m_threatlist.begin(); i!= m_threatlist.end(); ++i) { - Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid()); - if (pUnit && me->IsWithinMeleeRange(pUnit)) + Unit* unit = Unit::GetUnit((*me), (*i)->getUnitGuid()); + if (unit && me->IsWithinMeleeRange(unit)) { - if (pUnit->GetHealth() > health) + if (unit->GetHealth() > health) { - health = pUnit->GetHealth(); - target = pUnit; + health = unit->GetHealth(); + target = unit; } } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 0d3301ec29b..53e5fae888e 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -173,9 +173,9 @@ public: std::list<Unit*> targets; for (; itr != m_threatlist.end(); ++itr) { - Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); - if (pUnit && pUnit->isAlive()) - targets.push_back(pUnit); + Unit* unit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); + if (unit && unit->isAlive()) + targets.push_back(unit); } targets.sort(Trinity::ObjectDistanceOrderPred(me)); Unit* target = targets.front(); @@ -322,11 +322,11 @@ public: std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); for (i = m_threatlist.begin(); i != m_threatlist.end(); ++i) { - Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid()); - if (pUnit && pUnit->isAlive()) + Unit* unit = Unit::GetUnit((*me), (*i)->getUnitGuid()); + if (unit && unit->isAlive()) { - float threat = DoGetThreat(pUnit); - Blossom->AddThreat(pUnit, threat); + float threat = DoGetThreat(unit); + Blossom->AddThreat(unit, threat); } } } @@ -389,9 +389,9 @@ public: Done = true; if (AggroTargetGUID) { - Unit* pUnit = Unit::GetUnit((*me), AggroTargetGUID); - if (pUnit) - AttackStart(pUnit); + Unit* unit = Unit::GetUnit((*me), AggroTargetGUID); + if (unit) + AttackStart(unit); DoZoneInCombat(); } diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index 7d698559197..71ee7d06f32 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -419,10 +419,10 @@ struct boss_illidari_councilAI : public ScriptedAI { for (uint8 i = 0; i < 4; ++i) { - if (Unit* pUnit = Unit::GetUnit(*me, Council[i])) - if (pUnit != me && pUnit->getVictim()) + if (Unit* unit = Unit::GetUnit(*me, Council[i])) + if (unit != me && unit->getVictim()) { - AttackStart(pUnit->getVictim()); + AttackStart(unit->getVictim()); return; } } @@ -437,11 +437,11 @@ struct boss_illidari_councilAI : public ScriptedAI damage /= 4; for (uint8 i = 0; i < 4; ++i) { - if (Creature* pUnit = Unit::GetCreature(*me, Council[i])) - if (pUnit != me && damage < pUnit->GetHealth()) + if (Creature* unit = Unit::GetCreature(*me, Council[i])) + if (unit != me && damage < unit->GetHealth()) { - pUnit->ModifyHealth(-int32(damage)); - pUnit->LowerPlayerDamageReq(damage); + unit->ModifyHealth(-int32(damage)); + unit->LowerPlayerDamageReq(damage); } } } @@ -504,15 +504,15 @@ public: Unit* SelectCouncilMember() { - Unit* pUnit = me; + Unit* unit = me; uint32 member = 0; // He chooses Lady Malande most often if (rand()%10 == 0) // But there is a chance he picks someone else. member = urand(1, 3); if (member != 2) // No need to create another pointer to us using Unit::GetUnit - pUnit = Unit::GetUnit((*me), Council[member]); - return pUnit; + unit = Unit::GetUnit((*me), Council[member]); + return unit; } void CastAuraOnCouncil() @@ -525,9 +525,9 @@ public: } for (uint8 i = 0; i < 4; ++i) { - Unit* pUnit = Unit::GetUnit((*me), Council[i]); - if (pUnit) - pUnit->CastSpell(pUnit, spellid, true, 0, 0, me->GetGUID()); + Unit* unit = Unit::GetUnit((*me), Council[i]); + if (unit) + unit->CastSpell(unit, spellid, true, 0, 0, me->GetGUID()); } } @@ -538,12 +538,12 @@ public: if (BlessingTimer <= diff) { - if (Unit* pUnit = SelectCouncilMember()) + if (Unit* unit = SelectCouncilMember()) { switch (urand(0, 1)) { - case 0: DoCast(pUnit, SPELL_BLESS_SPELLWARD); break; - case 1: DoCast(pUnit, SPELL_BLESS_PROTECTION); break; + case 0: DoCast(unit, SPELL_BLESS_SPELLWARD); break; + case 1: DoCast(unit, SPELL_BLESS_PROTECTION); break; } } BlessingTimer = 60000; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 6564972fd46..141e5d1c277 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -707,15 +707,15 @@ public: if (Heal_Timer <= diff) { // It can be cast on any of the mobs - Unit* pUnit = NULL; + Unit* unit = NULL; - while (pUnit == NULL || !pUnit->isAlive()) + while (unit == NULL || !unit->isAlive()) { - pUnit = selectAdvisorUnit(); + unit = selectAdvisorUnit(); } - if (pUnit && pUnit->isAlive()) - DoCast(pUnit, SPELL_HEAL); + if (unit && unit->isAlive()) + DoCast(unit, SPELL_HEAL); Heal_Timer = 60000; } else Heal_Timer -= diff; @@ -724,26 +724,26 @@ public: Unit* selectAdvisorUnit() { - Unit* pUnit = NULL; + Unit* unit = NULL; if (pInstance) { switch (rand()%4) { case 0: - pUnit = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESS)); + unit = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESS)); break; case 1: - pUnit = Unit::GetUnit((*me), pInstance->GetData64(DATA_SHARKKIS)); + unit = Unit::GetUnit((*me), pInstance->GetData64(DATA_SHARKKIS)); break; case 2: - pUnit = Unit::GetUnit((*me), pInstance->GetData64(DATA_TIDALVESS)); + unit = Unit::GetUnit((*me), pInstance->GetData64(DATA_TIDALVESS)); break; case 3: - pUnit = me; + unit = me; break; } - } else pUnit = me; - return pUnit; + } else unit = me; + return unit; } }; }; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index f3da63af38b..e1b3ab1308f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -96,9 +96,9 @@ public: } void JustDied(Unit* /*victim*/) { - Unit* pUnit = Unit::GetUnit((*me), victimGUID); - if (pUnit && pUnit->HasAura(SPELL_INSIDIOUS_WHISPER)) - pUnit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); + Unit* unit = Unit::GetUnit((*me), victimGUID); + if (unit && unit->HasAura(SPELL_INSIDIOUS_WHISPER)) + unit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); } void DamageTaken(Unit* done_by, uint32 &damage) @@ -353,13 +353,13 @@ public: { if (InnderDemon[i] > 0) { - Creature* pUnit = Unit::GetCreature((*me), InnderDemon[i]); - if (pUnit && pUnit->isAlive()) + Creature* unit = Unit::GetCreature((*me), InnderDemon[i]); + if (unit && unit->isAlive()) { - Unit* unit_target = Unit::GetUnit(*pUnit, CAST_AI(mob_inner_demon::mob_inner_demonAI, pUnit->AI())->victimGUID); + Unit* unit_target = Unit::GetUnit(*unit, CAST_AI(mob_inner_demon::mob_inner_demonAI, unit->AI())->victimGUID); if (unit_target && unit_target->isAlive()) { - pUnit->CastSpell(unit_target, SPELL_CONSUMING_MADNESS, true); + unit->CastSpell(unit_target, SPELL_CONSUMING_MADNESS, true); DoModifyThreatPercent(unit_target, -100); } } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 2692d6f12da..12da67f94b5 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -770,8 +770,8 @@ class boss_kaelthas : public CreatureScript if (FlameStrike_Timer <= diff) { - if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pUnit, SPELL_FLAME_STRIKE); + if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(unit, SPELL_FLAME_STRIKE); FlameStrike_Timer = 30000; } @@ -784,7 +784,7 @@ class boss_kaelthas : public CreatureScript for (uint32 i = 0; i < 3; ++i) { sLog->outDebug(LOG_FILTER_TSCR, "SD2: Kael'Thas mind control not supported."); - //DoCast(pUnit, SPELL_MIND_CONTROL); + //DoCast(unit, SPELL_MIND_CONTROL); } MindControl_Timer = 60000; @@ -892,11 +892,11 @@ class boss_kaelthas : public CreatureScript // 1) Kael'thas will portal the whole raid right into his body for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) { - Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid()); - if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + Unit* unit = Unit::GetUnit((*me), (*i)->getUnitGuid()); + if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) { //Use work around packet to prevent player from being dropped from combat - DoTeleportPlayer(pUnit, afGravityPos[0], afGravityPos[1], afGravityPos[2], pUnit->GetOrientation()); + DoTeleportPlayer(unit, afGravityPos[0], afGravityPos[1], afGravityPos[2], unit->GetOrientation()); } } @@ -913,20 +913,20 @@ class boss_kaelthas : public CreatureScript // 2) At that point he will put a Gravity Lapse debuff on everyone for (i = me->getThreatManager().getThreatList().begin(); i != me->getThreatManager().getThreatList().end(); ++i) { - if (Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid())) + if (Unit* unit = Unit::GetUnit((*me), (*i)->getUnitGuid())) { - DoCast(pUnit, SPELL_KNOCKBACK, true); + DoCast(unit, SPELL_KNOCKBACK, true); //Gravity lapse - needs an exception in Spell system to work - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, 0, 0, me->GetGUID()); - pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, 0, 0, me->GetGUID()); + unit->CastSpell(unit, SPELL_GRAVITY_LAPSE, true, 0, 0, me->GetGUID()); + unit->CastSpell(unit, SPELL_GRAVITY_LAPSE_AURA, true, 0, 0, me->GetGUID()); //Using packet workaround WorldPacket data(12); data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); - data.append(pUnit->GetPackGUID()); + data.append(unit->GetPackGUID()); data << uint32(0); - pUnit->SendMessageToSet(&data, true); + unit->SendMessageToSet(&data, true); } } GravityLapse_Timer = 10000; @@ -946,14 +946,14 @@ class boss_kaelthas : public CreatureScript //Remove flight for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) { - if (Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid())) + if (Unit* unit = Unit::GetUnit((*me), (*i)->getUnitGuid())) { //Using packet workaround WorldPacket data(12); data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); - data.append(pUnit->GetPackGUID()); + data.append(unit->GetPackGUID()); data << uint32(0); - pUnit->SendMessageToSet(&data, true); + unit->SendMessageToSet(&data, true); } } @@ -982,8 +982,8 @@ class boss_kaelthas : public CreatureScript //NetherBeam_Timer if (NetherBeam_Timer <= diff) { - if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pUnit, SPELL_NETHER_BEAM); + if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(unit, SPELL_NETHER_BEAM); NetherBeam_Timer = 4000; } @@ -1286,12 +1286,12 @@ class boss_grand_astromancer_capernian : public CreatureScript std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i!= m_threatlist.end(); ++i) { - Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid()); + Unit* unit = Unit::GetUnit((*me), (*i)->getUnitGuid()); //if in melee range - if (pUnit && pUnit->IsWithinDistInMap(me, 5)) + if (unit && unit->IsWithinDistInMap(me, 5)) { InMeleeRange = true; - target = pUnit; + target = unit; break; } } diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 5b2350369f0..2ae0cce2ba2 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -809,10 +809,10 @@ public: for (std::list<HostileReference*>::const_iterator itr = AggroList.begin(); itr != AggroList.end(); ++itr) { - if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) + if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { - if (pUnit->GetCreateMana() > 0) - UnitsWithMana.push_back(pUnit); + if (unit->GetCreateMana() > 0) + UnitsWithMana.push_back(unit); } } if (!UnitsWithMana.empty()) diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index b16166ed904..327964e7b1e 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -129,9 +129,9 @@ public: { if (bCanEat && !bIsEating) { - if (Unit* pUnit = Unit::GetUnit(*me, uiPlayerGUID)) + if (Unit* unit = Unit::GetUnit(*me, uiPlayerGUID)) { - if (GameObject* pGo = pUnit->FindNearestGameObject(GO_CARCASS, 10)) + if (GameObject* pGo = unit->FindNearestGameObject(GO_CARCASS, 10)) { if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) me->GetMotionMaster()->MovementExpired(); |