[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
+10 -9
View File
@@ -204,17 +204,18 @@ void QuestManager::write(const char *file, const char *str) {
fclose (pFile);
}
Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& position) {
const NPCType* tmp = 0;
if (tmp = content_db.LoadNPCTypesData(npc_type))
{
auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Water);
Mob* QuestManager::spawn2(int npc_id, int grid, int unused, const glm::vec4& position) {
const NPCType* t = 0;
if (t = content_db.LoadNPCTypesData(npc_id)) {
auto npc = new NPC(t, nullptr, position, GravityBehavior::Water);
npc->AddLootTable();
if (npc->DropsGlobalLoot())
if (npc->DropsGlobalLoot()) {
npc->CheckGlobalLootTables();
entity_list.AddNPC(npc,true,true);
if(grid > 0)
{
}
entity_list.AddNPC(npc, true, true);
if (grid) {
npc->AssignWaypoints(grid);
}