MichalZr6 1 年之前
父节点
当前提交
5c6abb30c6
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 4 4
      client/windows/GUIClasses.cpp
  2. 1 1
      client/windows/GUIClasses.h

+ 4 - 4
client/windows/GUIClasses.cpp

@@ -1200,7 +1200,7 @@ void CHillFortWindow::updateGarrisons()
 			newState = State::ALREADY_UPGRADED;
 
 		if(!totalSum.canBeAfforded(myRes))
-			newState = State::UNAFORDABLE;
+			newState = State::UNAFFORDABLE;
 	}
 
 	currState[slotsCount] = newState;
@@ -1217,7 +1217,7 @@ void CHillFortWindow::updateGarrisons()
 			slotLabels[i][j]->setText("");
 		}
 		//if can upgrade or can not afford, draw cost
-		if(currState[i] == State::UNAFORDABLE || currState[i] == State::MAKE_UPGRADE)
+		if(currState[i] == State::UNAFFORDABLE || currState[i] == State::MAKE_UPGRADE)
 		{
 			if(costs[i].nonZero())
 			{
@@ -1269,7 +1269,7 @@ void CHillFortWindow::makeDeal(SlotID slot)
 		case State::ALREADY_UPGRADED:
 			LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[313 + offset], std::vector<std::shared_ptr<CComponent>>(), soundBase::sound_todo);
 			break;
-		case State::UNAFORDABLE:
+		case State::UNAFFORDABLE:
 			LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[314 + offset], std::vector<std::shared_ptr<CComponent>>(), soundBase::sound_todo);
 			break;
 		case State::UNAVAILABLE:
@@ -1324,7 +1324,7 @@ CHillFortWindow::State CHillFortWindow::getState(SlotID slot)
 	}
 
 	if(!(info.cost[0] * hero->getStackCount(slot)).canBeAfforded(myRes))
-		return State::UNAFORDABLE;
+		return State::UNAFFORDABLE;
 
 	return State::MAKE_UPGRADE;
 }

+ 1 - 1
client/windows/GUIClasses.h

@@ -445,7 +445,7 @@ class CHillFortWindow : public CStatusbarWindow, public IGarrisonHolder
 {
 private:
 
-	enum class State { UNAFORDABLE, ALREADY_UPGRADED, MAKE_UPGRADE, EMPTY, UNAVAILABLE };
+	enum class State { UNAFFORDABLE, ALREADY_UPGRADED, MAKE_UPGRADE, EMPTY, UNAVAILABLE };
 	static constexpr std::size_t slotsCount = 7;
 	//todo: mithril support
 	static constexpr std::size_t resCount = 7;