diff --git a/CreatureMethods.h b/CreatureMethods.h index b3db467..0774e0a 100644 --- a/CreatureMethods.h +++ b/CreatureMethods.h @@ -234,6 +234,20 @@ namespace LuaCreature return 1; } + /** + * Returns `true` if the [Creature]'s flags_extra includes Dungeon Boss (0x1000000), + * and returns `false` otherwise. + * + * @return bool isDungeonBoss + */ +#if defined(TRINITY) || defined(AZEROTHCORE) + int IsDungeonBoss(lua_State* L, Creature* creature) + { + Eluna::Push(L, creature->IsDungeonBoss()); + return 1; + } +#endif + /** * Returns `true` if the [Creature]'s rank is Boss, * and returns `false` otherwise. diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index d5448c9..04ffa87 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -809,6 +809,9 @@ ElunaRegister CreatureMethods[] = { "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots }, // Boolean +#if defined(TRINITY) || defined(AZEROTHCORE) + { "IsDungeonBoss", &LuaCreature::IsDungeonBoss }, +#endif { "IsWorldBoss", &LuaCreature::IsWorldBoss }, { "IsRacialLeader", &LuaCreature::IsRacialLeader }, { "IsCivilian", &LuaCreature::IsCivilian },