From c87e60740bc2508e36968e6185a54890e1f0a31e Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Thu, 18 Apr 2024 19:13:32 +0300 Subject: [PATCH] Fixes hota prisons replacing every h3 prison on h3m maps --- lib/mapObjects/CGHeroInstance.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index ad1e6256c..e9404b894 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -607,10 +607,9 @@ void CGHeroInstance::pickRandomObject(CRandomGenerator & rand) // to find object handler we must use heroClass->id // after setType subID used to store unique hero identify id. Check issue 2277 for details + // exclude prisons which should use appearance as set in map, via map editor or RMG if (ID != Obj::PRISON) setType(ID, type->heroClass->getIndex()); - else - setType(ID, 0); this->subID = oldSubID; }