[Quest API] Add Hotzone Methods to Perl/Lua. (#2558)

# Perl
- Add `quest::ishotzone()`.
- Add `quest::sethotzone(is_hotzone)`.

# Lua
- Add `eq.is_hotzone()`.
- Add `quest::set_hotzone(is_hotzone)`.

# Notes
- Allows operators to toggle hotzone flags within a script dynamically, for stuff like making an instance a hotzone, but not necessarily all versions of the zone.
This commit is contained in:
Kinglykrab
2022-11-22 09:11:53 -05:00
committed by GitHub
parent 0c56586f3b
commit 0dfa067974
3 changed files with 50 additions and 9 deletions
+20
View File
@@ -3561,6 +3561,24 @@ void lua_zone_marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_
entity_list.Marquee(type, priority, fade_in, fade_out, duration, message);
}
bool lua_is_hotzone()
{
if (!zone) {
return false;
}
return zone->IsHotzone();
}
void lua_set_hotzone(bool is_hotzone)
{
if (!zone) {
return;
}
zone->SetIsHotzone(is_hotzone);
}
#define LuaCreateNPCParse(name, c_type, default_value) do { \
cur = table[#name]; \
if(luabind::type(cur) != LUA_TNIL) { \
@@ -4052,6 +4070,8 @@ luabind::scope lua_register_general() {
luabind::def("zone_marquee", (void(*)(uint32,std::string))&lua_zone_marquee),
luabind::def("zone_marquee", (void(*)(uint32,std::string,uint32))&lua_zone_marquee),
luabind::def("zone_marquee", (void(*)(uint32,uint32,uint32,uint32,uint32,std::string))&lua_zone_marquee),
luabind::def("is_hotzone", (bool(*)(void))&lua_is_hotzone),
luabind::def("set_hotzone", (void(*)(bool))&lua_set_hotzone),
/*
Cross Zone