[Quest API] Add CheckNameFilter to Perl/Lua. (#2175)

- Add quest::checknamefilter(name) to Perl.
- Add eq.check_name_filter(name) to Lua.
- Allows operators to check strings against the name filter for stuff like setting custom pet names, titles, suffixes, etc in scripts.
This commit is contained in:
Kinglykrab
2022-05-19 20:01:14 -04:00
committed by GitHub
parent 7c1a139991
commit 6398381c44
6 changed files with 65 additions and 62 deletions
+5
View File
@@ -3392,6 +3392,10 @@ std::string lua_commify(std::string number) {
return commify(number);
}
bool lua_check_name_filter(std::string name) {
return database.CheckNameFilter(name);
}
#define LuaCreateNPCParse(name, c_type, default_value) do { \
cur = table[#name]; \
if(luabind::type(cur) != LUA_TNIL) { \
@@ -3845,6 +3849,7 @@ luabind::scope lua_register_general() {
luabind::def("get_consider_level_name", &lua_get_consider_level_name),
luabind::def("get_environmental_damage_name", &lua_get_environmental_damage_name),
luabind::def("commify", &lua_commify),
luabind::def("check_name_filter", &lua_check_name_filter),
/*
Cross Zone