mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Remove more subID access
This commit is contained in:
@@ -129,6 +129,14 @@ bool CGMine::isAbandoned() const
|
||||
return (getObjTypeIndex() >= 7);
|
||||
}
|
||||
|
||||
ResourceSet CGMine::dailyIncome() const
|
||||
{
|
||||
ResourceSet result;
|
||||
result[producedResource] += defaultResProduction();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string CGMine::getObjectName() const
|
||||
{
|
||||
return VLC->generaltexth->translate("core.minename", getObjTypeIndex());
|
||||
@@ -466,7 +474,7 @@ TeleportChannelID CGMonolith::findMeChannel(const std::vector<Obj> & IDs, int Su
|
||||
if(!obj)
|
||||
continue;
|
||||
|
||||
const auto * teleportObj = dynamic_cast<const CGTeleport *>(cb->getObj(obj->id));
|
||||
const auto * teleportObj = dynamic_cast<const CGMonolith *>(cb->getObj(obj->id));
|
||||
if(teleportObj && vstd::contains(IDs, teleportObj->ID) && teleportObj->subID == SubID)
|
||||
return teleportObj->channel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user