mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Merge branch 'vcmi/master' into 'vcmi/develop'
This commit is contained in:
@@ -398,7 +398,7 @@ void CBank::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) cons
|
||||
if (answer)
|
||||
{
|
||||
if (bankConfig) // not looted bank
|
||||
cb->startBattleI(hero, this, true);
|
||||
cb->startBattleI(hero, this, !regularUnitPlacement);
|
||||
else
|
||||
doVisit(hero);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ class DLL_LINKAGE CBank : public CArmedInstance
|
||||
ui32 daycounter;
|
||||
ui32 resetDuration;
|
||||
bool coastVisitable;
|
||||
bool regularUnitPlacement;
|
||||
|
||||
void setPropertyDer(ObjProperty what, ObjPropertyID identifier) override;
|
||||
void doVisit(const CGHeroInstance * hero) const;
|
||||
@@ -50,6 +51,10 @@ public:
|
||||
h & bankConfig;
|
||||
h & resetDuration;
|
||||
h & coastVisitable;
|
||||
if (h.version >= Handler::Version::BANK_UNIT_PLACEMENT)
|
||||
h & regularUnitPlacement;
|
||||
else if (!h.saving)
|
||||
regularUnitPlacement = false;
|
||||
}
|
||||
|
||||
friend class CBankInstanceConstructor;
|
||||
|
||||
Reference in New Issue
Block a user