1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merge pull request #2767 from IvanSavenko/dwelling_recruit_fix

Fixes ownership checks for creature recruitment
This commit is contained in:
Ivan Savenko
2023-09-07 15:09:55 +03:00
committed by GitHub
3 changed files with 34 additions and 26 deletions

View File

@@ -104,8 +104,9 @@ void ApplyGhNetPackVisitor::visitBuildStructure(BuildStructure & pack)
void ApplyGhNetPackVisitor::visitRecruitCreatures(RecruitCreatures & pack)
{
gh.throwIfWrongOwner(&pack, pack.tid);
result = gh.recruitCreatures(pack.tid, pack.dst, pack.crid, pack.amount, pack.level);
gh.throwIfWrongPlayer(&pack);
// ownership checks are inside recruitCreatures
result = gh.recruitCreatures(pack.tid, pack.dst, pack.crid, pack.amount, pack.level, pack.player);
}
void ApplyGhNetPackVisitor::visitUpgradeCreature(UpgradeCreature & pack)