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

Merge pull request #3161 from SoundSSGood/art-swap-optimization

Artifacts swap optimization
This commit is contained in:
Ivan Savenko
2023-11-12 19:37:25 +02:00
committed by GitHub
11 changed files with 98 additions and 84 deletions

View File

@@ -881,7 +881,7 @@ void CGArtifact::onHeroVisit(const CGHeroInstance * h) const
void CGArtifact::pick(const CGHeroInstance * h) const
{
if(cb->giveHeroArtifact(h, storedArtifact, ArtifactPosition::FIRST_AVAILABLE))
if(cb->putArtifact(ArtifactLocation(h->id, ArtifactPosition::FIRST_AVAILABLE), storedArtifact))
cb->removeObject(this, h->getOwner());
}