From 40e34add6ae26abec90d2d73316fc4875d0cc468 Mon Sep 17 00:00:00 2001 From: nooperation Date: Sat, 24 Feb 2024 18:48:18 -0500 Subject: [PATCH] dwLifeLeech and dwManaLeech should be shifted back to the right for this case (Please double check, It's possible I'm missing something here because the logic for this entire function is kind of difficult to follow both in code and assembly forms) --- source/D2Game/src/UNIT/SUnitDmg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/D2Game/src/UNIT/SUnitDmg.cpp b/source/D2Game/src/UNIT/SUnitDmg.cpp index 0afa3eb2..e3d64a69 100644 --- a/source/D2Game/src/UNIT/SUnitDmg.cpp +++ b/source/D2Game/src/UNIT/SUnitDmg.cpp @@ -1251,8 +1251,8 @@ void __fastcall SUNITDMG_ExecuteEvents(D2GameStrc* pGame, D2UnitStrc* pAttacker, const int32_t nMana = STATLIST_UnitGetStatValue(pDefender, STAT_MANA, 0); const int32_t nStamina = STATLIST_UnitGetStatValue(pDefender, STAT_STAMINA, 0); - pDamage->dwLifeLeech <<= 6; - pDamage->dwManaLeech <<= 6; + pDamage->dwLifeLeech >>= 6; + pDamage->dwManaLeech >>= 6; const int32_t nLifeLeech = std::min(pDamage->dwLifeLeech, pDamage->dwPhysDamage); const int32_t nManaLeech = std::min(pDamage->dwManaLeech, nMana);