mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
@@ -6299,6 +6299,19 @@ bool CGameHandler::moveStack(const StackLocation &src, const StackLocation &dst,
|
||||
return true;
|
||||
}
|
||||
|
||||
void CGameHandler::castSpell(const spells::Caster * caster, SpellID spellID, const int3 &pos)
|
||||
{
|
||||
const CSpell * s = spellID.toSpell();
|
||||
if(!s)
|
||||
return;
|
||||
|
||||
AdventureSpellCastParameters p;
|
||||
p.caster = caster;
|
||||
p.pos = pos;
|
||||
|
||||
s->adventureCast(spellEnv, p);
|
||||
}
|
||||
|
||||
bool CGameHandler::swapStacks(const StackLocation & sl1, const StackLocation & sl2)
|
||||
{
|
||||
if(!sl1.army->hasStackAtSlot(sl1.slot))
|
||||
@@ -7360,4 +7373,4 @@ const ObjectInstanceID CGameHandler::putNewObject(Obj ID, int subID, int3 pos)
|
||||
no.pos = pos;
|
||||
sendAndApply(&no);
|
||||
return no.id; //id field will be filled during applying on gs
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user