mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Merge pull request #164 from vmarkovtsev/issue/1821
Fix 1821 artifact assembly statusbar text
This commit is contained in:
@@ -303,10 +303,10 @@ void CArtPlace::deselect ()
|
||||
for(int i = 0; i < GameConstants::BACKPACK_START; i++)
|
||||
{
|
||||
auto place = ourOwner->getArtPlace(i);
|
||||
|
||||
|
||||
if(nullptr != place)//getArtPlace may return null
|
||||
place->pickSlot(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CCS->curh->dragAndDropCursor(nullptr);
|
||||
@@ -454,12 +454,12 @@ void CArtifactsOfHero::setHero(const CGHeroInstance * hero)
|
||||
backpackPos = 0;
|
||||
|
||||
// Fill the slots for worn artifacts and backpack.
|
||||
|
||||
|
||||
for(auto p : artWorn)
|
||||
{
|
||||
setSlotData(p.second, p.first);
|
||||
}
|
||||
|
||||
|
||||
scrollBackpack(0);
|
||||
}
|
||||
|
||||
@@ -587,8 +587,8 @@ void CArtifactsOfHero::setSlotData(CArtPlace* artPlace, ArtifactPosition slotID)
|
||||
|
||||
if(const ArtSlotInfo *asi = curHero->getSlot(slotID))
|
||||
{
|
||||
artPlace->setArtifact(asi->artifact);
|
||||
artPlace->lockSlot(asi->locked);
|
||||
artPlace->setArtifact(asi->artifact);
|
||||
}
|
||||
else
|
||||
artPlace->setArtifact(nullptr);
|
||||
@@ -853,7 +853,7 @@ CArtPlace * CArtifactsOfHero::getArtPlace(int slot)
|
||||
for(CArtPlace *ap : backpack)
|
||||
if(ap->slotID == slot)
|
||||
return ap;
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user