|
@@ -208,6 +208,24 @@ public:
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+struct DLL_LINKAGE RumorState
|
|
|
|
|
+{
|
|
|
|
|
+ enum ERumorType : ui8
|
|
|
|
|
+ {
|
|
|
|
|
+ RUMOR_NONE = 0, RUMOR_RAND, RUMOR_STATS, RUMOR_MAP
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ ERumorType type;
|
|
|
|
|
+ std::map<ERumorType, std::pair<int, int>> last;
|
|
|
|
|
+
|
|
|
|
|
+ RumorState(){type = RUMOR_NONE; last = {};};
|
|
|
|
|
+
|
|
|
|
|
+ template <typename Handler> void serialize(Handler &h, const int version)
|
|
|
|
|
+ {
|
|
|
|
|
+ h & type & last;
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
struct UpgradeInfo
|
|
struct UpgradeInfo
|
|
|
{
|
|
{
|
|
|
CreatureID oldID; //creature to be upgraded
|
|
CreatureID oldID; //creature to be upgraded
|
|
@@ -311,6 +329,7 @@ public:
|
|
|
std::map<PlayerColor, PlayerState> players;
|
|
std::map<PlayerColor, PlayerState> players;
|
|
|
std::map<TeamID, TeamState> teams;
|
|
std::map<TeamID, TeamState> teams;
|
|
|
CBonusSystemNode globalEffects;
|
|
CBonusSystemNode globalEffects;
|
|
|
|
|
+ RumorState rumor;
|
|
|
|
|
|
|
|
boost::shared_mutex *mx;
|
|
boost::shared_mutex *mx;
|
|
|
|
|
|
|
@@ -324,6 +343,7 @@ public:
|
|
|
void calculatePaths(const CGHeroInstance *hero, CPathsInfo &out); //calculates possible paths for hero, by default uses current hero position and movement left; returns pointer to newly allocated CPath or nullptr if path does not exists
|
|
void calculatePaths(const CGHeroInstance *hero, CPathsInfo &out); //calculates possible paths for hero, by default uses current hero position and movement left; returns pointer to newly allocated CPath or nullptr if path does not exists
|
|
|
int3 guardingCreaturePosition (int3 pos) const;
|
|
int3 guardingCreaturePosition (int3 pos) const;
|
|
|
std::vector<CGObjectInstance*> guardingCreatures (int3 pos) const;
|
|
std::vector<CGObjectInstance*> guardingCreatures (int3 pos) const;
|
|
|
|
|
+ void updateRumor();
|
|
|
|
|
|
|
|
// ----- victory, loss condition checks -----
|
|
// ----- victory, loss condition checks -----
|
|
|
|
|
|
|
@@ -347,6 +367,13 @@ public:
|
|
|
template <typename Handler> void serialize(Handler &h, const int version)
|
|
template <typename Handler> void serialize(Handler &h, const int version)
|
|
|
{
|
|
{
|
|
|
h & scenarioOps & initialOpts & currentPlayer & day & map & players & teams & hpool & globalEffects & rand;
|
|
h & scenarioOps & initialOpts & currentPlayer & day & map & players & teams & hpool & globalEffects & rand;
|
|
|
|
|
+ if(version >= 755)
|
|
|
|
|
+ {
|
|
|
|
|
+ h & rumor;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ rumor = RumorState();
|
|
|
|
|
+
|
|
|
BONUS_TREE_DESERIALIZATION_FIX
|
|
BONUS_TREE_DESERIALIZATION_FIX
|
|
|
}
|
|
}
|
|
|
|
|
|