*Fix a crash in Object.h

*Fix action button saving
*Fix a crash on item swap in guild bank
*Fix exploit moving after death in Unit.cpp
*Fix assert fail at grid load in Creature.cpp
Thanks Sisif for these! :)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-31 02:14:25 -07:00
parent ca1e026c4f
commit 52bab5854f
5 changed files with 15 additions and 5 deletions
+4 -1
View File
@@ -518,7 +518,10 @@ class TRINITY_DLL_SPEC WorldObject : public Object, public WorldLocation
bool IsInMap(const WorldObject* obj) const
{
return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
if (obj)
return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
else
return false;
}
bool IsWithinDist3d(float x, float y, float z, float dist) const
{ return IsInDist(x, y, z, dist + GetObjectSize()); }