[-] Fixed bug with "corpse" autocast condition check

This commit is contained in:
cybermind 2014-06-11 17:49:38 +06:00
parent 10996157dd
commit 2e0652a04e
2 changed files with 2 additions and 2 deletions

View file

@ -174,7 +174,7 @@ public:
#define ACP_NOVALUE -1
#define ACP_DISTANCE -2
AutoCastInfo() : Range(0), MinRange(0), PriorytyVar(ACP_NOVALUE), ReverseSort(false), Condition(NULL),
Combat(0), Attacker(0), Corpse(0), PositionAutoCast(NULL) {};
Combat(0), Attacker(0), Corpse(CONDITION_FALSE), PositionAutoCast(NULL) {};
~AutoCastInfo()
{
delete Condition;

View file

@ -305,7 +305,7 @@ static Target *SelectTargetUnitsOfAutoCast(CUnit &caster, const SpellType &spell
continue;
}
} else if (autocast->Corpse == CONDITION_FALSE) {
if (table[i]->CurrentAction() == UnitActionDie) {
if (table[i]->CurrentAction() == UnitActionDie || table[i]->IsAlive() == false) {
continue;
}
}