[Combat] Basic Combat Recording (#2090)

* Basic combat recording

* Update combat_record.h
This commit is contained in:
Chris Miles
2022-05-01 18:08:12 -05:00
committed by GitHub
parent 759f9bd007
commit c7dbdfae58
10 changed files with 138 additions and 14 deletions
+15
View File
@@ -102,6 +102,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
#include "mob_movement_manager.h"
#include "client.h"
#include "mob.h"
extern Zone* zone;
@@ -6773,3 +6774,17 @@ bool Mob::IsFromTriggeredSpell(CastingSlot slot, uint32 item_slot) {
}
return false;
}
void Mob::SetHP(int32 hp)
{
if (hp >= max_hp) {
current_hp = max_hp;
return;
}
if (combat_record.InCombat()) {
combat_record.ProcessHPEvent(hp, current_hp);
}
current_hp = hp;
}