mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge commit 'origin/master' into 310
Conflicts: src/game/Player.cpp
This commit is contained in:
commit
6734694a90
47 changed files with 740 additions and 524 deletions
|
|
@ -1778,12 +1778,12 @@ bool Creature::IsOutOfThreatArea(Unit* pVictim) const
|
|||
if(sMapStore.LookupEntry(GetMapId())->IsDungeon())
|
||||
return false;
|
||||
|
||||
float length = pVictim->GetDistance(CombatStartX,CombatStartY,CombatStartZ);
|
||||
float AttackDist = GetAttackDistance(pVictim);
|
||||
uint32 ThreatRadius = sWorld.getConfig(CONFIG_THREAT_RADIUS);
|
||||
|
||||
//Use AttackDistance in distance check if threat radius is lower. This prevents creature bounce in and out of combat every update tick.
|
||||
return ( length > (ThreatRadius > AttackDist ? ThreatRadius : AttackDist));
|
||||
return !pVictim->IsWithinDist3d(CombatStartX,CombatStartY,CombatStartZ,
|
||||
ThreatRadius > AttackDist ? ThreatRadius : AttackDist);
|
||||
}
|
||||
|
||||
CreatureDataAddon const* Creature::GetCreatureAddon() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue