1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Style tweaks.

This commit is contained in:
AlexVinS
2016-10-02 15:22:55 +03:00
parent 34a494ade0
commit cd5c0b3297
7 changed files with 17 additions and 19 deletions

View File

@@ -4426,14 +4426,13 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
const CGHeroInstance *h = gs->curB->battleGetFightingHero(ba.side);
COMPLAIN_RET_FALSE_IF((!h), "Wrong caster!");
if(ba.additionalInfo < 0 || ba.additionalInfo >= VLC->spellh->objects.size())
const CSpell * s = SpellID(ba.additionalInfo).toSpell();
if(!s)
{
logGlobal->error("Wrong spell id (%d)!", ba.additionalInfo);
return false;
}
const CSpell * s = SpellID(ba.additionalInfo).toSpell();
BattleSpellCastParameters parameters(gs->curB, h, s);
parameters.aimToHex(ba.destinationTile);//todo: allow multiple destinations
parameters.mode = ECastingMode::HERO_CASTING;