Add IsDungeonBoss

This commit is contained in:
BuildingOutLoud
2021-04-13 09:28:42 -06:00
parent 8f5c4699b2
commit 687c9585e3
2 changed files with 13 additions and 0 deletions

View File

@@ -234,6 +234,18 @@ namespace LuaCreature
return 1; return 1;
} }
/**
* Returns `true` if the [Creature]'s flags_extra includes Dungeon Boss (0x1000000),
* and returns `false` otherwise.
*
* @return bool isDungeonBoss
*/
int IsDungeonBoss(lua_State* L, Creature* creature)
{
Eluna::Push(L, creature->IsDungeonBoss());
return 1;
}
/** /**
* Returns `true` if the [Creature]'s rank is Boss, * Returns `true` if the [Creature]'s rank is Boss,
* and returns `false` otherwise. * and returns `false` otherwise.

View File

@@ -809,6 +809,7 @@ ElunaRegister<Creature> CreatureMethods[] =
{ "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots }, { "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots },
// Boolean // Boolean
{ "IsDungeonBoss", &LuaCreature::IsWorldBoss },
{ "IsWorldBoss", &LuaCreature::IsWorldBoss }, { "IsWorldBoss", &LuaCreature::IsWorldBoss },
{ "IsRacialLeader", &LuaCreature::IsRacialLeader }, { "IsRacialLeader", &LuaCreature::IsRacialLeader },
{ "IsCivilian", &LuaCreature::IsCivilian }, { "IsCivilian", &LuaCreature::IsCivilian },