فهرست منبع

More missing serialization items.

Michał W. Urbańczyk 12 سال پیش
والد
کامیت
c920f29c45
3فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      lib/CHeroHandler.h
  2. 1 1
      lib/CTownHandler.cpp
  3. 2 2
      lib/CTownHandler.h

+ 1 - 1
lib/CHeroHandler.h

@@ -120,7 +120,7 @@ public:
 
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
-		h & identifier & name & faction;// & aggression;
+		h & identifier & name & faction & id;// & aggression;
 		h & primarySkillInitial   & primarySkillLowLevel;
 		h & primarySkillHighLevel & secSkillProbability;
 		h & selectionProbability;

+ 1 - 1
lib/CTownHandler.cpp

@@ -58,7 +58,7 @@ si32 CBuilding::getDistance(BuildingID buildID) const
 
 CFaction::CFaction()
 {
-
+	town = nullptr;
 }
 
 CFaction::~CFaction()

+ 2 - 2
lib/CTownHandler.h

@@ -119,7 +119,7 @@ public:
 
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
-		h & name & index & nativeTerrain & creatureBg120 & creatureBg130 & puzzleMap;
+		h & name & index & nativeTerrain & alignment & commander & town & creatureBg120 & creatureBg130 & puzzleMap;
 	}
 };
 
@@ -142,7 +142,7 @@ public:
 	std::vector<std::string> dwellings; //defs for adventure map dwellings for new towns, [0] means tier 1 creatures etc.
 	std::vector<std::string> dwellingNames;
 
-	// should be removed at least from configs in favour of auto-detection
+	// should be removed at least from configs in favor of auto-detection
 	std::map<int,int> hordeLvl; //[0] - first horde building creature level; [1] - second horde building (-1 if not present)
 	ui32 mageLevel; //max available mage guild level
 	ui16 primaryRes;