diff options
| author | Shocker <shocker@freakz.ro> | 2011-10-07 09:19:37 -0700 |
|---|---|---|
| committer | Shocker <shocker@freakz.ro> | 2011-10-07 09:19:37 -0700 |
| commit | ac01eaa4e46334e43c2e582414867394a48dd770 (patch) | |
| tree | 048c3d98dd7f758ab022c3445b310cd256105997 /src/server/scripts/Northrend | |
| parent | e23fe1845fbe876f2ce50ebd25e3b135e5c2f1e2 (diff) | |
| parent | 81c0a3a8479fef8ea52e1af19174bd777a5759e3 (diff) | |
Merge pull request #3391 from Bootz/master
Code-Stlye clean-ups
Diffstat (limited to 'src/server/scripts/Northrend')
8 files changed, 33 insertions, 33 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index 6dc0d0365a0..acbe54d0acd 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -223,8 +223,8 @@ public: uint64 uiGrandChampionBoss1 = 0; if (Creature* pBoss = Unit::GetCreature(*me, uiVehicle1GUID)) if (Vehicle* pVehicle = pBoss->GetVehicleKit()) - if (Unit* pUnit = pVehicle->GetPassenger(0)) - uiGrandChampionBoss1 = pUnit->GetGUID(); + if (Unit* unit = pVehicle->GetPassenger(0)) + uiGrandChampionBoss1 = unit->GetGUID(); if (pInstance) { pInstance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID); @@ -239,8 +239,8 @@ public: uint64 uiGrandChampionBoss2 = 0; if (Creature* pBoss = Unit::GetCreature(*me, uiVehicle2GUID)) if (Vehicle* pVehicle = pBoss->GetVehicleKit()) - if (Unit* pUnit = pVehicle->GetPassenger(0)) - uiGrandChampionBoss2 = pUnit->GetGUID(); + if (Unit* unit = pVehicle->GetPassenger(0)) + uiGrandChampionBoss2 = unit->GetGUID(); if (pInstance) { pInstance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID); @@ -255,8 +255,8 @@ public: uint64 uiGrandChampionBoss3 = 0; if (Creature* pBoss = Unit::GetCreature(*me, uiVehicle3GUID)) if (Vehicle* pVehicle = pBoss->GetVehicleKit()) - if (Unit* pUnit = pVehicle->GetPassenger(0)) - uiGrandChampionBoss3 = pUnit->GetGUID(); + if (Unit* unit = pVehicle->GetPassenger(0)) + uiGrandChampionBoss3 = unit->GetGUID(); if (pInstance) { pInstance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 013f2cd6e98..ff342db5503 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -292,14 +292,14 @@ struct boss_faction_championsAI : public ScriptedAI std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator itr = tList.begin(); itr != tList.end(); ++itr) { - Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); - if (pUnit && me->getThreatManager().getThreat(pUnit)) + Unit* unit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); + if (unit && me->getThreatManager().getThreat(unit)) { - if (pUnit->GetTypeId()==TYPEID_PLAYER) + if (unit->GetTypeId()==TYPEID_PLAYER) { - float threat = CalculateThreat(me->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth()); - me->getThreatManager().modifyThreatPercent(pUnit, -100); - me->AddThreat(pUnit, 1000000.0f * threat); + float threat = CalculateThreat(me->GetDistance2d(unit), (float)unit->GetArmor(), unit->GetHealth()); + me->getThreatManager().modifyThreatPercent(unit, -100); + me->AddThreat(unit, 1000000.0f * threat); } } } diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index 8381ead167d..6237d7d57b0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -114,8 +114,8 @@ struct boss_horAI : ScriptedAI me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_AGGRESSIVE); - if (Unit* pUnit = me->SelectNearestTarget()) - AttackStart(pUnit); + if (Unit* unit = me->SelectNearestTarget()) + AttackStart(unit); DoZoneInCombat(); break; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 22aaa74a174..16c258af756 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -276,8 +276,8 @@ public: if (timeBombTimer <= uiDiff) { - if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM)) - DoCast(pUnit, SPELL_TIME_BOMB); + if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM)) + DoCast(unit, SPELL_TIME_BOMB); timeBombTimer = urand(20000, 25000); } else timeBombTimer -= uiDiff; diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index 318876d79e7..b02ea4bfc48 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -137,8 +137,8 @@ public: if (SpellVoidShiftTimer <= diff) { - if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pUnit, SPELL_VOID_SHIFT); + if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(unit, SPELL_VOID_SHIFT); SpellVoidShiftTimer = 20000; } else SpellVoidShiftTimer -=diff; diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index c0fbbae1980..a0d64e38d49 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -1706,12 +1706,12 @@ public: { } - void SpellHit(Unit* pUnit, const SpellInfo* pSpell) + void SpellHit(Unit* unit, const SpellInfo* pSpell) { - if (pSpell->Id == SPELL_NEURAL_NEEDLE && pUnit->GetTypeId() == TYPEID_PLAYER) + if (pSpell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER) { ++uiPhase; - CasterGUID = pUnit->GetGUID(); + CasterGUID = unit->GetGUID(); } } diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index c84228b99a4..27054b5755a 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -399,7 +399,7 @@ public: struct npc_vereth_the_cunningAI : public ScriptedAI { - npc_vereth_the_cunningAI(Creature* pCreature) : ScriptedAI(pCreature) {} + npc_vereth_the_cunningAI(Creature* creature) : ScriptedAI(creature) {} void MoveInLineOfSight(Unit* who) { diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index bf742a4602f..193c699f930 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -839,12 +839,12 @@ public: std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { - if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) + if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { - if (pUnit->GetPositionZ() <= 286.276f) + if (unit->GetPositionZ() <= 286.276f) { me->getThreatManager().resetAllAggro(); - me->AddThreat(pUnit, 5.0f); + me->AddThreat(unit, 5.0f); break; } EnterEvadeMode(); @@ -961,12 +961,12 @@ public: std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { - if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) + if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { - if (pUnit->GetPositionZ() <= 286.276f) + if (unit->GetPositionZ() <= 286.276f) { me->getThreatManager().resetAllAggro(); - me->AddThreat(pUnit, 5.0f); + me->AddThreat(unit, 5.0f); break; } EnterEvadeMode(); @@ -1083,7 +1083,7 @@ public: } - void EnterCombat(Unit* pUnit) + void EnterCombat(Unit* unit) { if (!SummonList.empty()) for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr) @@ -1091,7 +1091,7 @@ public: if (Creature* pTemp = Unit::GetCreature(*me, *itr)) { pTemp->m_CombatDistance = 100.0f; // ugly hack? we are not in a instance sorry. :( - pTemp->AI()->AttackStart(pUnit); + pTemp->AI()->AttackStart(unit); } } } @@ -1106,12 +1106,12 @@ public: std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { - if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) + if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { - if (pUnit->GetPositionZ() <= 286.276f) + if (unit->GetPositionZ() <= 286.276f) { me->getThreatManager().resetAllAggro(); - me->AddThreat(pUnit, 5.0f); + me->AddThreat(unit, 5.0f); break; } EnterEvadeMode(); |
