1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00

Merge branch 'master' into 'develop'

This commit is contained in:
Ivan Savenko
2024-01-25 16:23:13 +02:00
26 changed files with 152 additions and 155 deletions

View File

@ -3966,14 +3966,14 @@ bool CGameHandler::moveStack(const StackLocation &src, const StackLocation &dst,
void CGameHandler::castSpell(const spells::Caster * caster, SpellID spellID, const int3 &pos)
{
const CSpell * s = spellID.toSpell();
if(!s)
if (!spellID.hasValue())
return;
AdventureSpellCastParameters p;
p.caster = caster;
p.pos = pos;
const CSpell * s = spellID.toSpell();
s->adventureCast(spellEnv, p);
}