mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-03 03:50:40 +00:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user