1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Merge remote-tracking branch 'vcmi/develop' into lobby

This commit is contained in:
Ivan Savenko
2024-01-26 16:52:23 +02:00
186 changed files with 1058 additions and 781 deletions

View File

@@ -1788,7 +1788,7 @@ bool CGameHandler::load(const std::string & filename)
try
{
{
CLoadFile lf(*CResourceHandler::get()->getResourceName(ResourcePath(stem.to_string(), EResType::SAVEGAME)), MINIMAL_SERIALIZATION_VERSION);
CLoadFile lf(*CResourceHandler::get()->getResourceName(ResourcePath(stem.to_string(), EResType::SAVEGAME)), ESerializationVersion::MINIMAL);
lf.serializer.cb = this;
loadCommonState(lf);
logGlobal->info("Loading server state");
@@ -3955,14 +3955,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);
}