*Cleanup in ObjectAccessor - this should fix some crashes

--HG--
branch : trunk
This commit is contained in:
QAston committed 2010-07-28 00:08:21 +02:00
1 parent 51400a4e15
commit e232c0e235
13 files changed
+123 -160

No files matched your search

+2 -4
View File
@@ -9400,13 +9400,11 @@ bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit const
return HasFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1));
}
Unit *Unit::GetOwner(bool inWorld) const
Unit *Unit::GetOwner() const
{
if (uint64 ownerid = GetOwnerGUID())
{
if (inWorld)
return ObjectAccessor::GetUnit(*this, ownerid);
return ObjectAccessor::GetUnitInOrOutOfWorld(*this, ownerid);
return ObjectAccessor::GetUnit(*this, ownerid);
}
return NULL;
}