1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Merge pull request #2874 from SoundSSGood/exchange-window-update

Exchange window update
This commit is contained in:
Ivan Savenko
2023-09-27 15:50:52 +03:00
committed by GitHub
35 changed files with 350 additions and 367 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,7 +132,9 @@ void ApplyGhNetPackVisitor::visitExchangeArtifacts(ExchangeArtifacts & pack)
void ApplyGhNetPackVisitor::visitBulkExchangeArtifacts(BulkExchangeArtifacts & pack)
{
gh.throwIfWrongOwner(&pack, pack.srcHero);
result = gh.bulkMoveArtifacts(pack.srcHero, pack.dstHero, pack.swap);
if(pack.swap)
gh.throwIfWrongOwner(&pack, pack.dstHero);
result = gh.bulkMoveArtifacts(pack.srcHero, pack.dstHero, pack.swap, pack.equipped, pack.backpack);
}
void ApplyGhNetPackVisitor::visitAssembleArtifacts(AssembleArtifacts & pack)