mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
Fixed #1181. Do not change that setProperty to setPropertyDer, it has to be as it is.
Sketchy fix for BattleAIs colliding ith their callbacks.
This commit is contained in:
parent
a4129f43f2
commit
6232a1b369
@ -346,6 +346,7 @@ struct PotentialTargets
|
||||
|
||||
BattleAction CBattleAI::activeStack( const CStack * stack )
|
||||
{
|
||||
cbc = cb; //TODO: make solid sure that AIs always use their callbacks (need to take care of event handlers too)
|
||||
try
|
||||
{
|
||||
print("activeStack called for " + stack->nodeName());
|
||||
|
@ -1639,7 +1639,7 @@ void CGDwelling::initObj()
|
||||
}
|
||||
}
|
||||
|
||||
void CGDwelling::setPropertyDer(ui8 what, ui32 val)
|
||||
void CGDwelling::setProperty(ui8 what, ui32 val)
|
||||
{
|
||||
switch (what)
|
||||
{
|
||||
|
@ -478,7 +478,7 @@ public:
|
||||
void onHeroVisit(const CGHeroInstance * h) const override;
|
||||
void newTurn() const override;
|
||||
protected:
|
||||
void setPropertyDer(ui8 what, ui32 val) override;
|
||||
void setProperty(ui8 what, ui32 val) override;
|
||||
private:
|
||||
void heroAcceptsCreatures(const CGHeroInstance *h, ui32 answer) const;
|
||||
void fightOver(const CGHeroInstance *h, BattleResult *result) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user