Ivan Savenko 2 ani în urmă
părinte
comite
3d66455cd1

+ 1 - 0
client/windows/GUIClasses.cpp

@@ -55,6 +55,7 @@
 #include "../lib/mapObjects/ObjectTemplate.h"
 #include "../lib/gameState/CGameState.h"
 #include "../lib/gameState/InfoAboutArmy.h"
+#include "../lib/gameState/SThievesGuildInfo.h"
 #include "../lib/CArtHandler.h"
 #include "../lib/CBuildingHandler.h"
 #include "../lib/CConfigHandler.h"

+ 1 - 0
cmake_modules/VCMI_lib.cmake

@@ -392,6 +392,7 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
 		${MAIN_LIB_DIR}/gameState/CGameStateCampaign.h
 		${MAIN_LIB_DIR}/gameState/EVictoryLossCheckResult.h
 		${MAIN_LIB_DIR}/gameState/InfoAboutArmy.h
+		${MAIN_LIB_DIR}/gameState/SThievesGuildInfo.h
 		${MAIN_LIB_DIR}/gameState/QuestInfo.h
 
 		${MAIN_LIB_DIR}/logging/CBasicLogConfigurator.h

+ 1 - 0
lib/CGameInfoCallback.cpp

@@ -12,6 +12,7 @@
 
 #include "gameState/CGameState.h"
 #include "gameState/InfoAboutArmy.h"
+#include "gameState/SThievesGuildInfo.h"
 #include "CGeneralTextHandler.h"
 #include "StartInfo.h" // for StartInfo
 #include "battle/BattleInfo.h" // for BattleInfo

+ 2 - 0
lib/CPlayerState.cpp

@@ -40,6 +40,8 @@ PlayerState::PlayerState(PlayerState && other) noexcept:
 	std::swap(quests, other.quests);
 }
 
+PlayerState::~PlayerState() = default;
+
 std::string PlayerState::nodeName() const
 {
 	return "Player " + color.getStrCap(false);

+ 1 - 0
lib/CPlayerState.h

@@ -43,6 +43,7 @@ public:
 
 	PlayerState();
 	PlayerState(PlayerState && other) noexcept;
+	~PlayerState();
 
 	std::string nodeName() const override;
 

+ 0 - 1
lib/campaign/CampaignConstants.h

@@ -54,5 +54,4 @@ enum class CampaignScenarioID : int8_t
 	// no members - fake enum to create integer type that is not implicitly convertible to int
 };
 
-
 VCMI_LIB_NAMESPACE_END

+ 4 - 0
lib/campaign/CampaignScenarioPrologEpilog.h

@@ -9,6 +9,8 @@
  */
 #pragma once
 
+VCMI_LIB_NAMESPACE_BEGIN
+
 struct DLL_LINKAGE CampaignScenarioPrologEpilog
 {
 	bool hasPrologEpilog = false;
@@ -24,3 +26,5 @@ struct DLL_LINKAGE CampaignScenarioPrologEpilog
 		h & prologText;
 	}
 };
+
+VCMI_LIB_NAMESPACE_END

+ 2 - 0
lib/campaign/CampaignState.cpp

@@ -418,3 +418,5 @@ bool CampaignState::isCampaignFinished() const
 {
 	return conqueredScenarios() == allScenarios();
 }
+
+VCMI_LIB_NAMESPACE_END

+ 1 - 0
lib/gameState/CGameState.cpp

@@ -13,6 +13,7 @@
 #include "EVictoryLossCheckResult.h"
 #include "InfoAboutArmy.h"
 #include "CGameStateCampaign.h"
+#include "SThievesGuildInfo.h"
 
 #include "../ArtifactUtils.h"
 #include "../CBuildingHandler.h"

+ 1 - 30
lib/gameState/CGameState.h

@@ -29,40 +29,11 @@ struct EventCondition;
 struct CampaignTravel;
 class CStackInstance;
 class CGameStateCampaign;
+struct SThievesGuildInfo;
 
 template<typename T> class CApplier;
 class CBaseForGSApply;
 
-struct DLL_LINKAGE SThievesGuildInfo
-{
-	std::vector<PlayerColor> playerColors; //colors of players that are in-game
-
-	std::vector< std::vector< PlayerColor > > numOfTowns, numOfHeroes, gold, woodOre, mercSulfCrystGems, obelisks, artifacts, army, income; // [place] -> [colours of players]
-
-	std::map<PlayerColor, InfoAboutHero> colorToBestHero; //maps player's color to his best heros'
-
-    std::map<PlayerColor, EAiTactic::EAiTactic> personality; // color to personality // ai tactic
-	std::map<PlayerColor, si32> bestCreature; // color to ID // id or -1 if not known
-
-//	template <typename Handler> void serialize(Handler &h, const int version)
-//	{
-//		h & playerColors;
-//		h & numOfTowns;
-//		h & numOfHeroes;
-//		h & gold;
-//		h & woodOre;
-//		h & mercSulfCrystGems;
-//		h & obelisks;
-//		h & artifacts;
-//		h & army;
-//		h & income;
-//		h & colorToBestHero;
-//		h & personality;
-//		h & bestCreature;
-//	}
-
-};
-
 struct DLL_LINKAGE RumorState
 {
 	enum ERumorType : ui8

+ 2 - 0
lib/gameState/EVictoryLossCheckResult.h

@@ -81,3 +81,5 @@ private:
 
 	si32 intValue; // uses EResultult
 };
+
+VCMI_LIB_NAMESPACE_END

+ 47 - 0
lib/gameState/SThievesGuildInfo.h

@@ -0,0 +1,47 @@
+/*
+ * SThievesGuildInfo.h, part of VCMI engine
+ *
+ * Authors: listed in file AUTHORS in main folder
+ *
+ * License: GNU General Public License v2.0 or later
+ * Full text of license available in license.txt file, in main folder
+ *
+ */
+#pragma once
+
+#include "../GameConstants.h"
+#include "InfoAboutArmy.h"
+
+VCMI_LIB_NAMESPACE_BEGIN
+
+struct DLL_LINKAGE SThievesGuildInfo
+{
+	std::vector<PlayerColor> playerColors; //colors of players that are in-game
+
+	std::vector< std::vector< PlayerColor > > numOfTowns, numOfHeroes, gold, woodOre, mercSulfCrystGems, obelisks, artifacts, army, income; // [place] -> [colours of players]
+
+	std::map<PlayerColor, InfoAboutHero> colorToBestHero; //maps player's color to his best heros'
+
+	std::map<PlayerColor, EAiTactic::EAiTactic> personality; // color to personality // ai tactic
+	std::map<PlayerColor, si32> bestCreature; // color to ID // id or -1 if not known
+
+//	template <typename Handler> void serialize(Handler &h, const int version)
+//	{
+//		h & playerColors;
+//		h & numOfTowns;
+//		h & numOfHeroes;
+//		h & gold;
+//		h & woodOre;
+//		h & mercSulfCrystGems;
+//		h & obelisks;
+//		h & artifacts;
+//		h & army;
+//		h & income;
+//		h & colorToBestHero;
+//		h & personality;
+//		h & bestCreature;
+//	}
+
+};
+
+VCMI_LIB_NAMESPACE_END