Core/Players: Corrected pending bind logic (prevent attempting to bind (and failing) when player left the instance by areatrigger before timer finished)
This commit is contained in:
@@ -1728,7 +1728,9 @@ void Player::Update(uint32 p_time)
|
||||
{
|
||||
if (_pendingBindTimer <= p_time)
|
||||
{
|
||||
BindToInstance();
|
||||
// Player left the instance
|
||||
if (_pendingBind->GetInstanceId() == GetInstanceId())
|
||||
BindToInstance();
|
||||
SetPendingBind(NULL, 0);
|
||||
}
|
||||
else
|
||||
@@ -17907,10 +17909,6 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave *save, bool permanent, b
|
||||
|
||||
void Player::BindToInstance()
|
||||
{
|
||||
// Player left the instance
|
||||
if (_pendingBind->GetInstanceId() != GetInstanceId())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_INSTANCE_SAVE_CREATED, 4);
|
||||
data << uint32(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
Reference in New Issue
Block a user