From 725d080cacb20378c123a925089b8a2dfbb8656c Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 6 Oct 2019 01:31:28 -0500 Subject: [PATCH] Damage Table logging [skip ci] --- utils/mods/legacy_combat.lua | 10 ++++++++++ zone/attack.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/utils/mods/legacy_combat.lua b/utils/mods/legacy_combat.lua index f9cb41029..133322ceb 100644 --- a/utils/mods/legacy_combat.lua +++ b/utils/mods/legacy_combat.lua @@ -68,8 +68,18 @@ function MeleeMitigation(e) return e; end + eq.debug( + string.format("[%s] ClientAttack] Damage Table [%i] WeaponDMG [%i]", + e.self:GetCleanName(), + GetDamageTable(e.other, e.hit.skill), + e.hit.base_damage + ) + ); + + -- Shouldn't this be using the client e.self instead of e.other ? e.hit.damage_done = 2 * e.hit.base_damage * GetDamageTable(e.other, e.hit.skill) / 100; e.hit = DoMeleeMitigation(e.self, e.other, e.hit, e.opts); + return e; end diff --git a/zone/attack.cpp b/zone/attack.cpp index be3317603..5a20a8992 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1168,6 +1168,16 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b return (true); int min_hit = 1; + + Log.Out( + Logs::General, + Logs::Combat, + "[%s] [Client::Attack] Damage Table [%u] WeaponDMG [%i]", + GetCleanName(), + GetDamageTable(skillinuse), + weapon_damage + ); + int max_hit = (2*weapon_damage*GetDamageTable(skillinuse)) / 100; if(GetLevel() < 10 && max_hit > RuleI(Combat, HitCapPre10))