mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna fix mangos GetAggroRange
This commit is contained in:
@@ -243,7 +243,13 @@ namespace LuaCreature
|
|||||||
{
|
{
|
||||||
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2);
|
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2);
|
||||||
|
|
||||||
|
#ifdef MANGOS
|
||||||
|
float AttackDist = creature->GetAttackDistance(target);
|
||||||
|
float ThreatRadius = sWorld.getConfig(CONFIG_FLOAT_THREAT_RADIUS);
|
||||||
|
Eluna::Push(L, ThreatRadius > AttackDist ? ThreatRadius : AttackDist);
|
||||||
|
#else
|
||||||
Eluna::Push(L, creature->GetAggroRange(target));
|
Eluna::Push(L, creature->GetAggroRange(target));
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user