Game/Maps: Instance handling follow-up:
- Fix a bug where a player could maintain a conflicting non-perm solo bind if they were in the instance when invited to group. Closes #16150.
- If a group is created while the leader is in an instance that nobody is bound to, the group will take over the instance and bind to it. This stops the homebind timer when reforming group after disconnects and the like.
(cherry picked from commit 0f0a51b87a)
This commit is contained in:
1 parent
94a5629949
commit
27f0edde0f
6 files changed
+45
-33
No files matched your search
@@ -19132,31 +19132,6 @@ void Player::SendSavedInstances()
|
||||
}
|
||||
}
|
||||
|
||||
/// convert the player's binds to the group
|
||||
void Player::ConvertInstancesToGroup(Player* player, Group* group, bool switchLeader)
|
||||
{
|
||||
// copy all binds to the group, when changing leader it's assumed the character
|
||||
// will not have any solo binds
|
||||
|
||||
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
|
||||
{
|
||||
for (BoundInstancesMap::iterator itr = player->m_boundInstances[i].begin(); itr != player->m_boundInstances[i].end();)
|
||||
{
|
||||
if (!switchLeader || !group->GetBoundInstance(itr->second.save->GetDifficulty(), itr->first))
|
||||
group->BindToInstance(itr->second.save, itr->second.perm, false);
|
||||
|
||||
// permanent binds are not removed
|
||||
if (switchLeader && !itr->second.perm)
|
||||
{
|
||||
// increments itr in call
|
||||
player->UnbindInstance(itr, Difficulty(i), false);
|
||||
}
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report)
|
||||
{
|
||||
if (!IsGameMaster() && ar)
|
||||
|
||||
Reference in new issue
Block a user