[8699] Fix instance bound difficulty selection.

This must fix crashes at enter to heroic mode instances and raids showup after client switch.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

I can't repeat crashes with existed raids after changes apply but possible in some cases
need drop content of related DB table for resolve some crashes.
This commit is contained in:
laise 2009-10-21 22:46:40 +04:00 committed by VladimirMangos
parent 97c94cff56
commit 211b50ce63
3 changed files with 5 additions and 3 deletions

View file

@ -167,7 +167,9 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
// if no instanceId via group members or instance saves is found
// the instance will be created for the first time
NewInstanceId = MapManager::Instance().GenerateInstanceId();
map = CreateInstance(NewInstanceId, NULL, player->GetDifficulty(IsRaid()));
Difficulty diff = player->GetGroup() ? player->GetGroup()->GetDifficulty(IsRaid()) : player->GetDifficulty(IsRaid());
map = CreateInstance(NewInstanceId, NULL, diff);
}
}