From 71825fcc4eeed0f616661ec4f309df48af78b440 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 20 Nov 2023 19:56:55 +0200 Subject: [PATCH] Fix crash on artifact movement --- lib/mapObjects/CGHeroInstance.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index 0ea8bb52d..11698ea0b 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -329,7 +329,6 @@ void CGHeroInstance::initHero(CRandomGenerator & rand) if(!getArt(ArtifactPosition::SPELLBOOK) && type->haveSpellBook) { auto artifact = ArtifactUtils::createNewArtifactInstance(ArtifactID::SPELLBOOK); - cb->gameState()->map->addNewArtifactInstance(artifact); putArtifact(ArtifactPosition::SPELLBOOK, artifact); } } @@ -339,7 +338,6 @@ void CGHeroInstance::initHero(CRandomGenerator & rand) if(!getArt(ArtifactPosition::MACH4)) { auto artifact = ArtifactUtils::createNewArtifactInstance(ArtifactID::CATAPULT); - cb->gameState()->map->addNewArtifactInstance(artifact); putArtifact(ArtifactPosition::MACH4, artifact); //everyone has a catapult } @@ -458,7 +456,6 @@ void CGHeroInstance::initArmy(CRandomGenerator & rand, IArmyDescriptor * dst) if(!getArt(slot)) { auto artifact = ArtifactUtils::createNewArtifactInstance(aid); - cb->gameState()->map->addNewArtifactInstance(artifact); putArtifact(slot, artifact); } else