Core: Codestyle clean-up
"pl"->"player" Note: codestyle methods needs maintained, Player* player. still to do properly clean-up chat.cpp.
This commit is contained in:
@@ -1438,14 +1438,14 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
|
||||
return IsWithinLOSInMap(who);
|
||||
}
|
||||
|
||||
float Creature::GetAttackDistance(Unit const* pl) const
|
||||
float Creature::GetAttackDistance(Unit const* player) const
|
||||
{
|
||||
float aggroRate = sWorld->getRate(RATE_CREATURE_AGGRO);
|
||||
if (aggroRate == 0)
|
||||
return 0.0f;
|
||||
|
||||
uint32 playerlevel = pl->getLevelForTarget(this);
|
||||
uint32 creaturelevel = getLevelForTarget(pl);
|
||||
uint32 playerlevel = player->getLevelForTarget(this);
|
||||
uint32 creaturelevel = getLevelForTarget(player);
|
||||
|
||||
int32 leveldif = int32(playerlevel) - int32(creaturelevel);
|
||||
|
||||
@@ -1466,7 +1466,7 @@ float Creature::GetAttackDistance(Unit const* pl) const
|
||||
RetDistance += GetTotalAuraModifier(SPELL_AURA_MOD_DETECT_RANGE);
|
||||
|
||||
// detected range auras
|
||||
RetDistance += pl->GetTotalAuraModifier(SPELL_AURA_MOD_DETECTED_RANGE);
|
||||
RetDistance += player->GetTotalAuraModifier(SPELL_AURA_MOD_DETECTED_RANGE);
|
||||
}
|
||||
|
||||
// "Minimum Aggro Radius for a mob seems to be combat range (5 yards)"
|
||||
|
||||
@@ -607,7 +607,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
CreatureSpellCooldowns m_CreatureCategoryCooldowns;
|
||||
|
||||
bool canStartAttack(Unit const* u, bool force) const;
|
||||
float GetAttackDistance(Unit const* pl) const;
|
||||
float GetAttackDistance(Unit const* player) const;
|
||||
|
||||
void SendAIReaction(AiReaction reactionType);
|
||||
|
||||
|
||||
@@ -780,13 +780,13 @@ void Object::ClearUpdateMask(bool remove)
|
||||
}
|
||||
}
|
||||
|
||||
void Object::BuildFieldsUpdate(Player* pl, UpdateDataMapType& data_map) const
|
||||
void Object::BuildFieldsUpdate(Player* player, UpdateDataMapType& data_map) const
|
||||
{
|
||||
UpdateDataMapType::iterator iter = data_map.find(pl);
|
||||
UpdateDataMapType::iterator iter = data_map.find(player);
|
||||
|
||||
if (iter == data_map.end())
|
||||
{
|
||||
std::pair<UpdateDataMapType::iterator, bool> p = data_map.insert(UpdateDataMapType::value_type(pl, UpdateData()));
|
||||
std::pair<UpdateDataMapType::iterator, bool> p = data_map.insert(UpdateDataMapType::value_type(player, UpdateData()));
|
||||
ASSERT(p.second);
|
||||
iter = p.first;
|
||||
}
|
||||
|
||||
@@ -2338,7 +2338,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
|
||||
bool IsNeverVisible() const;
|
||||
|
||||
bool IsVisibleGloballyFor(Player* pl) const;
|
||||
bool IsVisibleGloballyFor(Player* player) const;
|
||||
|
||||
void SendInitialVisiblePackets(Unit* target);
|
||||
void UpdateObjectVisibility(bool forced = true);
|
||||
|
||||
@@ -584,13 +584,13 @@ void Transport::Update(uint32 p_diff)
|
||||
|
||||
void Transport::UpdateForMap(Map const* targetMap)
|
||||
{
|
||||
Map::PlayerList const& pl = targetMap->GetPlayers();
|
||||
if (pl.isEmpty())
|
||||
Map::PlayerList const& player = targetMap->GetPlayers();
|
||||
if (player.isEmpty())
|
||||
return;
|
||||
|
||||
if (GetMapId() == targetMap->GetId())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr)
|
||||
{
|
||||
if (this != itr->getSource()->GetTransport())
|
||||
{
|
||||
@@ -609,7 +609,7 @@ void Transport::UpdateForMap(Map const* targetMap)
|
||||
WorldPacket out_packet;
|
||||
transData.BuildPacket(&out_packet);
|
||||
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr)
|
||||
if (this != itr->getSource()->GetTransport())
|
||||
itr->getSource()->SendDirectMessage(&out_packet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user