mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[7745] Fixed gcc warnings.
This commit is contained in:
parent
8d3585f5ee
commit
27fabf7ace
24 changed files with 145 additions and 128 deletions
|
|
@ -318,8 +318,9 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
|
|||
break;
|
||||
}
|
||||
|
||||
if( currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
|
||||
currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat() && pAttacker->IsWithinDistInMap(target, ATTACK_DISTANCE) )
|
||||
if ((currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
|
||||
currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat()) &&
|
||||
pAttacker->IsWithinDistInMap(target, ATTACK_DISTANCE))
|
||||
{ //implement 110% threat rule for targets in melee range
|
||||
found = true; //and 130% rule for targets in ranged distances
|
||||
break; //for selecting alive targets
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue