1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

[Refactoring] use virtual method for object specific actions when new map object is created

* --TODO
* fixes CID 1366291, CID 1366297
This commit is contained in:
AlexVinS
2017-05-28 16:23:42 +03:00
parent fc55efb72d
commit 70a092f58c
12 changed files with 63 additions and 34 deletions

View File

@@ -23,6 +23,7 @@ struct MetaString;
struct BattleResult;
class JsonSerializeFormat;
class CRandomGenerator;
class CMap;
// This one teleport-specific, but has to be available everywhere in callbacks and netpacks
// For now it's will be there till teleports code refactored and moved into own file
@@ -172,7 +173,7 @@ public:
/// method for synchronous update. Note: For new properties classes should override setPropertyDer instead
void setProperty(ui8 what, ui32 val) override final;
//friend class CGameHandler;
virtual void afterAddToMap(CMap * map);
///Entry point of binary (de-)serialization
template <typename Handler> void serialize(Handler &h, const int version)