*Update spell range calculation. Original patch by QAston.
--HG-- branch : trunk
This commit is contained in:
1 parent
450c0a45b8
commit
d36672cd7e
12 files changed
+42
-32
No files matched your search
+2
-3
@@ -443,14 +443,13 @@ bool Unit::IsWithinCombatDist(Unit *obj, float dist2compare) const
|
||||
|
||||
void Unit::GetRandomContactPoint( const Unit* obj, float &x, float &y, float &z, float distance2dMin, float distance2dMax ) const
|
||||
{
|
||||
//assert(GetCombatReach() > 0.1);
|
||||
float combat_reach = GetCombatReach();
|
||||
if(combat_reach < 0.1)
|
||||
if(combat_reach < 0.1) // sometimes bugged for players
|
||||
{
|
||||
sLog.outError("Unit %u (Type: %u) has invalid combat_reach %f",GetGUIDLow(),GetTypeId(),combat_reach);
|
||||
if(GetTypeId() == TYPEID_UNIT)
|
||||
sLog.outError("Creature entry %u has invalid combat_reach", ((Creature*)this)->GetEntry());
|
||||
combat_reach = 0.5;
|
||||
combat_reach = DEFAULT_COMBAT_REACH;
|
||||
}
|
||||
uint32 attacker_number = getAttackers().size();
|
||||
if(attacker_number > 0) --attacker_number;
|
||||
|
||||
Reference in new issue
Block a user