mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Add world object methods
This commit is contained in:
@@ -91,22 +91,6 @@ namespace LuaUnit
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the [WorldObject] is within given radius of the [Unit].
|
||||
*
|
||||
* @param [WorldObject] obj
|
||||
* @param float radius
|
||||
* @return bool withinDist
|
||||
*/
|
||||
int IsWithinDistInMap(lua_State* L, Unit* unit)
|
||||
{
|
||||
WorldObject* obj = Eluna::CHECKOBJ<WorldObject>(L, 2);
|
||||
float radius = Eluna::CHECKVAL<float>(L, 3);
|
||||
|
||||
Eluna::Push(L, unit->IsWithinDistInMap(obj, radius));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the [Unit] is in an accessible place for the given [Creature].
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user