1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

reduced visibility for members of Mine and Dwellings

This commit is contained in:
Ivan Savenko 2015-12-02 22:34:13 +02:00
parent 7189a12df2
commit 90dfe3e782
2 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -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);