mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +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:
@ -1405,6 +1405,12 @@ void CGArtifact::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer)
|
||||
cb->startBattleI(hero, this);
|
||||
}
|
||||
|
||||
void CGArtifact::afterAddToMap(CMap * map)
|
||||
{
|
||||
if(ID == Obj::SPELL_SCROLL && storedArtifact && storedArtifact->id.getNum() < 0)
|
||||
map->addNewArtifactInstance(storedArtifact);
|
||||
}
|
||||
|
||||
void CGArtifact::serializeJsonOptions(JsonSerializeFormat& handler)
|
||||
{
|
||||
handler.serializeString("guardMessage", message);
|
||||
|
Reference in New Issue
Block a user