REPO: Code-style change
* Fixed pUnit-unit
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user