Core/Scripts: Removed some hungarian notation

This commit is contained in:
Shauren
2011-04-16 14:00:47 +02:00
parent 7a03861715
commit 82991448f7
3 changed files with 99 additions and 112 deletions

View File

@@ -49,9 +49,9 @@ void FollowerAI::AttackStart(Unit* pWho)
//This part provides assistance to a player that are attacked by pWho, even if out of normal aggro range
//It will cause me to attack pWho that are attacking _any_ player (which has been confirmed may happen also on offi)
//The flag (type_flag) is unconfirmed, but used here for further research and is a good candidate.
bool FollowerAI::AssistPlayerInCombat(Unit* pWho)
bool FollowerAI::AssistPlayerInCombat(Unit* who)
{
if (!pWho || !pWho->getVictim())
if (!who || !who->getVictim())
return false;
//experimental (unknown) flag not present
@@ -59,26 +59,26 @@ bool FollowerAI::AssistPlayerInCombat(Unit* pWho)
return false;
//not a player
if (!pWho->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
if (!who->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
return false;
//never attack friendly
if (me->IsFriendlyTo(pWho))
if (me->IsFriendlyTo(who))
return false;
//too far away and no free sight?
if (me->IsWithinDistInMap(pWho, MAX_PLAYER_DISTANCE) && me->IsWithinLOSInMap(pWho))
if (me->IsWithinDistInMap(who, MAX_PLAYER_DISTANCE) && me->IsWithinLOSInMap(who))
{
//already fighting someone?
if (!me->getVictim())
{
AttackStart(pWho);
AttackStart(who);
return true;
}
else
{
pWho->SetInCombatWith(me);
me->AddThreat(pWho, 0.0f);
who->SetInCombatWith(me);
me->AddThreat(who, 0.0f);
return true;
}
}