mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Remove excess pointer from market interface
This commit is contained in:
@@ -220,7 +220,7 @@ bool CGTownInstance::hasCapitol() const
|
||||
|
||||
CGTownInstance::CGTownInstance():
|
||||
IShipyard(this),
|
||||
IMarket(this),
|
||||
IMarket(),
|
||||
town(nullptr),
|
||||
builded(0),
|
||||
destroyed(0),
|
||||
@@ -365,23 +365,6 @@ bool CGTownInstance::isBonusingBuildingAdded(BuildingID::EBuildingID bid) const
|
||||
return present != bonusingBuildings.end();
|
||||
}
|
||||
|
||||
//it does not check hasBuilt because this check is in the OnHeroVisit handler
|
||||
void CGTownInstance::tryAddOnePerWeekBonus(BuildingSubID::EBuildingSubID subID)
|
||||
{
|
||||
auto bid = town->getBuildingType(subID);
|
||||
|
||||
if(bid != BuildingID::NONE && !isBonusingBuildingAdded(bid))
|
||||
bonusingBuildings.push_back(new COPWBonus(bid, subID, this));
|
||||
}
|
||||
|
||||
void CGTownInstance::tryAddVisitingBonus(BuildingSubID::EBuildingSubID subID)
|
||||
{
|
||||
auto bid = town->getBuildingType(subID);
|
||||
|
||||
if(bid != BuildingID::NONE && !isBonusingBuildingAdded(bid))
|
||||
bonusingBuildings.push_back(new CTownBonus(bid, subID, this));
|
||||
}
|
||||
|
||||
void CGTownInstance::addTownBonuses()
|
||||
{
|
||||
for(const auto & kvp : town->buildings)
|
||||
@@ -487,11 +470,6 @@ void CGTownInstance::initObj(CRandomGenerator & rand) ///initialize town structu
|
||||
updateAppearance();
|
||||
}
|
||||
|
||||
bool CGTownInstance::hasBuiltInOldWay(ETownType::ETownType type, const BuildingID & bid) const
|
||||
{
|
||||
return (this->town->faction != nullptr && this->town->faction->getIndex() == type && hasBuilt(bid));
|
||||
}
|
||||
|
||||
void CGTownInstance::newTurn(CRandomGenerator & rand) const
|
||||
{
|
||||
if (cb->getDate(Date::DAY_OF_WEEK) == 1) //reset on new week
|
||||
|
||||
Reference in New Issue
Block a user