mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	reduced visibility for members of Mine and Dwellings
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| #pragma once | ||||
| #pragma once | ||||
|  | ||||
| #include "CObjectHandler.h" | ||||
| #include "CGMarket.h" // For IMarket interface | ||||
| @@ -52,11 +52,7 @@ public: | ||||
| 	CSpecObjInfo * info; //h3m info about dewlling | ||||
| 	TCreaturesSet creatures; //creatures[level] -> <vector of alternative ids (base creature and upgrades, creatures amount> | ||||
|  | ||||
| 	template <typename Handler> void serialize(Handler &h, const int version) | ||||
| 	{ | ||||
| 		h & static_cast<CArmedInstance&>(*this) & creatures; | ||||
| 	} | ||||
|  | ||||
| private: | ||||
| 	void initObj() override; | ||||
| 	void onHeroVisit(const CGHeroInstance * h) const override; | ||||
| 	void newTurn() const override; | ||||
| @@ -64,9 +60,14 @@ public: | ||||
| 	void battleFinished(const CGHeroInstance *hero, const BattleResult &result) const override; | ||||
| 	void blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) const override; | ||||
|  | ||||
| private: | ||||
| 	void updateGuards() const; | ||||
| 	void heroAcceptsCreatures(const CGHeroInstance *h) const; | ||||
|  | ||||
| public: | ||||
| 	template <typename Handler> void serialize(Handler &h, const int version) | ||||
| 	{ | ||||
| 		h & static_cast<CArmedInstance&>(*this) & creatures; | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| class DLL_LINKAGE CGTownBuilding : public IObjectInterface | ||||
|   | ||||
| @@ -227,7 +227,8 @@ class DLL_LINKAGE CGMine : public CArmedInstance | ||||
| public: | ||||
| 	Res::ERes producedResource; | ||||
| 	ui32 producedQuantity; | ||||
| 	 | ||||
|  | ||||
| private: | ||||
| 	void onHeroVisit(const CGHeroInstance * h) const override; | ||||
| 	void battleFinished(const CGHeroInstance *hero, const BattleResult &result) const override; | ||||
| 	void blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) const override; | ||||
| @@ -239,6 +240,7 @@ public: | ||||
| 	std::string getObjectName() const override; | ||||
| 	std::string getHoverText(PlayerColor player) const override; | ||||
|  | ||||
| public: | ||||
| 	template <typename Handler> void serialize(Handler &h, const int version) | ||||
| 	{ | ||||
| 		h & static_cast<CArmedInstance&>(*this); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user