소스 검색

Fix morale widget update after dismissing a creature in garrison

Vadim Markovtsev 9 년 전
부모
커밋
31e5f7b800
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      client/windows/CHeroWindow.cpp
  2. 1 0
      client/windows/CHeroWindow.h

+ 6 - 0
client/windows/CHeroWindow.cpp

@@ -344,6 +344,12 @@ void CHeroWindow::commanderWindow()
 
 }
 
+void CHeroWindow::updateGarrisons()
+{
+	CWindowWithGarrison::updateGarrisons();
+	morale->set(&heroWArt);
+}
+
 void CHeroWindow::showAll(SDL_Surface * to)
 {
 	CIntObject::showAll(to);

+ 1 - 0
client/windows/CHeroWindow.h

@@ -91,6 +91,7 @@ public:
 	void questlog(); //show quest log in hero window
 	void commanderWindow();
 	void switchHero(); //changes displayed hero
+	virtual void updateGarrisons() override;  //updates the morale widget and calls the parent
 
 	//friends
 	friend void CArtPlace::clickLeft(tribool down, bool previousState);