Fixed bug #672490: FlameShield can now be cast on catapults and naval units
This commit is contained in:
parent
a9bdf276ed
commit
f65b4f5ac8
2 changed files with 9 additions and 3 deletions
|
@ -1042,6 +1042,8 @@
|
|||
<LI>Fixed bug #668971: Segfaults on game load (from Jimmy Salmon).
|
||||
<LI>Fixed bug #672467: FlameShield is unable to hit air (from
|
||||
Jimmy Salmon).
|
||||
<LI>Fixed bug #672490: FlameShield can now be cast on catapults and naval
|
||||
units (from Jimmy Salmon).
|
||||
<LI>+++
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
@ -640,8 +640,10 @@ global int CanCastSpell(const Unit* unit, const SpellType* spell,
|
|||
return 0;
|
||||
|
||||
case SpellActionFlameShield:
|
||||
// flame shield only on organic land units?
|
||||
if (target && target->Type->Organic && target->Type->LandUnit
|
||||
// flame shield only on land and sea units
|
||||
if (target && !target->Type->Building
|
||||
&& (target->Type->UnitType == UnitTypeLand
|
||||
|| target->Type->UnitType == UnitTypeNaval)
|
||||
&& target->FlameShield < spell->TTL ) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -876,7 +878,9 @@ global int SpellCast(Unit * unit, const SpellType * spell, Unit * target,
|
|||
break;
|
||||
|
||||
case SpellActionFlameShield:
|
||||
if (target && target->Type->Organic && target->Type->LandUnit
|
||||
if (target && !target->Type->Building
|
||||
&& (target->Type->UnitType == UnitTypeLand
|
||||
|| target->Type->UnitType == UnitTypeNaval)
|
||||
&& target->FlameShield < spell->TTL) {
|
||||
Missile* mis;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue