mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Merge pull request #354 from BuildingOutLoud/Add-Creature-GetExtraFlags
Add Creature GetExtraFlags()
This commit is contained in:
@@ -878,6 +878,24 @@ auto const& threatlist = creature->getThreatManager().getThreatList();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Creature]'s Extra flags.
|
||||
*
|
||||
* These are used to control whether the NPC is a civilian, uses pathfinding,
|
||||
* if it's a guard, etc.
|
||||
*
|
||||
* @return [ExtraFlags] extraFlags
|
||||
*/
|
||||
int GetExtraFlags(lua_State* L, Creature* creature)
|
||||
{
|
||||
#if defined(TRINITY) || defined(AZEROTHCORE)
|
||||
Eluna::Push(L, creature->GetCreatureTemplate()->flags_extra);
|
||||
#else
|
||||
Eluna::Push(L, creature->GetCreatureInfo()->ExtraFlags);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(CLASSIC) || defined(TBC) || defined(WOTLK)
|
||||
/**
|
||||
* Returns the [Creature]'s shield block value.
|
||||
|
||||
@@ -782,6 +782,7 @@ ElunaRegister<Creature> CreatureMethods[] =
|
||||
{ "GetLootRecipient", &LuaCreature::GetLootRecipient },
|
||||
{ "GetLootRecipientGroup", &LuaCreature::GetLootRecipientGroup },
|
||||
{ "GetNPCFlags", &LuaCreature::GetNPCFlags },
|
||||
{ "GetExtraFlags", &LuaCreature::GetExtraFlags },
|
||||
#if defined(CLASSIC) || defined(TBC) || defined(WOTLK)
|
||||
{ "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue },
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user