Browse Source

Fix crash on advancing to 3rd scenario of Birth of Barbarian campaign -
spellbook removal was not working correctly when hero does not keeps his
spells

Ivan Savenko 11 months ago
parent
commit
227e403e88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/mapObjects/CGHeroInstance.cpp

+ 1 - 1
lib/mapObjects/CGHeroInstance.cpp

@@ -1243,7 +1243,7 @@ void CGHeroInstance::removeSpellbook()
 
 	if(hasSpellbook())
 	{
-		cb->removeArtifact(ArtifactLocation(this->id, ArtifactPosition::SPELLBOOK));
+		cb->gameState()->map->removeArtifactInstance(*this, ArtifactPosition::SPELLBOOK);
 	}
 }