From 3cf2be604275ec1ae7321b78dc6b62e559a5d7c7 Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 16 Jun 2009 11:19:59 -0500 Subject: [8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests. Author: Ambal --HG-- branch : trunk --- src/game/Creature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game/Creature.cpp') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 1fbea2da325..eb711a77ab5 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -263,8 +263,8 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data ) CreatureInfo const *cinfo = normalInfo; if(normalInfo->HeroicEntry) { - Map *map = MapManager::Instance().FindMap(GetMapId(), GetInstanceId()); - if(map && map->IsHeroic()) + //we already have valid Map pointer for current creature! + if(GetMap()->IsHeroic()) { cinfo = objmgr.GetCreatureTemplate(normalInfo->HeroicEntry); if(!cinfo) -- cgit v1.2.3