mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
[Quest API] Export Combat Record to Death Events (#4112)
# Perl - Add `$combat_start_time`, `$combat_end_time`, `$damage_received`, and `$healing_received` to death events for NPCs. # Lua - Add `e.combat_start_time`, `e.combat_end_time`, `e.damage_received`, and `e.healing_received` to death events for NPCs. # Notes - Allows operators to hook in to the combat record logic so they can log the start and end of combat as well as the damage/healing received over the course of the fight.
This commit is contained in:
@@ -2024,6 +2024,13 @@ void PerlembParser::ExportEventVariables(
|
||||
ExportVar(package_name.c_str(), "killer_skill", sep.arg[3]);
|
||||
ExportVar(package_name.c_str(), "killed_entity_id", sep.arg[4]);
|
||||
|
||||
if (sep.arg[5]) {
|
||||
ExportVar(package_name.c_str(), "combat_start_time", sep.arg[5]);
|
||||
ExportVar(package_name.c_str(), "combat_end_time", sep.arg[6]);
|
||||
ExportVar(package_name.c_str(), "damage_received", sep.arg[7]);
|
||||
ExportVar(package_name.c_str(), "healing_received", sep.arg[8]);
|
||||
}
|
||||
|
||||
if (extra_pointers && extra_pointers->size() >= 1) {
|
||||
Corpse* corpse = std::any_cast<Corpse*>(extra_pointers->at(0));
|
||||
if (corpse) {
|
||||
|
||||
Reference in New Issue
Block a user