Merge pull request #352 from BuildingOutLoud/master

Add IsDungeonBoss
This commit is contained in:
Rochet2
2021-04-16 23:37:43 +03:00
committed by GitHub
2 changed files with 17 additions and 0 deletions

View File

@@ -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.

View File

@@ -809,6 +809,9 @@ ElunaRegister<Creature> CreatureMethods[] =
{ "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots },
// Boolean
#if defined(TRINITY) || defined(AZEROTHCORE)
{ "IsDungeonBoss", &LuaCreature::IsDungeonBoss },
#endif
{ "IsWorldBoss", &LuaCreature::IsWorldBoss },
{ "IsRacialLeader", &LuaCreature::IsRacialLeader },
{ "IsCivilian", &LuaCreature::IsCivilian },