From a14354ca4bdfd32f226dbaafd1b9dfc7cba18778 Mon Sep 17 00:00:00 2001 From: dongresource Date: Wed, 13 Sep 2023 03:45:52 +0200 Subject: [PATCH] Fix visual bug with Nano stamina while blocking Stun with Freedom --- src/Abilities.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Abilities.cpp b/src/Abilities.cpp index 58bfb45..69b4326 100644 --- a/src/Abilities.cpp +++ b/src/Abilities.cpp @@ -76,12 +76,20 @@ static SkillResult handleSkillDamageNDebuff(SkillData* skill, int power, ICombat } sSkillResult_Damage_N_Debuff result{}; + result.iDamage = duration / 10; // we use the duration as the damage number (why?) result.iHP = target->getCurrentHP(); result.eCT = target->getCharType(); result.iID = target->getID(); result.bProtected = blocked; result.iConditionBitFlag = target->getCompositeCondition(); + + // for player targets, make sure to update Nano stamina + if (target->getCharType() == 1) { + Player *plr = dynamic_cast(target); + result.iStamina = plr->getActiveNano()->iStamina; + } + return SkillResult(sizeof(sSkillResult_Damage_N_Debuff), &result); }