aboutsummaryrefslogtreecommitdiff
path: root/src/game/AchievementMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-01 18:36:03 -0500
committermegamage <none@none>2009-07-01 18:36:03 -0500
commit4a8a89e1db1f103020ffecbb570e1c570c2e0d21 (patch)
treed5e62fa664a0f36d668f738abc50ac9406d50e5a /src/game/AchievementMgr.cpp
parent111dac5f94eac3fe26da2107842dea4e1aacd660 (diff)
[8103] More wide use IsInWorld checks and delayed at teleport operations. Author: Ambal
* IsInWorld used to prevent return unexpected not in world objects. * Delayed operations need to process its in world state. --HG-- branch : trunk
Diffstat (limited to 'src/game/AchievementMgr.cpp')
-rw-r--r--src/game/AchievementMgr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp
index f73f68e1f89..90bd4177ac1 100644
--- a/src/game/AchievementMgr.cpp
+++ b/src/game/AchievementMgr.cpp
@@ -35,6 +35,7 @@
#include "ProgressBar.h"
#include "SpellMgr.h"
+#include "MapManager.h"
INSTANTIATE_SINGLETON_1(AchievementGlobalMgr);
@@ -827,8 +828,8 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if(!miscvalue1)
continue;
- Map const* map = GetPlayer()->GetMap();
- if(!map->IsDungeon())
+ Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : MapManager::Instance().FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId());
+ if(!map || !map->IsDungeon())
continue;
// search case