[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:
VladimirMangos 2010-11-10 04:29:15 +03:00
parent a87648c56b
commit 9c96949da9
9 changed files with 33 additions and 20 deletions

View file

@ -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())