mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10123] Fixed recent problem with enter to dungeons in group.
Problem related to implicit get map id from player in Group::GetBoundInstance when in some cases check done before player mapid update.
This commit is contained in:
parent
15390df4d9
commit
41f8cfb14c
5 changed files with 6 additions and 7 deletions
|
|
@ -1122,7 +1122,7 @@ bool Group::_addMember(const uint64 &guid, const char* name, bool isAssistant, u
|
|||
else
|
||||
player->SetGroup(this, group);
|
||||
// if the same group invites the player back, cancel the homebind timer
|
||||
InstanceGroupBind *bind = GetBoundInstance(player);
|
||||
InstanceGroupBind *bind = GetBoundInstance(player->GetMapId(), player);
|
||||
if(bind && bind->save->GetInstanceId() == player->GetInstanceId())
|
||||
player->m_InstanceValid = true;
|
||||
}
|
||||
|
|
@ -1651,9 +1651,8 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo)
|
|||
}
|
||||
}
|
||||
|
||||
InstanceGroupBind* Group::GetBoundInstance(Player* player)
|
||||
InstanceGroupBind* Group::GetBoundInstance(uint32 mapid, Player* player)
|
||||
{
|
||||
uint32 mapid = player->GetMapId();
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
|
||||
if(!mapEntry)
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -354,7 +354,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(uint32 mapId, Player* player);
|
||||
InstanceGroupBind* GetBoundInstance(Map* aMap, Difficulty difficulty);
|
||||
BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; }
|
||||
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ bool ChatHandler::HandleGonameCommand(const char* args)
|
|||
{
|
||||
Group *group = _player->GetGroup();
|
||||
// if no bind exists, create a solo bind
|
||||
InstanceGroupBind *gBind = group ? group->GetBoundInstance(target) : NULL;
|
||||
InstanceGroupBind *gBind = group ? group->GetBoundInstance(target->GetMapId(), target) : NULL;
|
||||
// if no bind exists, create a solo bind
|
||||
if (!gBind)
|
||||
if (InstanceSave *save = target->GetMap()->GetInstanceSave())
|
||||
|
|
|
|||
|
|
@ -16439,7 +16439,7 @@ InstanceSave* Player::GetBoundInstanceSaveForSelfOrGroup(uint32 mapid)
|
|||
InstanceGroupBind *groupBind = NULL;
|
||||
Group *group = 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(mapid, this)))
|
||||
pSave = groupBind->save;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10122"
|
||||
#define REVISION_NR "10123"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue