mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Artifacts placement fixed
This commit is contained in:
parent
b75a67ef7c
commit
bcce4c68e5
@ -1136,10 +1136,13 @@ void CArtifactSet::serializeJsonHero(JsonSerializeFormat & handler, CMap * map)
|
||||
{
|
||||
for(const ArtifactID & artifactID : backpackTemp)
|
||||
{
|
||||
auto * artifact = ArtifactUtils::createArtifact(map, artifactID.toEnum());
|
||||
auto slot = ArtifactPosition::BACKPACK_START + (si32)artifactsInBackpack.size();
|
||||
auto * artifact = ArtifactUtils::createArtifact(map, artifactID);
|
||||
auto slot = ArtifactPosition::BACKPACK_START + artifactsInBackpack.size();
|
||||
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))
|
||||
{
|
||||
putArtifact(slot, artifact);
|
||||
auto artsMap = putArtifact(slot, artifact);
|
||||
artifact->addPlacementMap(artsMap);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user