Parcourir la source

Fixes according to review

Ivan Savenko il y a 2 ans
Parent
commit
fa156568c4

+ 1 - 1
AI/Nullkiller/Analyzers/HeroManager.cpp

@@ -189,7 +189,7 @@ bool HeroManager::canRecruitHero(const CGTownInstance * town) const
 	if(!town || !townHasFreeTavern(town))
 		return false;
 
-	if(cb->getResourceAmount(EGameResID::GOLD) < GameConstants::HERO_GOLD_COST)
+	if(cb->getResourceAmount(Res::GOLD) < GameConstants::HERO_GOLD_COST)
 		return false;
 
 	const bool includeGarnisoned = true;

+ 1 - 0
ChangeLog.md

@@ -16,6 +16,7 @@
 * Fixed crash on empty save game list after filtering
 * Fixed blocked progress in Launcher on language detection failure
 * Launcher will now correctly handle selection of Ddata directory in H3 install
+* Map editor will now correctly save message property for events and pandoras
 
 # 1.1.1 -> 1.2.0
 

+ 3 - 0
client/mapView/MapRendererContext.cpp

@@ -279,6 +279,9 @@ bool MapRendererAdventureContext::showSpellRange(const int3 & position) const
 
 	auto hero = adventureInt->curHero();
 
+	if (!hero)
+		return false;
+
 	return !isInScreenRange(hero->getSightCenter(), position);
 }