Core/Spells: Removed unneeded phase check from spell casts, its already done in canSeeOrDetect for spells that need it. Probably more phase checks are not needed either

This commit is contained in:
Shauren committed 2012-04-18 22:27:40 +02:00
1 parent 5b80e7360b
commit 4818c70dcb
6 files changed
+18 -22

No files matched your search

+2 -2
View File
@@ -460,7 +460,7 @@ void Unit::resetAttackTimer(WeaponAttackType type)
bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
{
if (!obj || !IsInMap(obj))
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
return false;
float dx = GetPositionX() - obj->GetPositionX();
@@ -476,7 +476,7 @@ bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const
{
if (!obj || !IsInMap(obj))
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
return false;
float dx = GetPositionX() - obj->GetPositionX();