mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +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:
@@ -321,6 +321,18 @@ void handle_npc_death(
|
||||
lua_pushinteger(L, Strings::ToUnsignedInt(sep.arg[4]));
|
||||
lua_setfield(L, -2, "killed_entity_id");
|
||||
|
||||
lua_pushinteger(L, Strings::ToUnsignedInt(sep.arg[5]));
|
||||
lua_setfield(L, -2, "combat_start_time");
|
||||
|
||||
lua_pushinteger(L, Strings::ToUnsignedInt(sep.arg[6]));
|
||||
lua_setfield(L, -2, "combat_end_time");
|
||||
|
||||
lua_pushinteger(L, Strings::ToBigInt(sep.arg[7]));
|
||||
lua_setfield(L, -2, "damage_received");
|
||||
|
||||
lua_pushinteger(L, Strings::ToBigInt(sep.arg[8]));
|
||||
lua_setfield(L, -2, "healing_received");
|
||||
|
||||
if (extra_pointers && extra_pointers->size() >= 1) {
|
||||
Lua_Corpse l_corpse(std::any_cast<Corpse*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_corpse_o = luabind::adl::object(L, l_corpse);
|
||||
|
||||
Reference in New Issue
Block a user