mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Access to heroes storage in CMap is now done via public methods
This commit is contained in:
@@ -174,8 +174,8 @@ void setPlayerColor(QImage * sur, PlayerColor player)
|
||||
std::shared_ptr<QImage> MapHandler::getObjectImage(const CGObjectInstance * obj)
|
||||
{
|
||||
if( !obj
|
||||
|| (obj->ID==Obj::HERO && static_cast<const CGHeroInstance*>(obj)->isGarrisoned()) //garrisoned hero
|
||||
|| (obj->ID==Obj::BOAT && static_cast<const CGBoat*>(obj)->hero)) //boat with hero (hero graphics is used)
|
||||
|| (obj->ID==Obj::HERO && dynamic_cast<const CGHeroInstance*>(obj)->isGarrisoned()) //garrisoned hero
|
||||
|| (obj->ID==Obj::BOAT && dynamic_cast<const CGBoat*>(obj)->getBoardedHero())) //boat with hero (hero graphics is used)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user