Eluna fix mangos GetAggroRange

This commit is contained in:
Rochet2
2014-06-08 02:00:24 +03:00
committed by Foereaper
parent 70b5389c13
commit eab5c0693b

View File

@@ -243,7 +243,13 @@ namespace LuaCreature
{
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));
#endif
return 1;
}