mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Correctly restore bonus system on deserialization
This commit is contained in:
@@ -22,6 +22,7 @@ struct Component;
|
||||
class JsonSerializeFormat;
|
||||
class ObjectTemplate;
|
||||
class CMap;
|
||||
class CGameState;
|
||||
class AObjectTypeHandler;
|
||||
using TObjectTypeHandler = std::shared_ptr<AObjectTypeHandler>;
|
||||
|
||||
@@ -136,8 +137,11 @@ public:
|
||||
/// method for synchronous update. Note: For new properties classes should override setPropertyDer instead
|
||||
void setProperty(ObjProperty what, ObjPropertyID identifier) final;
|
||||
|
||||
virtual void afterAddToMap(CMap * map);
|
||||
virtual void afterRemoveFromMap(CMap * map);
|
||||
virtual void afterAddToMap(CMap * map){};
|
||||
virtual void afterRemoveFromMap(CMap * map){};
|
||||
virtual void attachToBonusSystem(CGameState * gs){};
|
||||
virtual void detachFromBonusSystem(CGameState * gs){};
|
||||
virtual void restoreBonusSystem(CGameState * gs){};
|
||||
|
||||
///Entry point of binary (de-)serialization
|
||||
template <typename Handler> void serialize(Handler &h)
|
||||
|
||||
Reference in New Issue
Block a user