瀏覽代碼

Fix build

Ivan Savenko 1 年之前
父節點
當前提交
32a2e540d3
共有 3 個文件被更改,包括 7 次插入4 次删除
  1. 4 0
      lib/networkPacks/ObjProperty.h
  2. 0 2
      lib/networkPacks/PacksForClient.h
  3. 3 2
      test/mock/mock_IGameCallback.h

+ 4 - 0
lib/networkPacks/ObjProperty.h

@@ -12,6 +12,8 @@
 #include "../constants/VariantIdentifier.h"
 #include "../constants/EntityIdentifiers.h"
 
+VCMI_LIB_NAMESPACE_BEGIN
+
 enum class ObjProperty : int8_t
 {
 	INVALID,
@@ -67,3 +69,5 @@ public:
 };
 
 using ObjPropertyID = VariantIdentifier<NumericID, MapObjectID, ObjectInstanceID, CreatureID, PlayerColor, TeamID>;
+
+VCMI_LIB_NAMESPACE_END

+ 0 - 2
lib/networkPacks/PacksForClient.h

@@ -1216,7 +1216,6 @@ struct DLL_LINKAGE SetObjectProperty : public CPackForClient
 	ObjProperty what{};
 
 	ObjPropertyID identifier;
-	int32_t value = 0;
 
 	SetObjectProperty() = default;
 
@@ -1227,7 +1226,6 @@ struct DLL_LINKAGE SetObjectProperty : public CPackForClient
 		h & id;
 		h & what;
 		h & identifier;
-		h & value;
 	}
 };
 

+ 3 - 2
test/mock/mock_IGameCallback.h

@@ -35,13 +35,14 @@ public:
 
 	//TODO: fail all stub calls
 
-	void setObjProperty(ObjectInstanceID objid, int prop, si64 val) override {}
+	void setObjPropertyValue(ObjectInstanceID objid, ObjProperty prop, int32_t value = 0) override {}
+	void setObjPropertyID(ObjectInstanceID objid, ObjProperty prop, ObjPropertyID identifier) override {}
 	void showInfoDialog(InfoWindow * iw) override {}
 	void showInfoDialog(const std::string & msg, PlayerColor player) override {}
 
 	void changeSpells(const CGHeroInstance * hero, bool give, const std::set<SpellID> &spells) override {}
 	bool removeObject(const CGObjectInstance * obj, const PlayerColor & initiator) override {return false;}
-	void createObject(const int3 & visitablePosition, const PlayerColor & initiator, Obj type, int32_t subtype = 0) override {};
+	void createObject(const int3 & visitablePosition, const PlayerColor & initiator, MapObjectID type, MapObjectSubID subtype) override {};
 	void setOwner(const CGObjectInstance * objid, PlayerColor owner) override {}
 	void changePrimSkill(const CGHeroInstance * hero, PrimarySkill which, si64 val, bool abs=false) override {}
 	void changeSecSkill(const CGHeroInstance * hero, SecondarySkill which, int val, bool abs=false) override {}