1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fixed move checks. Backpack buttons.

This commit is contained in:
SoundSSGood
2023-09-18 22:58:08 +03:00
parent f47def3588
commit 9cc623c981
9 changed files with 53 additions and 16 deletions

View File

@ -68,7 +68,7 @@ void ApplyGhNetPackVisitor::visitArrangeStacks(ArrangeStacks & pack)
void ApplyGhNetPackVisitor::visitBulkMoveArmy(BulkMoveArmy & pack)
{
gh.throwIfWrongPlayer(&pack);
gh.throwIfWrongOwner(&pack, pack.srcArmy);
result = gh.bulkMoveArmy(pack.srcArmy, pack.destArmy, pack.srcSlot);
}
@ -132,6 +132,8 @@ void ApplyGhNetPackVisitor::visitExchangeArtifacts(ExchangeArtifacts & pack)
void ApplyGhNetPackVisitor::visitBulkExchangeArtifacts(BulkExchangeArtifacts & pack)
{
gh.throwIfWrongOwner(&pack, pack.srcHero);
if(pack.swap)
gh.throwIfWrongOwner(&pack, pack.dstHero);
result = gh.bulkMoveArtifacts(pack.srcHero, pack.dstHero, pack.swap, pack.equipped, pack.backpack);
}