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

ArtifactLocation now use ID for artHolder identification part2

This commit is contained in:
SoundSSGood
2023-10-14 22:00:39 +03:00
parent 61fc236d79
commit ab2f6abb87
29 changed files with 216 additions and 273 deletions

View File

@@ -1087,7 +1087,7 @@ std::string CGHeroInstance::getBiographyTextID() const
CGHeroInstance::ArtPlacementMap CGHeroInstance::putArtifact(ArtifactPosition pos, CArtifactInstance * art)
{
assert(art->artType->canBePutAt(this, pos));
assert(art->canBePutAt(this, pos));
if(ArtifactUtils::isSlotEquipment(pos))
attachTo(*art);
@@ -1130,7 +1130,7 @@ void CGHeroInstance::removeSpellbook()
if(hasSpellbook())
{
ArtifactLocation(this, ArtifactPosition(ArtifactPosition::SPELLBOOK)).removeArtifact();
getArt(ArtifactPosition::SPELLBOOK)->removeFrom(*this, ArtifactPosition::SPELLBOOK);
}
}