Fixes ownership checks for creature recruitment

This commit is contained in:
Ivan Savenko
2023-09-05 23:12:57 +03:00
parent f79492e5b0
commit b159d8a028
3 changed files with 34 additions and 26 deletions
+3 -2
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)