mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +02:00
Merge pull request #3010 from SoundSSGood/arts-placement-fix
This commit is contained in:
commit
e41c767653
@ -1136,10 +1136,13 @@ void CArtifactSet::serializeJsonHero(JsonSerializeFormat & handler, CMap * map)
|
|||||||
{
|
{
|
||||||
for(const ArtifactID & artifactID : backpackTemp)
|
for(const ArtifactID & artifactID : backpackTemp)
|
||||||
{
|
{
|
||||||
auto * artifact = ArtifactUtils::createArtifact(map, artifactID.toEnum());
|
auto * artifact = ArtifactUtils::createArtifact(map, artifactID);
|
||||||
auto slot = ArtifactPosition::BACKPACK_START + (si32)artifactsInBackpack.size();
|
auto slot = ArtifactPosition::BACKPACK_START + artifactsInBackpack.size();
|
||||||
if(artifact->artType->canBePutAt(this, slot))
|
if(artifact->artType->canBePutAt(this, slot))
|
||||||
putArtifact(slot, artifact);
|
{
|
||||||
|
auto artsMap = putArtifact(slot, artifact);
|
||||||
|
artifact->addPlacementMap(artsMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1178,7 +1181,8 @@ void CArtifactSet::serializeJsonSlot(JsonSerializeFormat & handler, const Artifa
|
|||||||
|
|
||||||
if(artifact->artType->canBePutAt(this, slot))
|
if(artifact->artType->canBePutAt(this, slot))
|
||||||
{
|
{
|
||||||
putArtifact(slot, artifact);
|
auto artsMap = putArtifact(slot, artifact);
|
||||||
|
artifact->addPlacementMap(artsMap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user