1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Play sound if spell was resisted

This commit is contained in:
Ivan Savenko 2023-01-07 14:27:12 +02:00
parent d83eedb8dd
commit 9895dca615

View File

@ -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);