mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 21:20:01 -04:00
Core/Scripts: Removed some hungarian notation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user