[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:
Alex King
2024-02-24 23:57:49 -05:00
committed by GitHub
parent 873c128f46
commit a244509d63
5 changed files with 55 additions and 4 deletions
+20
View File
@@ -71,3 +71,23 @@ float CombatRecord::GetHealedReceivedPerSecond() const
double time_in_combat = TimeInCombat();
return time_in_combat > 0 ? (m_heal_received / time_in_combat) : m_heal_received;
}
time_t CombatRecord::GetStartTime() const
{
return m_start_time;
}
time_t CombatRecord::GetEndTime() const
{
return m_end_time;
}
int64 CombatRecord::GetDamageReceived() const
{
return m_damage_received;
}
int64 CombatRecord::GetHealingReceived() const
{
return m_heal_received;
}