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/Creature.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/Creature.cpp')
| -rw-r--r-- | src/game/Creature.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 44270574c2f..8a15cb88167 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -698,8 +698,8 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, return false; } - SetMapId(map->GetId()); - SetInstanceId(map->GetInstanceId()); + ASSERT(map); + SetMap(map); SetPhaseMask(phaseMask,false); //oX = x; oY = y; dX = x; dY = y; m_moveTime = 0; m_startMove = 0; @@ -2055,7 +2055,7 @@ void Creature::CallAssistance() TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher); CellLock<GridReadGuard> cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_creature_searcher, *MapManager::Instance().GetMap(GetMapId(), this)); + cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap()); } if (!assistList.empty()) |
