diff options
author | megamage <none@none> | 2009-07-16 11:49:00 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-16 11:49:00 +0800 |
commit | 208087ff6ee592150b1ed387bbc135566a02a359 (patch) | |
tree | 42b3b460ce2276259e2673bc8b254e0812af1fbb /src/game/DynamicObject.cpp | |
parent | 762528c5dd7908de47f2c2a7dcc5e7c95eb79744 (diff) |
[8182] Store and use Map* pointer in WorldObject instead map ids for speedup Author: Ambal
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.
*This patch may cause crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/DynamicObject.cpp')
-rw-r--r-- | src/game/DynamicObject.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index dc2b05e8d6a..c910e343bd7 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -72,9 +72,8 @@ void DynamicObject::RemoveFromWorld() bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32 effIndex, float x, float y, float z, int32 duration, float radius ) { - SetInstanceId(caster->GetInstanceId()); - - WorldObject::_Create(guidlow, HIGHGUID_DYNAMICOBJECT, caster->GetMapId(), caster->GetPhaseMask()); + WorldObject::_Create(guidlow, HIGHGUID_DYNAMICOBJECT, caster->GetPhaseMask()); + SetMap(caster->GetMap()); Relocate(x, y, z, 0); if(!IsPositionValid()) |