mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Merge remote-tracking branch 'vcmi/develop' into lobby
This commit is contained in:
@@ -282,7 +282,7 @@ void ApplyGhNetPackVisitor::visitHireHero(HireHero & pack)
|
||||
{
|
||||
gh.throwIfWrongPlayer(&pack);
|
||||
|
||||
result = gh.heroPool->hireHero(pack.tid, pack.hid, pack.player);
|
||||
result = gh.heroPool->hireHero(pack.tid, pack.hid, pack.player, pack.nhid);
|
||||
}
|
||||
|
||||
void ApplyGhNetPackVisitor::visitBuildBoat(BuildBoat & pack)
|
||||
@@ -327,9 +327,9 @@ void ApplyGhNetPackVisitor::visitCastAdvSpell(CastAdvSpell & pack)
|
||||
{
|
||||
gh.throwIfWrongOwner(&pack, pack.hid);
|
||||
|
||||
const CSpell * s = pack.sid.toSpell();
|
||||
if(!s)
|
||||
if (!pack.sid.hasValue())
|
||||
gh.throwNotAllowedAction(&pack);
|
||||
|
||||
const CGHeroInstance * h = gh.getHero(pack.hid);
|
||||
if(!h)
|
||||
gh.throwNotAllowedAction(&pack);
|
||||
@@ -338,6 +338,7 @@ void ApplyGhNetPackVisitor::visitCastAdvSpell(CastAdvSpell & pack)
|
||||
p.caster = h;
|
||||
p.pos = pack.pos;
|
||||
|
||||
const CSpell * s = pack.sid.toSpell();
|
||||
result = s->adventureCast(gh.spellEnv, p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user