mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9593] Fixed bug in instance binding in case heroic/25-man raids difficulties
In fact typo in my old commit at adding support MapDifficulty.dbc.
This commit is contained in:
parent
e92e01ebac
commit
e692862827
5 changed files with 5 additions and 8 deletions
|
|
@ -1644,11 +1644,8 @@ InstanceGroupBind* Group::GetBoundInstance(Player* player)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
|
||||
InstanceGroupBind* Group::GetBoundInstance(Map* aMap, Difficulty difficulty)
|
||||
{
|
||||
// Currently spawn numbering not different from map difficulty
|
||||
Difficulty difficulty = GetDifficulty(aMap->IsRaid());
|
||||
|
||||
// some instances only have one difficulty
|
||||
MapDifficulty const* mapDiff = GetMapDifficultyData(aMap->GetId(),difficulty);
|
||||
if(!mapDiff)
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ class MANGOS_DLL_SPEC Group
|
|||
InstanceGroupBind* BindToInstance(InstanceSave *save, bool permanent, bool load = false);
|
||||
void UnbindInstance(uint32 mapid, uint8 difficulty, bool unload = false);
|
||||
InstanceGroupBind* GetBoundInstance(Player* player);
|
||||
InstanceGroupBind* GetBoundInstance(Map* aMap);
|
||||
InstanceGroupBind* GetBoundInstance(Map* aMap, Difficulty difficulty);
|
||||
BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; }
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -2450,7 +2450,7 @@ bool InstanceMap::Add(Player *player)
|
|||
if(pGroup)
|
||||
{
|
||||
// solo saves should be reset when entering a group
|
||||
InstanceGroupBind *groupBind = pGroup->GetBoundInstance(this);
|
||||
InstanceGroupBind *groupBind = pGroup->GetBoundInstance(this,GetDifficulty());
|
||||
if(playerBind)
|
||||
{
|
||||
sLog.outError("InstanceMap::Add: player %s(%d) is being put in instance %d,%d,%d,%d,%d,%d but he is in group %d and is bound to instance %d,%d,%d,%d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(pGroup->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
|
|||
InstanceGroupBind *groupBind = NULL;
|
||||
Group *group = player->GetGroup();
|
||||
// use the player's difficulty setting (it may not be the same as the group's)
|
||||
if(group && (groupBind = group->GetBoundInstance(this)))
|
||||
if(group && (groupBind = group->GetBoundInstance(this,player->GetDifficulty(IsRaid()))))
|
||||
pSave = groupBind->save;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9592"
|
||||
#define REVISION_NR "9593"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue