mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +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:
@@ -18,7 +18,7 @@
|
||||
#include "../CModHandler.h"
|
||||
#include "../IGameCallback.h"
|
||||
#include "../CGameState.h"
|
||||
#include "../mapping/CMapDefines.h"
|
||||
#include "../mapping/CMap.h"
|
||||
#include "../CPlayerState.h"
|
||||
#include "../serializer/JsonSerializeFormat.h"
|
||||
|
||||
@@ -1335,6 +1335,11 @@ void CGTownInstance::battleFinished(const CGHeroInstance *hero, const BattleResu
|
||||
}
|
||||
}
|
||||
|
||||
void CGTownInstance::afterAddToMap(CMap * map)
|
||||
{
|
||||
map->towns.push_back(this);
|
||||
}
|
||||
|
||||
void CGTownInstance::serializeJsonOptions(JsonSerializeFormat & handler)
|
||||
{
|
||||
CGObjectInstance::serializeJsonOwner(handler);
|
||||
|
||||
Reference in New Issue
Block a user