diff options
Diffstat (limited to 'src/server/game')
| -rwxr-xr-x | src/server/game/AI/CoreAI/UnitAI.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Chat/Commands/Level3.cpp | 20 | ||||
| -rwxr-xr-x | src/server/game/Grids/Notifiers/GridNotifiers.h | 16 | ||||
| -rwxr-xr-x | src/server/game/Scripting/MapScripts.cpp | 8 |
4 files changed, 23 insertions, 23 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 4fdedea414a..3c16fe493b4 100755 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -56,7 +56,7 @@ struct DefaultTargetSelector : public std::unary_function<Unit*, bool> bool m_playerOnly; int32 m_aura; - // pUnit: the reference unit + // unit: the reference unit // dist: if 0: ignored, if > 0: maximum distance to the reference unit, if < 0: minimum distance to the reference unit // playerOnly: self explaining // aura: if 0: ignored, if > 0: the target shall have the aura, if < 0, the target shall NOT have the aura diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 78fcd55278d..cc6911e34a5 100755 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -4689,32 +4689,32 @@ bool ChatHandler::HandleGroupRemoveCommand(const char *args) bool ChatHandler::HandlePossessCommand(const char * /*args*/) { - Unit* pUnit = getSelectedUnit(); - if (!pUnit) + Unit* unit = getSelectedUnit(); + if (!unit) return false; - m_session->GetPlayer()->CastSpell(pUnit, 530, true); + m_session->GetPlayer()->CastSpell(unit, 530, true); return true; } bool ChatHandler::HandleUnPossessCommand(const char * /*args*/) { - Unit* pUnit = getSelectedUnit(); - if (!pUnit) - pUnit = m_session->GetPlayer(); + Unit* unit = getSelectedUnit(); + if (!unit) + unit = m_session->GetPlayer(); - pUnit->RemoveCharmAuras(); + unit->RemoveCharmAuras(); return true; } bool ChatHandler::HandleBindSightCommand(const char * /*args*/) { - Unit* pUnit = getSelectedUnit(); - if (!pUnit) + Unit* unit = getSelectedUnit(); + if (!unit) return false; - m_session->GetPlayer()->CastSpell(pUnit, 6277, true); + m_session->GetPlayer()->CastSpell(unit, 6277, true); return true; } diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 0af2c7f82dc..9497de4142f 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1180,16 +1180,16 @@ namespace Trinity class AllFriendlyCreaturesInGrid { public: - AllFriendlyCreaturesInGrid(Unit const* obj) : pUnit(obj) {} + AllFriendlyCreaturesInGrid(Unit const* obj) : unit(obj) {} bool operator() (Unit* u) { - if (u->isAlive() && u->IsVisible() && u->IsFriendlyTo(pUnit)) + if (u->isAlive() && u->IsVisible() && u->IsFriendlyTo(unit)) return true; return false; } private: - Unit const* pUnit; + Unit const* unit; }; class AllGameObjectsWithEntryInRange @@ -1213,9 +1213,9 @@ namespace Trinity { public: AllCreaturesOfEntryInRange(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {} - bool operator() (Unit* pUnit) + bool operator() (Unit* unit) { - if (pUnit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pUnit, m_fRange, false)) + if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false)) return true; return false; @@ -1230,18 +1230,18 @@ namespace Trinity class PlayerAtMinimumRangeAway { public: - PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : pUnit(unit), fRange(fMinRange) {} + PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : unit(unit), fRange(fMinRange) {} bool operator() (Player* pPlayer) { //No threat list check, must be done explicit if expected to be in combat with creature - if (!pPlayer->isGameMaster() && pPlayer->isAlive() && !pUnit->IsWithinDist(pPlayer, fRange, false)) + if (!pPlayer->isGameMaster() && pPlayer->isAlive() && !unit->IsWithinDist(pPlayer, fRange, false)) return true; return false; } private: - Unit const* pUnit; + Unit const* unit; float fRange; }; diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index ec651439bc5..6d62e47f4d6 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -155,7 +155,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* scriptInfo) const { - Unit* pUnit = NULL; + Unit* unit = NULL; if (!obj) sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else if (!obj->isType(TYPEMASK_UNIT)) @@ -163,12 +163,12 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); else { - pUnit = obj->ToUnit(); - if (!pUnit) + unit = obj->ToUnit(); + if (!unit) sLog->outError("%s %s object could not be casted to unit.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); } - return pUnit; + return unit; } inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInfo* scriptInfo) const |
