Explorar o código

Fixed CID 1375705, CID 1375709, CID 1375708

AlexVinS %!s(int64=8) %!d(string=hai) anos
pai
achega
a7ed27c73f
Modificáronse 2 ficheiros con 22 adicións e 3 borrados
  1. 19 0
      lib/mapObjects/CGTownInstance.cpp
  2. 3 3
      lib/mapObjects/CGTownInstance.h

+ 19 - 0
lib/mapObjects/CGTownInstance.cpp

@@ -25,6 +25,18 @@
 std::vector<const CArtifact *> CGTownInstance::merchantArtifacts;
 std::vector<int> CGTownInstance::universitySkills;
 
+CSpecObjInfo::CSpecObjInfo():
+	owner(nullptr)
+{
+
+}
+
+CCreGenAsCastleInfo::CCreGenAsCastleInfo():
+	CSpecObjInfo(),	asCastle(false),identifier(0)
+{
+
+}
+
 void CCreGenAsCastleInfo::serializeJson(JsonSerializeFormat & handler)
 {
 	handler.serializeString("sameAsTown", instanceId);
@@ -52,6 +64,13 @@ void CCreGenAsCastleInfo::serializeJson(JsonSerializeFormat & handler)
 	}
 }
 
+CCreGenLeveledInfo::CCreGenLeveledInfo():
+	CSpecObjInfo(),
+	minLevel(0), maxLevel(7)
+{
+
+}
+
 void CCreGenLeveledInfo::serializeJson(JsonSerializeFormat & handler)
 {
 	handler.serializeInt("minLevel", minLevel, ui8(1));

+ 3 - 3
lib/mapObjects/CGTownInstance.h

@@ -23,7 +23,7 @@ class CGDwelling;
 class DLL_LINKAGE CSpecObjInfo
 {
 public:
-	CSpecObjInfo() = default;
+	CSpecObjInfo();
 	virtual ~CSpecObjInfo() = default;
 
 	virtual void serializeJson(JsonSerializeFormat & handler) = 0;
@@ -34,7 +34,7 @@ public:
 class DLL_LINKAGE CCreGenAsCastleInfo : public virtual CSpecObjInfo
 {
 public:
-	CCreGenAsCastleInfo() = default;
+	CCreGenAsCastleInfo();
 	bool asCastle;
 	ui32 identifier;//h3m internal identifier
 
@@ -47,7 +47,7 @@ public:
 class DLL_LINKAGE CCreGenLeveledInfo : public virtual CSpecObjInfo
 {
 public:
-	CCreGenLeveledInfo() = default;
+	CCreGenLeveledInfo();
 	ui8 minLevel, maxLevel; //minimal and maximal level of creature in dwelling: <1, 7>
 
 	void serializeJson(JsonSerializeFormat & handler) override;