From 687c9585e3963e214c4ae20c8b7e6d2321c4e78d Mon Sep 17 00:00:00 2001 From: BuildingOutLoud Date: Tue, 13 Apr 2021 09:28:42 -0600 Subject: [PATCH] Add IsDungeonBoss --- CreatureMethods.h | 12 ++++++++++++ LuaFunctions.cpp | 1 + 2 files changed, 13 insertions(+) diff --git a/CreatureMethods.h b/CreatureMethods.h index b3db467..e008655 100644 --- a/CreatureMethods.h +++ b/CreatureMethods.h @@ -234,6 +234,18 @@ namespace LuaCreature 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, * and returns `false` otherwise. diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index d5448c9..28cb331 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -809,6 +809,7 @@ ElunaRegister CreatureMethods[] = { "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots }, // Boolean + { "IsDungeonBoss", &LuaCreature::IsWorldBoss }, { "IsWorldBoss", &LuaCreature::IsWorldBoss }, { "IsRacialLeader", &LuaCreature::IsRacialLeader }, { "IsCivilian", &LuaCreature::IsCivilian },