mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Map objects now use shared_ptr (game)
This commit is contained in:
@ -1604,13 +1604,12 @@ std::string CGHeroInstance::getHeroTypeName() const
|
||||
|
||||
void CGHeroInstance::afterAddToMap(CMap * map)
|
||||
{
|
||||
if(ID != Obj::PRISON)
|
||||
map->heroesOnMap.emplace_back(this);
|
||||
map->heroAddedToMap(this);
|
||||
}
|
||||
|
||||
void CGHeroInstance::afterRemoveFromMap(CMap* map)
|
||||
{
|
||||
if (ID == Obj::PRISON)
|
||||
vstd::erase_if_present(map->heroesOnMap, this);
|
||||
map->heroRemovedFromMap(this);
|
||||
}
|
||||
|
||||
void CGHeroInstance::setHeroTypeName(const std::string & identifier)
|
||||
|
Reference in New Issue
Block a user