mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Quest API] Add HasSpecialAbilities() to Perl/Lua (#2994)
* [Quest API] Add HasSpecialAbilities() to Perl/Lua # Perl - Add `$mob->HasSpecialAbilities()`. # Lua - Add `mob:HasSpecialAbilities()` # Notes - Allows operators to check if a mob has special abilities * Move to NPC. * Update lua_mob.cpp
This commit is contained in:
parent
ff4ccfa98f
commit
3448758c03
@ -767,6 +767,11 @@ void Lua_NPC::ScaleNPC(uint8 npc_level, bool override_special_abilities)
|
||||
self->ScaleNPC(npc_level, true, override_special_abilities);
|
||||
}
|
||||
|
||||
bool Lua_NPC::HasSpecialAbilities() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasSpecialAbilities();
|
||||
}
|
||||
|
||||
luabind::scope lua_register_npc() {
|
||||
return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
|
||||
.def(luabind::constructor<>())
|
||||
|
||||
@ -174,6 +174,7 @@ public:
|
||||
void SetLDoNTrapDetected(bool is_detected);
|
||||
void ScaleNPC(uint8 npc_level);
|
||||
void ScaleNPC(uint8 npc_level, bool override_special_abilities);
|
||||
bool HasSpecialAbilities();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -765,6 +765,11 @@ void Perl_NPC_ScaleNPC(NPC* self, uint8 npc_level, bool override_special_abiliti
|
||||
return self->ScaleNPC(npc_level, override_special_abilities);
|
||||
}
|
||||
|
||||
bool Perl_NPC_HasSpecialAbilities(NPC* self) // @categories Script Utility
|
||||
{
|
||||
return self->HasSpecialAbilities();
|
||||
}
|
||||
|
||||
void perl_register_npc()
|
||||
{
|
||||
perl::interpreter perl(PERL_GET_THX);
|
||||
@ -852,6 +857,7 @@ void perl_register_npc()
|
||||
package.add("GetSwarmTarget", &Perl_NPC_GetSwarmTarget);
|
||||
package.add("GetWaypointMax", &Perl_NPC_GetWaypointMax);
|
||||
package.add("HasAISpellEffect", &Perl_NPC_HasAISpellEffect);
|
||||
package.add("HasSpecialAbilities", &Perl_NPC_HasSpecialAbilities);
|
||||
package.add("HasItem", &Perl_NPC_HasItem);
|
||||
package.add("IsAnimal", &Perl_NPC_IsAnimal);
|
||||
package.add("IsGuarding", &Perl_NPC_IsGuarding);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user