mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Style tweaks.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user