1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Cleanup & formatting

This commit is contained in:
AlexVinS
2017-07-04 01:32:40 +03:00
parent dfbc9cea8a
commit dbaf3cb023
6 changed files with 41 additions and 78 deletions

View File

@ -2252,16 +2252,15 @@ void CPlayerInterface::advmapSpellCast(const CGHeroInstance * caster, int spellI
{
EVENT_HANDLER_CALLED_BY_CLIENT;
if(dynamic_cast<CSpellWindow *>(GH.topInt()))
if(dynamic_cast<CSpellWindow *>(GH.topInt()))
GH.popIntTotally(GH.topInt());
if (spellID == SpellID::FLY || spellID == SpellID::WATER_WALK)
{
if(spellID == SpellID::FLY || spellID == SpellID::WATER_WALK)
eraseCurrentPathOf(caster, false);
}
const CSpell * spell = CGI->spellh->objects.at(spellID);
if (spellID == SpellID::VIEW_EARTH)
if(spellID == SpellID::VIEW_EARTH)
{
//TODO: implement on server side
int level = caster->getSpellSchoolLevel(spell);
@ -2269,7 +2268,7 @@ void CPlayerInterface::advmapSpellCast(const CGHeroInstance * caster, int spellI
}
auto castSoundPath = spell->getCastSound();
if (!castSoundPath.empty())
if(!castSoundPath.empty())
CCS->soundh->playSound(castSoundPath);
}