mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat: add GetRank method for creatures (#173)
This commit is contained in:
@@ -957,6 +957,17 @@ auto const& threatlist = creature->GetThreatMgr().GetThreatList();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Creature]'s rank.
|
||||
*
|
||||
* @return [Rank] rank
|
||||
*/
|
||||
int GetRank(lua_State* L, Creature* creature)
|
||||
{
|
||||
Eluna::Push(L, creature->GetCreatureTemplate()->rank);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(CLASSIC) || defined(TBC) || defined(WOTLK)
|
||||
/**
|
||||
* Returns the [Creature]'s shield block value.
|
||||
|
||||
@@ -831,6 +831,7 @@ ElunaRegister<Creature> CreatureMethods[] =
|
||||
{ "GetUnitFlags", &LuaCreature::GetUnitFlags },
|
||||
{ "GetUnitFlagsTwo", &LuaCreature::GetUnitFlagsTwo },
|
||||
{ "GetExtraFlags", &LuaCreature::GetExtraFlags },
|
||||
{ "GetRank", &LuaCreature::GetRank },
|
||||
#if defined(CLASSIC) || defined(TBC) || defined(WOTLK)
|
||||
{ "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue },
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user