mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +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:
@ -346,6 +346,7 @@ struct PotentialTargets
|
|||||||
|
|
||||||
BattleAction CBattleAI::activeStack( const CStack * stack )
|
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
|
try
|
||||||
{
|
{
|
||||||
print("activeStack called for " + stack->nodeName());
|
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)
|
switch (what)
|
||||||
{
|
{
|
||||||
|
@ -478,7 +478,7 @@ public:
|
|||||||
void onHeroVisit(const CGHeroInstance * h) const override;
|
void onHeroVisit(const CGHeroInstance * h) const override;
|
||||||
void newTurn() const override;
|
void newTurn() const override;
|
||||||
protected:
|
protected:
|
||||||
void setPropertyDer(ui8 what, ui32 val) override;
|
void setProperty(ui8 what, ui32 val) override;
|
||||||
private:
|
private:
|
||||||
void heroAcceptsCreatures(const CGHeroInstance *h, ui32 answer) const;
|
void heroAcceptsCreatures(const CGHeroInstance *h, ui32 answer) const;
|
||||||
void fightOver(const CGHeroInstance *h, BattleResult *result) const;
|
void fightOver(const CGHeroInstance *h, BattleResult *result) const;
|
||||||
|
Reference in New Issue
Block a user