From 6ec577f241883b4da9274fab2ad3bb55aa4f244f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 8 Oct 2019 02:25:02 -0500 Subject: [PATCH] More logging [skip ci] --- utils/mods/legacy_combat.lua | 13 ++++++++++++- zone/attack.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/utils/mods/legacy_combat.lua b/utils/mods/legacy_combat.lua index bf1630992..c642371e3 100644 --- a/utils/mods/legacy_combat.lua +++ b/utils/mods/legacy_combat.lua @@ -372,7 +372,18 @@ function TryCriticalHit(e) end end - critMod = critMod + GetCritDmgMod(self, e.hit.skill) * 2; + critMod = critMod + GetCritDmgMod(self, e.hit.skill) * 2; + + eq.debug( + string.format("[%s] [Mob::TryCriticalHit] CritChance [%i] CritMod [%i] GetCritDmgMod [%i] CripSuccess [%s]", + e.self:GetCleanName(), + critChance, + critMod, + GetCritDmgMod(self, e.hit.skill), + (crip_success) and "true" or "false" + ) + ); + e.hit.damage_done = e.hit.damage_done * critMod / 100; local deadlySuccess = false; diff --git a/zone/attack.cpp b/zone/attack.cpp index 98a83a7f5..66099655e 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -4051,6 +4051,18 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack } critMod += GetCritDmgMob(skill) * 2; // To account for base crit mod being 200 not 100 + + Log.Out( + Logs::General, + Logs::Combat, + "[%s] [Mob::TryCriticalHit] CritChance [%.2f] CritMod [%u] GetCritDmgMod [%i] CripSuccess [%s]", + GetCleanName(), + critChance, + critMod, + GetCritDmgMob(skill), + crip_success ? "true" : "false" + ); + damage = damage * critMod / 100; bool deadlySuccess = false;