*Fix some crashes.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-02-17 18:43:51 +01:00
parent eafa0eb5df
commit 3628b427ba
+6
View File
@@ -10229,6 +10229,8 @@ void Unit::ApplyDiminishingAura( DiminishingGroup group, bool apply )
uint32 Unit::GetSpellMaxRangeForTarget(Unit* target,const SpellRangeEntry * rangeEntry)
{
if (!rangeEntry)
return 0;
if (rangeEntry->maxRangeHostile == rangeEntry->maxRangeFriend)
return rangeEntry->maxRangeFriend;
if (IsHostileTo(target))
@@ -10237,6 +10239,8 @@ uint32 Unit::GetSpellMaxRangeForTarget(Unit* target,const SpellRangeEntry * rang
};
uint32 Unit::GetSpellMinRangeForTarget(Unit* target,const SpellRangeEntry * rangeEntry)
{
if (!rangeEntry)
return 0;
if (rangeEntry->minRangeHostile == rangeEntry->minRangeFriend)
return rangeEntry->minRangeFriend;
if (IsHostileTo(target))
@@ -10245,6 +10249,8 @@ uint32 Unit::GetSpellMinRangeForTarget(Unit* target,const SpellRangeEntry * rang
};
uint32 Unit::GetSpellRadiusForTarget(Unit* target,const SpellRadiusEntry * radiusEntry)
{
if (!radiusEntry)
return 0;
if (radiusEntry->radiusHostile == radiusEntry->radiusFriend)
return radiusEntry->radiusFriend;
if (IsHostileTo(target))