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:
Shauren
2011-03-19 13:59:53 +01:00
parent 7d0b5bfff9
commit 31b9951f20
+3 -5
View File
@@ -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);