diff --git a/CreatureMethods.h b/CreatureMethods.h index 18061ff..8f88b21 100644 --- a/CreatureMethods.h +++ b/CreatureMethods.h @@ -243,7 +243,13 @@ namespace LuaCreature { Unit* target = Eluna::CHECKOBJ(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; }