瀏覽代碼

Fixed #534, minor correction.

Michał W. Urbańczyk 15 年之前
父節點
當前提交
0e9eb1ab2d
共有 2 個文件被更改,包括 4 次插入6 次删除
  1. 3 6
      client/CPlayerInterface.cpp
  2. 1 0
      hch/CObjectHandler.cpp

+ 3 - 6
client/CPlayerInterface.cpp

@@ -396,17 +396,14 @@ int3 CPlayerInterface::repairScreenPos(int3 pos)
 }
 }
 void CPlayerInterface::heroPrimarySkillChanged(const CGHeroInstance * hero, int which, si64 val)
 void CPlayerInterface::heroPrimarySkillChanged(const CGHeroInstance * hero, int which, si64 val)
 {
 {
+	boost::unique_lock<boost::recursive_mutex> un(*pim);
 	if(which == 4)
 	if(which == 4)
 	{
 	{
 		if(CAltarWindow *ctw = dynamic_cast<CAltarWindow *>(GH.topInt()))
 		if(CAltarWindow *ctw = dynamic_cast<CAltarWindow *>(GH.topInt()))
-		{
 			ctw->setExpToLevel();
 			ctw->setExpToLevel();
-		}
 	}
 	}
-	if(which >= PRIMARY_SKILLS) //no need to redraw infowin if this is experience (exp is treated as prim skill with id==4)
-		return;
-	boost::unique_lock<boost::recursive_mutex> un(*pim);
-	updateInfo(hero);
+	else if(which < PRIMARY_SKILLS) //no need to redraw infowin if this is experience (exp is treated as prim skill with id==4)
+		updateInfo(hero);
 }
 }
 void CPlayerInterface::heroManaPointsChanged(const CGHeroInstance * hero)
 void CPlayerInterface::heroManaPointsChanged(const CGHeroInstance * hero)
 {
 {

+ 1 - 0
hch/CObjectHandler.cpp

@@ -6158,6 +6158,7 @@ void CCartographer::buyMap (const CGHeroInstance *h, ui32 accept) const
 	{
 	{
 		cb->giveResource (h->tempOwner, 6, -1000);
 		cb->giveResource (h->tempOwner, 6, -1000);
 		FoWChange fw;
 		FoWChange fw;
+		fw.mode = 1;
 		fw.player = h->tempOwner;
 		fw.player = h->tempOwner;
 
 
 		//subIDs of different types of cartographers:
 		//subIDs of different types of cartographers: