aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 6c04104d619..34f52daa974 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1892,16 +1892,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
break;
}
- if(cur == TARGET_DEST_TARGET_ENEMY)
+ if(cur == TARGET_DEST_TARGET_ENEMY || cur == TARGET_DEST_TARGET_ANY)
{
m_targets.setDestination(target, true);
break;
}
- else if(cur == TARGET_DEST_TARGET_FRIEND) // no ground?
- {
- m_targets.setDestination(target, false);
- break;
- }
float x, y, z, angle, dist;
@@ -3733,7 +3728,10 @@ uint8 Spell::CanCast(bool strict)
return SPELL_FAILED_NOT_IN_ARENA;
// zone check
- if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(),
+ uint32 zone, area;
+ m_caster->GetZoneAndAreaId(zone,area);
+
+ if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),zone,area,
m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster) : NULL))
return res;