mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Implement get class mask and get race mask
This commit is contained in:
@@ -251,6 +251,8 @@ ElunaRegister<Unit> UnitMethods[] =
|
||||
{ "GetGender", &LuaUnit::GetGender },
|
||||
{ "GetRace", &LuaUnit::GetRace },
|
||||
{ "GetClass", &LuaUnit::GetClass },
|
||||
{ "GetRaceMask", &LuaUnit::GetRaceMask },
|
||||
{ "GetClassMask", &LuaUnit::GetClassMask },
|
||||
{ "GetRaceAsString", &LuaUnit::GetRaceAsString },
|
||||
{ "GetClassAsString", &LuaUnit::GetClassAsString },
|
||||
{ "GetAura", &LuaUnit::GetAura },
|
||||
|
||||
@@ -1058,6 +1058,28 @@ namespace LuaUnit
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the race mask
|
||||
*
|
||||
* @return uint32 racemask
|
||||
*/
|
||||
int GetRaceMask(lua_State* L, Unit* unit)
|
||||
{
|
||||
Eluna::Push(L, unit->getRaceMask());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class mask
|
||||
*
|
||||
* @return uint32 classmask
|
||||
*/
|
||||
int GetClassMask(lua_State* L, Unit* unit)
|
||||
{
|
||||
Eluna::Push(L, unit->getClassMask());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Unit]'s creature type ID like wolf or humanoid.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user