Make IObjectInterface::cb non-static
This commit is contained in:
1 parent
c37ce05d06
commit
a15366f5a5
89 files changed
+502
-445
No files matched your search
@@ -128,7 +128,7 @@ class TemporaryArmy : public CArmedInstance
|
||||
public:
|
||||
void armyChanged() override {}
|
||||
TemporaryArmy()
|
||||
:CArmedInstance(true)
|
||||
:CArmedInstance(nullptr, true)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -165,7 +165,7 @@ void DangerHitMapAnalyzer::calculateTileOwners()
|
||||
|
||||
auto addTownHero = [&](const CGTownInstance * town)
|
||||
{
|
||||
auto townHero = new CGHeroInstance();
|
||||
auto townHero = new CGHeroInstance(nullptr);
|
||||
CRandomGenerator rng;
|
||||
auto visitablePos = town->visitablePos();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ ui64 FuzzyHelper::estimateBankDanger(const CBank * bank)
|
||||
|
||||
ui64 totalStrength = 0;
|
||||
ui8 totalChance = 0;
|
||||
for(auto config : bankInfo->getPossibleGuards())
|
||||
for(auto config : bankInfo->getPossibleGuards(bank->cb))
|
||||
{
|
||||
totalStrength += config.second.totalStrength * config.first;
|
||||
totalChance += config.first;
|
||||
|
||||
@@ -98,7 +98,7 @@ std::string CompleteQuest::questToString() const
|
||||
return "inactive quest";
|
||||
|
||||
MetaString ms;
|
||||
q.quest->getRolloverText(ms, false);
|
||||
q.quest->getRolloverText(q.obj->cb, ms, false);
|
||||
|
||||
return ms.toString();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
virtual bool needsLastStack() const override;
|
||||
std::shared_ptr<SpecialAction> getActorAction() const;
|
||||
|
||||
HeroExchangeArmy(): CArmedInstance(true), requireBuyArmy(false) {}
|
||||
HeroExchangeArmy(): CArmedInstance(nullptr, true), requireBuyArmy(false) {}
|
||||
};
|
||||
|
||||
struct ExchangeResult
|
||||
|
||||
@@ -72,7 +72,7 @@ ui64 FuzzyHelper::estimateBankDanger(const CBank * bank)
|
||||
|
||||
ui64 totalStrength = 0;
|
||||
ui8 totalChance = 0;
|
||||
for(auto config : bankInfo->getPossibleGuards())
|
||||
for(auto config : bankInfo->getPossibleGuards(bank->cb))
|
||||
{
|
||||
totalStrength += config.second.totalStrength * config.first;
|
||||
totalChance += config.first;
|
||||
|
||||
@@ -103,7 +103,7 @@ std::string CompleteQuest::questToString() const
|
||||
return "inactive quest";
|
||||
|
||||
MetaString ms;
|
||||
q.quest->getRolloverText(ms, false);
|
||||
q.quest->getRolloverText(q.obj->cb, ms, false);
|
||||
|
||||
return ms.toString();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user