mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10713] player/group instance binding fixes.
* Use anum instead raw uint8 type in args * Fixed crash when gm at continent invite to group gm in instance and then teleport to instance using .goname. When group leader teleport to instance it must get group bind instead solo bind. * In other semilar cases detection report error as before but replace solo by group bind instead assert crash at enter to map.
This commit is contained in:
parent
a87648c56b
commit
9c96949da9
9 changed files with 33 additions and 20 deletions
|
|
@ -553,8 +553,16 @@ bool ChatHandler::HandleGonameCommand(char* args)
|
|||
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())
|
||||
_player->BindToInstance(save, !save->CanReset());
|
||||
{
|
||||
// if player is group leader then we need add group bind
|
||||
if (group && group->IsLeader(_player->GetObjectGuid()))
|
||||
group->BindToInstance(save, !save->CanReset());
|
||||
else
|
||||
_player->BindToInstance(save, !save->CanReset());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(cMap->IsRaid())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue