mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
97c94cff56
commit
211b50ce63
3 changed files with 5 additions and 3 deletions
|
|
@ -1596,7 +1596,7 @@ InstanceGroupBind* Group::GetBoundInstance(Player* player)
|
||||||
InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
|
InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
|
||||||
{
|
{
|
||||||
// Currently spawn numbering not different from map difficulty
|
// Currently spawn numbering not different from map difficulty
|
||||||
Difficulty difficulty = Difficulty(aMap->GetSpawnMode());
|
Difficulty difficulty = GetDifficulty(aMap->IsRaid());
|
||||||
|
|
||||||
// some instances only have one difficulty
|
// some instances only have one difficulty
|
||||||
MapDifficulty const* mapDiff = GetMapDifficultyData(aMap->GetId(),difficulty);
|
MapDifficulty const* mapDiff = GetMapDifficultyData(aMap->GetId(),difficulty);
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,9 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
|
||||||
// if no instanceId via group members or instance saves is found
|
// if no instanceId via group members or instance saves is found
|
||||||
// the instance will be created for the first time
|
// the instance will be created for the first time
|
||||||
NewInstanceId = MapManager::Instance().GenerateInstanceId();
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8698"
|
#define REVISION_NR "8699"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue