1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Merge pull request #4910 from Laserlicht/picture_regression

fix picture (regression)
This commit is contained in:
Ivan Savenko 2024-11-15 19:17:52 +02:00 committed by GitHub
commit 1a038b26ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,8 +54,8 @@ void CreaturePurchaseCard::switchCreatureLevel()
auto index = vstd::find_pos(upgradesID, creatureOnTheCard->getId());
auto nextCreatureId = vstd::circularAt(upgradesID, ++index);
creatureOnTheCard = nextCreatureId.toCreature();
picture = std::make_shared<CCreaturePic>(parent->pos.x, parent->pos.y, creatureOnTheCard);
creatureClickArea = std::make_shared<CCreatureClickArea>(Point(parent->pos.x, parent->pos.y), picture, creatureOnTheCard);
picture = std::make_shared<CCreaturePic>(picture->pos.x - pos.x, picture->pos.y - pos.y, creatureOnTheCard);
creatureClickArea = std::make_shared<CCreatureClickArea>(Point(picture->pos.x - pos.x, picture->pos.y - pos.y), picture, creatureOnTheCard);
parent->updateAllSliders();
cost->set(creatureOnTheCard->getFullRecruitCost() * slider->getValue());
}