[Feature] Zone Scripting (#4908)

* [Feature] Add Zone Scripting Capabilities

* Push

* Update zone.cpp

* Fix crashes

* Lua

* Add other events, finish Lua

* Add EVENT_ENTER_ZONE

* Final

* Push

* Push

* [Feature] Add Zone Scripting Capabilities

* Push

* Update zone.cpp

* Fix crashes

* Add EVENT_ENTER_ZONE

* Remove duplicates

* Update embparser.cpp
This commit is contained in:
Alex King
2025-07-10 15:08:08 -04:00
committed by GitHub
parent ab45d4358d
commit 323a0c0b27
22 changed files with 2009 additions and 340 deletions
+19
View File
@@ -3039,6 +3039,25 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
DispatchZoneControllerEvent(EVENT_DEATH_ZONE, owner_or_self, export_string, 0, &args);
}
if (parse->ZoneHasQuestSub(EVENT_DEATH_ZONE)) {
const auto& export_string = fmt::format(
"{} {} {} {} {} {} {} {} {}",
killer_mob ? killer_mob->GetID() : 0,
damage,
spell,
static_cast<int>(attack_skill),
entity_id,
m_combat_record.GetStartTime(),
m_combat_record.GetEndTime(),
m_combat_record.GetDamageReceived(),
m_combat_record.GetHealingReceived()
);
std::vector<std::any> args = { corpse, this, owner_or_self };
parse->EventZone(EVENT_DEATH_ZONE, zone, export_string, 0, &args);
}
return true;
}