From f1ccb83dc07c0036f832d38e7988816719ada43c Mon Sep 17 00:00:00 2001 From: Bootz Date: Fri, 7 Oct 2011 10:48:56 -0500 Subject: REPO: Code-style change * Fixed pUnit-unit --- .../scripts/Outland/BlackTemple/boss_bloodboil.cpp | 12 +++---- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 6 ++-- .../Outland/BlackTemple/boss_mother_shahraz.cpp | 18 +++++----- .../BlackTemple/boss_reliquary_of_souls.cpp | 16 ++++----- .../Outland/BlackTemple/boss_shade_of_akama.cpp | 14 ++++---- .../scripts/Outland/BlackTemple/boss_supremus.cpp | 10 +++--- .../Outland/BlackTemple/boss_teron_gorefiend.cpp | 20 +++++------ .../Outland/BlackTemple/illidari_council.cpp | 32 ++++++++--------- .../SerpentShrine/boss_fathomlord_karathress.cpp | 24 ++++++------- .../SerpentShrine/boss_leotheras_the_blind.cpp | 14 ++++---- .../Outland/TempestKeep/Eye/boss_kaelthas.cpp | 40 +++++++++++----------- src/server/scripts/Outland/netherstorm.cpp | 6 ++-- src/server/scripts/Outland/shadowmoon_valley.cpp | 4 +-- 13 files changed, 108 insertions(+), 108 deletions(-) (limited to 'src/server/scripts/Outland') 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 eliteList; for (std::list::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::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::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::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::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::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::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::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 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::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& m_threatlist = me->getThreatManager().getThreatList(); for (std::list::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::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(); -- cgit v1.2.3 From 96d7a1e9704d8bdf55e2197ce26adbefb0a84e61 Mon Sep 17 00:00:00 2001 From: Bootz Date: Fri, 7 Oct 2011 10:54:53 -0500 Subject: REPO: code-style clean-up * Fixed pGuild->guild * Fixed pGroup->group * Fixed pOwner->owner --- src/server/game/Entities/Pet/Pet.cpp | 8 +- src/server/game/Entities/Player/Player.cpp | 28 ++-- src/server/game/Entities/Unit/Unit.cpp | 34 ++--- src/server/game/Guilds/Guild.cpp | 16 +-- src/server/game/Guilds/Guild.h | 12 +- src/server/game/Loot/LootMgr.cpp | 8 +- src/server/game/Maps/Map.cpp | 4 +- src/server/game/OutdoorPvP/OutdoorPvP.cpp | 4 +- .../Server/Protocol/Handlers/CharacterHandler.cpp | 4 +- .../game/Server/Protocol/Handlers/GuildHandler.cpp | 150 ++++++++++----------- .../game/Server/Protocol/Handlers/LootHandler.cpp | 10 +- .../game/Server/Protocol/Handlers/MiscHandler.cpp | 34 ++--- .../game/Server/Protocol/Handlers/QuestHandler.cpp | 8 +- src/server/game/Server/WorldSession.cpp | 4 +- src/server/game/Spells/Spell.cpp | 6 +- src/server/game/Spells/SpellEffects.cpp | 6 +- .../EasternKingdoms/Stratholme/stratholme.cpp | 4 +- src/server/scripts/Outland/terokkar_forest.cpp | 4 +- 18 files changed, 172 insertions(+), 172 deletions(-) (limited to 'src/server/scripts/Outland') diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 25a66206663..4150810a4ab 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -348,13 +348,13 @@ void Pet::SavePetToDB(PetSaveMode mode) if (!IS_PLAYER_GUID(GetOwnerGUID())) return; - Player* pOwner = (Player*)GetOwner(); - if (!pOwner) + Player* owner = (Player*)GetOwner(); + if (!owner) return; // not save pet as current if another pet temporary unsummoned - if (mode == PET_SAVE_AS_CURRENT && pOwner->GetTemporaryUnsummonedPetNumber() && - pOwner->GetTemporaryUnsummonedPetNumber() != m_charmInfo->GetPetNumber()) + if (mode == PET_SAVE_AS_CURRENT && owner->GetTemporaryUnsummonedPetNumber() && + owner->GetTemporaryUnsummonedPetNumber() != m_charmInfo->GetPetNumber()) { // pet will lost anyway at restore temporary unsummoned if (getPetType() == HUNTER_PET) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 579a704bd83..ac69e7c424c 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4774,8 +4774,8 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC sObjectAccessor->ConvertCorpseForPlayer(playerguid); if (uint32 guildId = GetGuildIdFromDB(playerguid)) - if (Guild* pGuild = sGuildMgr->GetGuildById(guildId)) - pGuild->DeleteMember(guid); + if (Guild* guild = sGuildMgr->GetGuildById(guildId)) + guild->DeleteMember(guid); // remove from arena teams LeaveAllArenaTeams(playerguid); @@ -5462,11 +5462,11 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g return TotalCost; } - Guild* pGuild = sGuildMgr->GetGuildById(GetGuildId()); - if (!pGuild) + Guild* guild = sGuildMgr->GetGuildById(GetGuildId()); + if (!guild) return TotalCost; - if (!pGuild->HandleMemberWithdrawMoney(GetSession(), costs, true)) + if (!guild->HandleMemberWithdrawMoney(GetSession(), costs, true)) return TotalCost; TotalCost = costs; @@ -15668,9 +15668,9 @@ void Player::AreaExploredOrEventHappens(uint32 questId) //not used in Trinityd, function for external script library void Player::GroupEventHappens(uint32 questId, WorldObject const* pEventObject) { - if (Group* pGroup = GetGroup()) + if (Group* group = GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); @@ -22374,9 +22374,9 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar uint64 creature_guid = (pRewardSource->GetTypeId() == TYPEID_UNIT) ? pRewardSource->GetGUID() : uint64(0); // prepare data for near group iteration - if (Group* pGroup = GetGroup()) + if (Group* group = GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -22390,7 +22390,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar pGroupGuy->KilledMonsterCredit(creature_id, creature_guid); } } - else // if (!pGroup) + else // if (!group) KilledMonsterCredit(creature_id, creature_guid); } @@ -22609,14 +22609,14 @@ void Player::SendCorpseReclaimDelay(bool load) Player* Player::GetNextRandomRaidMember(float radius) { - Group* pGroup = GetGroup(); - if (!pGroup) + Group* group = GetGroup(); + if (!group) return NULL; std::vector nearMembers; - nearMembers.reserve(pGroup->GetMembersCount()); + nearMembers.reserve(group->GetMembersCount()); - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6f042e7f0c4..7aeca6e4b39 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10081,9 +10081,9 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius) if (!player) return NULL; - Group* pGroup = player->GetGroup(); + Group* group = player->GetGroup(); // When there is no group check pet presence - if (!pGroup) + if (!group) { // We are pet now, return owner if (player != this) @@ -10098,9 +10098,9 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius) std::vector nearMembers; // reserve place for players and pets because resizing vector every unit push is unefficient (vector is reallocated then) - nearMembers.reserve(pGroup->GetMembersCount() * 2); + nearMembers.reserve(group->GetMembersCount() * 2); - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* Target = itr->getSource()) { // IsHostileTo check duel and controlled by enemy @@ -15682,8 +15682,8 @@ void Unit::SetStunned(bool apply) SetTarget(getVictim()->GetGUID()); // don't remove UNIT_FLAG_STUNNED for pet when owner is mounted (disabled pet's interface) - Unit* pOwner = GetOwner(); - if (!pOwner || (pOwner->GetTypeId() == TYPEID_PLAYER && !pOwner->ToPlayer()->IsMounted())) + Unit* owner = GetOwner(); + if (!owner || (owner->GetTypeId() == TYPEID_PLAYER && !owner->ToPlayer()->IsMounted())) RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); if (!HasUnitState(UNIT_STAT_ROOT)) // prevent allow move if have also root effect @@ -16183,10 +16183,10 @@ void Unit::GetRaidMember(std::list &nearMembers, float radius) if (!owner) return; - Group* pGroup = owner->GetGroup(); - if (pGroup) + Group* group = owner->GetGroup(); + if (group) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -16214,15 +16214,15 @@ void Unit::GetRaidMember(std::list &nearMembers, float radius) void Unit::GetPartyMemberInDist(std::list &TagUnitMap, float radius) { Unit* owner = GetCharmerOrOwnerOrSelf(); - Group* pGroup = NULL; + Group* group = NULL; if (owner->GetTypeId() == TYPEID_PLAYER) - pGroup = owner->ToPlayer()->GetGroup(); + group = owner->ToPlayer()->GetGroup(); - if (pGroup) + if (group) { uint8 subgroup = owner->ToPlayer()->GetSubGroup(); - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -16251,15 +16251,15 @@ void Unit::GetPartyMemberInDist(std::list &TagUnitMap, float radius) void Unit::GetPartyMembers(std::list &TagUnitMap) { Unit* owner = GetCharmerOrOwnerOrSelf(); - Group* pGroup = NULL; + Group* group = NULL; if (owner->GetTypeId() == TYPEID_PLAYER) - pGroup = owner->ToPlayer()->GetGroup(); + group = owner->ToPlayer()->GetGroup(); - if (pGroup) + if (group) { uint8 subgroup = owner->ToPlayer()->GetSubGroup(); - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index f3efde3afa1..0103b164f64 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -489,7 +489,7 @@ bool Guild::BankTab::SetItem(SQLTransaction& trans, uint8 slotId, Item* pItem) return true; } -void Guild::BankTab::SendText(const Guild* pGuild, WorldSession* session) const +void Guild::BankTab::SendText(const Guild* guild, WorldSession* session) const { WorldPacket data(MSG_QUERY_GUILD_BANK_TEXT, 1 + m_text.size() + 1); data << uint8(m_tabId); @@ -498,7 +498,7 @@ void Guild::BankTab::SendText(const Guild* pGuild, WorldSession* session) const if (session) session->SendPacket(&data); else - pGuild->BroadcastPacket(&data); + guild->BroadcastPacket(&data); } /////////////////////////////////////////////////////////////////////////////// @@ -671,7 +671,7 @@ void Guild::Member::DecreaseBankRemainingValue(SQLTransaction& trans, uint8 tabI // If (tabId == GUILD_BANK_MAX_TABS) return money amount. // Otherwise return remaining items amount for specified tab. // If reset time was more than 24 hours ago, renew reset time and reset amount to maximum value. -uint32 Guild::Member::GetBankRemainingValue(uint8 tabId, const Guild* pGuild) const +uint32 Guild::Member::GetBankRemainingValue(uint8 tabId, const Guild* guild) const { // Guild master has unlimited amount. if (IsRank(GR_GUILDMASTER)) @@ -679,7 +679,7 @@ uint32 Guild::Member::GetBankRemainingValue(uint8 tabId, const Guild* pGuild) co // Check rights for non-money tab. if (tabId != GUILD_BANK_MAX_TABS) - if ((pGuild->_GetRankBankTabRights(m_rankId, tabId) & GUILD_BANK_RIGHT_VIEW_TAB) != GUILD_BANK_RIGHT_VIEW_TAB) + if ((guild->_GetRankBankTabRights(m_rankId, tabId) & GUILD_BANK_RIGHT_VIEW_TAB) != GUILD_BANK_RIGHT_VIEW_TAB) return 0; uint32 curTime = uint32(::time(NULL) / MINUTE); // minutes @@ -688,8 +688,8 @@ uint32 Guild::Member::GetBankRemainingValue(uint8 tabId, const Guild* pGuild) co RemainingValue& rv = const_cast (m_bankRemaining[tabId]); rv.resetTime = curTime; rv.value = tabId == GUILD_BANK_MAX_TABS ? - pGuild->_GetRankBankMoneyPerDay(m_rankId) : - pGuild->_GetRankBankTabSlotsPerDay(m_rankId, tabId); + guild->_GetRankBankMoneyPerDay(m_rankId) : + guild->_GetRankBankTabSlotsPerDay(m_rankId, tabId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement( tabId == GUILD_BANK_MAX_TABS ? @@ -1293,7 +1293,7 @@ void Guild::HandleSetEmblem(WorldSession* session, const EmblemInfo& emblemInfo) { Player* player = session->GetPlayer(); if (!_IsLeader(player)) - // "Only pGuild leaders can create emblems." + // "Only guild leaders can create emblems." SendSaveEmblemResult(session, ERR_GUILDEMBLEM_NOTGUILDMASTER); else if (!player->HasEnoughMoney(EMBLEM_PRICE)) // "You can't afford to do that." @@ -1634,7 +1634,7 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount) if (!AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { sLog->outCommand(player->GetSession()->GetAccountId(), - "GM %s (Account: %u) deposit money (Amount: %u) to pGuild bank (Guild ID %u)", + "GM %s (Account: %u) deposit money (Amount: %u) to guild bank (Guild ID %u)", player->GetName(), player->GetSession()->GetAccountId(), amount, m_id); } // Log guild bank event diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index 51636dc218e..2ea345f2ca1 100755 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -473,7 +473,7 @@ private: void SetInfo(const std::string& name, const std::string& icon); void SetText(const std::string& text); - void SendText(const Guild* pGuild, WorldSession* session) const; + void SendText(const Guild* guild, WorldSession* session) const; inline Item* GetItem(uint8 slotId) const { return slotId < GUILD_BANK_MAX_SLOTS ? m_items[slotId] : NULL; } bool SetItem(SQLTransaction& trans, uint8 slotId, Item* pItem); @@ -492,7 +492,7 @@ private: class MoveItemData { public: - MoveItemData(Guild* pGuild, Player* player, uint8 container, uint8 slotId) : m_pGuild(pGuild), m_pPlayer(player), + MoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) : m_pGuild(guild), m_pPlayer(player), m_container(container), m_slotId(slotId), m_pItem(NULL), m_pClonedItem(NULL) { } virtual ~MoveItemData() { } @@ -538,8 +538,8 @@ private: class PlayerMoveItemData : public MoveItemData { public: - PlayerMoveItemData(Guild* pGuild, Player* player, uint8 container, uint8 slotId) : - MoveItemData(pGuild, player, container, slotId) { } + PlayerMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) : + MoveItemData(guild, player, container, slotId) { } bool IsBank() const { return false; } bool InitItem(); @@ -553,8 +553,8 @@ private: class BankMoveItemData : public MoveItemData { public: - BankMoveItemData(Guild* pGuild, Player* player, uint8 container, uint8 slotId) : - MoveItemData(pGuild, player, container, slotId) { } + BankMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) : + MoveItemData(guild, player, container, slotId) { } bool IsBank() const { return true; } bool InitItem(); diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index c8063ccb818..eff811b14eb 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -430,19 +430,19 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo tab->Process(*this, store.IsRatesAllowed(), lootMode); // Processing is done there, callback via Loot::AddItem() // Setting access rights for group loot case - Group* pGroup = lootOwner->GetGroup(); - if (!personal && pGroup) + Group* group = lootOwner->GetGroup(); + if (!personal && group) { roundRobinPlayer = lootOwner->GetGUID(); - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* pl = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter FillNotNormalLootFor(pl, pl->IsAtGroupRewardDistance(lootOwner)); for (uint8 i = 0; i < items.size(); ++i) { if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(items[i].itemid)) - if (proto->Quality < uint32(pGroup->GetLootThreshold())) + if (proto->Quality < uint32(group->GetLootThreshold())) items[i].is_underthreshold = true; } } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index e122c5bffae..b283227bb58 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2240,8 +2240,8 @@ bool InstanceMap::CanEnter(Player* player) } // cannot enter while an encounter is in progress on raids - /*Group* pGroup = player->GetGroup(); - if (!player->isGameMaster() && pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/ + /*Group* group = player->GetGroup(); + if (!player->isGameMaster() && group && group->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/ if (IsRaid() && GetInstanceScript() && GetInstanceScript()->IsEncounterInProgress()) { player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 6cab6110741..b925150ef71 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -432,9 +432,9 @@ void OPvPCapturePoint::SendObjectiveComplete(uint32 id, uint64 guid) void OutdoorPvP::HandleKill(Player* killer, Unit* killed) { - if (Group* pGroup = killer->GetGroup()) + if (Group* group = killer->GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index dc57baff7fe..13bbacaf878 100755 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -883,8 +883,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) if (pCurrChar->GetGuildId() != 0) { - if (Guild* pGuild = sGuildMgr->GetGuildById(pCurrChar->GetGuildId())) - pGuild->SendLoginInfo(this); + if (Guild* guild = sGuildMgr->GetGuildById(pCurrChar->GetGuildId())) + guild->SendLoginInfo(this); else { // remove wrong guild data diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp index e8f6f05ee67..7e964b4faf6 100755 --- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp @@ -33,8 +33,8 @@ inline Guild* _GetPlayerGuild(WorldSession* session, bool sendError = false) { if (uint32 guildId = session->GetPlayer()->GetGuildId()) // If guild id = 0, player is not in guild - if (Guild* pGuild = sGuildMgr->GetGuildById(guildId)) // Find guild by id - return pGuild; + if (Guild* guild = sGuildMgr->GetGuildById(guildId)) // Find guild by id + return guild; if (sendError) Guild::SendCommandResult(session, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD); return NULL; @@ -47,8 +47,8 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket) uint32 guildId; recvPacket >> guildId; // Use received guild id to access guild method (not player's guild id) - if (Guild* pGuild = sGuildMgr->GetGuildById(guildId)) - pGuild->HandleQuery(this); + if (Guild* guild = sGuildMgr->GetGuildById(guildId)) + guild->HandleQuery(this); else Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD); } @@ -62,11 +62,11 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket) if (!GetPlayer()->GetGuildId()) // Player cannot be in guild { - Guild* pGuild = new Guild(); - if (pGuild->Create(GetPlayer(), name)) - sGuildMgr->AddGuild(pGuild); + Guild* guild = new Guild(); + if (guild->Create(GetPlayer(), name)) + sGuildMgr->AddGuild(guild); else - delete pGuild; + delete guild; } } @@ -78,8 +78,8 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket) recvPacket >> invitedName; if (normalizePlayerName(invitedName)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleInviteMember(this, invitedName); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleInviteMember(this, invitedName); } void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket) @@ -90,8 +90,8 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket) recvPacket >> playerName; if (normalizePlayerName(playerName)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleRemoveMember(this, playerName); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleRemoveMember(this, playerName); } void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/) @@ -100,8 +100,8 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/) // Player cannot be in guild if (!GetPlayer()->GetGuildId()) // Guild where player was invited must exist - if (Guild* pGuild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited())) - pGuild->HandleAcceptMember(this); + if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited())) + guild->HandleAcceptMember(this); } void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/) @@ -116,16 +116,16 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INFO"); - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->SendInfo(this); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->SendInfo(this); } void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ROSTER"); - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->HandleRoster(this); + if (Guild* guild = _GetPlayerGuild(this)) + guild->HandleRoster(this); } void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket) @@ -136,8 +136,8 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket) recvPacket >> playerName; if (normalizePlayerName(playerName)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleUpdateMemberRank(this, playerName, false); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleUpdateMemberRank(this, playerName, false); } void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket) @@ -148,24 +148,24 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket) recvPacket >> playerName; if (normalizePlayerName(playerName)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleUpdateMemberRank(this, playerName, true); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleUpdateMemberRank(this, playerName, true); } void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_LEAVE"); - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleLeaveMember(this); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleLeaveMember(this); } void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DISBAND"); - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleDisband(this); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleDisband(this); } void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket) @@ -176,8 +176,8 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket) recvPacket >> name; if (normalizePlayerName(name)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleSetLeader(this, name); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleSetLeader(this, name); } void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket) @@ -188,8 +188,8 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket) if (!recvPacket.empty()) recvPacket >> motd; - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleSetMOTD(this, motd); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleSetMOTD(this, motd); } void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket) @@ -203,8 +203,8 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket) recvPacket >> publicNote; if (normalizePlayerName(playerName)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleSetMemberNote(this, playerName, publicNote, false); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleSetMemberNote(this, playerName, publicNote, false); } void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket) @@ -218,16 +218,16 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket) recvPacket >> officerNote; if (normalizePlayerName(playerName)) - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleSetMemberNote(this, playerName, officerNote, true); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleSetMemberNote(this, playerName, officerNote, true); } void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_RANK"); - Guild* pGuild = _GetPlayerGuild(this, true); - if (!pGuild) + Guild* guild = _GetPlayerGuild(this, true); + if (!guild) { recvPacket.rpos(recvPacket.wpos()); return; @@ -257,7 +257,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket) rightsAndSlots[tabId] = GuildBankRightsAndSlots(uint8(bankRights), slots); } - pGuild->HandleSetRankInfo(this, rankId, rankName, rights, money, rightsAndSlots); + guild->HandleSetRankInfo(this, rankId, rankName, rights, money, rightsAndSlots); } void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket) @@ -267,16 +267,16 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket) std::string rankName; recvPacket >> rankName; - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleAddNewRank(this, rankName); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleAddNewRank(this, rankName); } void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DEL_RANK"); - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleRemoveLowestRank(this); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleRemoveLowestRank(this); } void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket) @@ -286,8 +286,8 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket) std::string info; recvPacket >> info; - if (Guild* pGuild = _GetPlayerGuild(this, true)) - pGuild->HandleSetInfo(this, info); + if (Guild* guild = _GetPlayerGuild(this, true)) + guild->HandleSetInfo(this, info); } void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket) @@ -306,10 +306,10 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket) if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->HandleSetEmblem(this, emblemInfo); + if (Guild* guild = _GetPlayerGuild(this)) + guild->HandleSetEmblem(this, emblemInfo); else - // "You are not part of a pGuild!"; + // "You are not part of a guild!"; Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_NOGUILD); } else @@ -324,24 +324,24 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)"); - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendEventLog(this); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendEventLog(this); } void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)"); - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendMoneyInfo(this); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendMoneyInfo(this); } void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_PERMISSIONS)"); - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendPermissions(this); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendPermissions(this); } // Called when clicking on Guild bank gameobject @@ -357,14 +357,14 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data) if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK)) { - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendBankTabsInfo(this); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendBankTabsInfo(this); else Guild::SendCommandResult(this, GUILD_UNK1, ERR_GUILD_PLAYER_NOT_IN_GUILD); } } -// Called when opening pGuild bank tab only (first one) +// Called when opening guild bank tab only (first one) void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)"); @@ -379,8 +379,8 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data) recv_data >> unk1; if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK)) - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendBankTabData(this, tabId); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendBankTabData(this, tabId); } void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data) @@ -395,8 +395,8 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data) if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK)) if (money && GetPlayer()->HasEnoughMoney(money)) - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->HandleMemberDepositMoney(this, money); + if (Guild* guild = _GetPlayerGuild(this)) + guild->HandleMemberDepositMoney(this, money); } void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data) @@ -411,8 +411,8 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data) if (money) if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK)) - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->HandleMemberWithdrawMoney(this, money); + if (Guild* guild = _GetPlayerGuild(this)) + guild->HandleMemberWithdrawMoney(this, money); } void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data) @@ -428,8 +428,8 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data) return; } - Guild* pGuild = _GetPlayerGuild(this); - if (!pGuild) + Guild* guild = _GetPlayerGuild(this); + if (!guild) { recv_data.rfinish(); // Prevent additional spam at rejected packet return; @@ -459,7 +459,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data) recv_data >> splitedAmount; - pGuild->SwapItems(GetPlayer(), tabId, slotId, destTabId, destSlotId, splitedAmount); + guild->SwapItems(GetPlayer(), tabId, slotId, destTabId, destSlotId, splitedAmount); } else { @@ -492,7 +492,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data) if (!Player::IsInventoryPos(playerBag, playerSlotId) && !(playerBag == NULL_BAG && playerSlotId == NULL_SLOT)) GetPlayer()->SendEquipError(EQUIP_ERR_NONE, NULL); else - pGuild->SwapItemsWithInventory(GetPlayer(), toChar, tabId, slotId, playerBag, playerSlotId, splitedAmount); + guild->SwapItemsWithInventory(GetPlayer(), toChar, tabId, slotId, playerBag, playerSlotId, splitedAmount); } } @@ -507,8 +507,8 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data) recv_data >> tabId; if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK)) - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->HandleBuyBankTab(this, tabId); + if (Guild* guild = _GetPlayerGuild(this)) + guild->HandleBuyBankTab(this, tabId); } void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data) @@ -529,8 +529,8 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data) if (!name.empty() && !icon.empty()) if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK)) - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->HandleSetBankTabInfo(this, tabId, name, icon); + if (Guild* guild = _GetPlayerGuild(this)) + guild->HandleSetBankTabInfo(this, tabId, name, icon); } void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data) @@ -540,8 +540,8 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data) uint8 tabId; recv_data >> tabId; - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendBankLog(this, tabId); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendBankLog(this, tabId); } void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data) @@ -551,8 +551,8 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data) uint8 tabId; recv_data >> tabId; - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SendBankTabText(this, tabId); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SendBankTabText(this, tabId); } void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data) @@ -565,6 +565,6 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data) std::string text; recv_data >> text; - if (Guild* pGuild = _GetPlayerGuild(this)) - pGuild->SetBankTabText(tabId, text); + if (Guild* guild = _GetPlayerGuild(this)) + guild->SetBankTabText(tabId, text); } diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp index 7ace25832f2..c9bc9acd05d 100755 --- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp @@ -329,9 +329,9 @@ void WorldSession::DoLootRelease(uint64 lguid) // if the round robin player release, reset it. if (player->GetGUID() == loot->roundRobinPlayer) { - if (Group* pGroup = player->GetGroup()) + if (Group* group = player->GetGroup()) { - if (pGroup->GetLootMethod() != MASTER_LOOT) + if (group->GetLootMethod() != MASTER_LOOT) { loot->roundRobinPlayer = 0; } @@ -405,12 +405,12 @@ void WorldSession::DoLootRelease(uint64 lguid) // if the round robin player release, reset it. if (player->GetGUID() == loot->roundRobinPlayer) { - if (Group* pGroup = player->GetGroup()) + if (Group* group = player->GetGroup()) { - if (pGroup->GetLootMethod() != MASTER_LOOT) + if (group->GetLootMethod() != MASTER_LOOT) { loot->roundRobinPlayer = 0; - pGroup->SendLooter(pCreature, NULL); + group->SendLooter(pCreature, NULL); // force update of dynamic flags, otherwise other group's players still not able to loot. pCreature->ForceValuesUpdateAtIndex(UNIT_DYNAMIC_FLAGS); diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index c75c02a723d..1b0cef69c04 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -1464,13 +1464,13 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data) void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES"); - Group* pGroup = _player->GetGroup(); - if (pGroup) + Group* group = _player->GetGroup(); + if (group) { - if (pGroup->IsLeader(_player->GetGUID())) + if (group->IsLeader(_player->GetGUID())) { - pGroup->ResetInstances(INSTANCE_RESET_ALL, false, _player); - pGroup->ResetInstances(INSTANCE_RESET_ALL, true, _player); + group->ResetInstances(INSTANCE_RESET_ALL, false, _player); + group->ResetInstances(INSTANCE_RESET_ALL, true, _player); } } else @@ -1504,12 +1504,12 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) return; } - Group* pGroup = _player->GetGroup(); - if (pGroup) + Group* group = _player->GetGroup(); + if (group) { - if (pGroup->IsLeader(_player->GetGUID())) + if (group->IsLeader(_player->GetGUID())) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -1527,8 +1527,8 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) } // the difficulty is set even if the instances can't be reset //_player->SendDungeonDifficulty(true); - pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, false, _player); - pGroup->SetDungeonDifficulty(Difficulty(mode)); + group->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, false, _player); + group->SetDungeonDifficulty(Difficulty(mode)); } } else @@ -1562,12 +1562,12 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) if (Difficulty(mode) == _player->GetRaidDifficulty()) return; - Group* pGroup = _player->GetGroup(); - if (pGroup) + Group* group = _player->GetGroup(); + if (group) { - if (pGroup->IsLeader(_player->GetGUID())) + if (group->IsLeader(_player->GetGUID())) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -1585,8 +1585,8 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) } // the difficulty is set even if the instances can't be reset //_player->SendDungeonDifficulty(true); - pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true, _player); - pGroup->SetRaidDifficulty(Difficulty(mode)); + group->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true, _player); + group->SetRaidDifficulty(Difficulty(mode)); } } else diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp index 64711a41f97..d7fbb6a0b81 100755 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp @@ -160,9 +160,9 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data) if (qInfo->HasFlag(QUEST_FLAGS_PARTY_ACCEPT)) { - if (Group* pGroup = _player->GetGroup()) + if (Group* group = _player->GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pPlayer = itr->getSource(); @@ -546,9 +546,9 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket) if (Quest const* pQuest = sObjectMgr->GetQuestTemplate(questId)) { - if (Group* pGroup = _player->GetGroup()) + if (Group* group = _player->GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pPlayer = itr->getSource(); diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index d6004e809df..7c4cd1fec85 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -441,8 +441,8 @@ void WorldSession::LogoutPlayer(bool Save) HandleMoveWorldportAckOpcode(); ///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members - if (Guild* pGuild = sGuildMgr->GetGuildById(_player->GetGuildId())) - pGuild->HandleMemberLogout(this); + if (Guild* guild = sGuildMgr->GetGuildById(_player->GetGuildId())) + guild->HandleMemberLogout(this); ///- Remove pet _player->RemovePet(NULL, PET_SAVE_AS_CURRENT, true); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 2e9f2aabd73..dffdfad17e5 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2665,10 +2665,10 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) Player* targetPlayer = m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetTypeId() == TYPEID_PLAYER ? (Player*)m_targets.GetUnitTarget() : NULL; - Group* pGroup = targetPlayer ? targetPlayer->GetGroup() : NULL; - if (pGroup) + Group* group = targetPlayer ? targetPlayer->GetGroup() : NULL; + if (group) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index e441b0b9da4..776ff482b3a 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3328,9 +3328,9 @@ void Spell::EffectDispel(SpellEffIndex effIndex) int32 heal_amount = m_spellInfo->Effects[EFFECT_1].CalcValue(); m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true); // Glyph of Felhunter - if (Unit* pOwner = m_caster->GetOwner()) - if (pOwner->GetAura(56249)) - pOwner->CastCustomSpell(pOwner, 19658, &heal_amount, NULL, NULL, true); + if (Unit* owner = m_caster->GetOwner()) + if (owner->GetAura(56249)) + owner->CastCustomSpell(owner, 19658, &heal_amount, NULL, NULL, true); } } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 71b5a42a6b2..2f8d333735f 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -53,9 +53,9 @@ public: if (pInstance->GetData(TYPE_BARON_RUN) != NOT_STARTED) return false; - if (Group* pGroup = player->GetGroup()) + if (Group* group = player->GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupie = itr->getSource(); if (!pGroupie) diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index ab3cd88ce3a..2dec7ab191d 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -95,9 +95,9 @@ public: if (done_by->GetTypeId() == TYPEID_PLAYER) if (me->HealthBelowPctDamaged(30, damage)) { - if (Group* pGroup = CAST_PLR(done_by)->GetGroup()) + if (Group* group = CAST_PLR(done_by)->GetGroup()) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupie = itr->getSource(); if (pGroupie && -- cgit v1.2.3