mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Support for combat spell sounds.
This commit is contained in:
@@ -1794,11 +1794,16 @@ void CBattleInterface::battleFinished(const BattleResult& br)
|
||||
|
||||
void CBattleInterface::spellCast(SpellCast * sc)
|
||||
{
|
||||
CSpell &spell = CGI->spellh->spells[sc->id];
|
||||
|
||||
if(sc->side == !LOCPLINT->cb->battleGetStackByID(activeStack)->attackerOwned)
|
||||
bSpell->block(true);
|
||||
|
||||
std::vector< std::string > anims; //for magic arrow and ice bolt
|
||||
|
||||
if (spell.soundID != soundBase::invalid)
|
||||
CGI->audioh->playSound(spell.soundID);
|
||||
|
||||
switch(sc->id)
|
||||
{
|
||||
case 15: //magic arrow
|
||||
@@ -1861,9 +1866,9 @@ void CBattleInterface::spellCast(SpellCast * sc)
|
||||
}
|
||||
case 17: //lightning bolt
|
||||
displayEffect(1, sc->tile);
|
||||
displayEffect(CGI->spellh->spells[sc->id].mainEffectAnim, sc->tile);
|
||||
displayEffect(spell.mainEffectAnim, sc->tile);
|
||||
case 35: //dispel
|
||||
displayEffect(CGI->spellh->spells[sc->id].mainEffectAnim, sc->tile);
|
||||
displayEffect(spell.mainEffectAnim, sc->tile);
|
||||
} //switch(sc->id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user