From 9895dca6155cf3671f1f8d7c0209ad30d5b568de Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sat, 7 Jan 2023 14:27:12 +0200 Subject: [PATCH] Play sound if spell was resisted --- client/battle/BattleInterface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/battle/BattleInterface.cpp b/client/battle/BattleInterface.cpp index be36b7693..8a1e17bb9 100644 --- a/client/battle/BattleInterface.cpp +++ b/client/battle/BattleInterface.cpp @@ -406,6 +406,13 @@ void BattleInterface::spellCast(const BattleSpellCast * sc) }); } + if (!sc->resistedCres.empty()) + { + executeOnAnimationCondition(EAnimationEvents::HIT, true, [=](){ + CCS->soundh->playSound("MAGICRES"); + }); + } + for(auto & elem : sc->resistedCres) { auto stack = curInt->cb->battleGetStackByID(elem, false);