[8103] More wide use IsInWorld checks and delayed at teleport operations.

* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ambal 2009-07-01 12:04:58 +04:00 committed by tomrus88
parent a8288b311e
commit 2baccbebc3
17 changed files with 220 additions and 40 deletions

View file

@ -32,6 +32,7 @@
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
#include "Language.h"
#include "MapManager.h"
#include "Policies/SingletonImp.h"
@ -825,8 +826,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