[svn] Add some assert for better debug.
--HG-- branch : trunk
This commit is contained in:
@@ -425,6 +425,7 @@ 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);
|
||||
uint32 attacker_number = getAttackers().size();
|
||||
if(attacker_number > 0) --attacker_number;
|
||||
GetNearPoint(obj,x,y,z,obj->GetCombatReach(), distance2dMin+(distance2dMax-distance2dMin)*rand_norm()
|
||||
@@ -983,6 +984,7 @@ void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castIte
|
||||
|
||||
void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, Item *castItem, Aura* triggredByAura, uint64 originalCaster)
|
||||
{
|
||||
assert(Victim);
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("CastSpell: unknown spell by caster: %s %u)", (GetTypeId()==TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId()==TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
|
||||
|
||||
Reference in New Issue
Block a user