瀏覽代碼

Fixes according to review

Ivan Savenko 2 年之前
父節點
當前提交
fa156568c4
共有 3 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      AI/Nullkiller/Analyzers/HeroManager.cpp
  2. 1 0
      ChangeLog.md
  3. 3 0
      client/mapView/MapRendererContext.cpp

+ 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);
 }