Merge pull request #3086 from LihO/master

Core/Groups: Refactored sending of update packets.
Closes #1042.
This commit is contained in:
QAston
2011-09-21 01:05:53 -07:00
4 changed files with 72 additions and 47 deletions
+8 -1
View File
@@ -2329,6 +2329,7 @@ bool Player::TeleportToBGEntryPoint()
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
ScheduleDelayedOperation(DELAYED_BG_TAXI_RESTORE);
ScheduleDelayedOperation(DELAYED_BG_GROUP_RESTORE);
return TeleportTo(m_bgData.joinPos);
}
@@ -2383,7 +2384,13 @@ void Player::ProcessDelayedOperations()
ContinueTaxiFlight();
}
}
if (m_DelayedOperations & DELAYED_BG_GROUP_RESTORE)
{
if (Group *g = GetGroup())
g->SendUpdateToPlayer(GetGUID());
}
//we have executed ALL delayed ops, so clear the flag
m_DelayedOperations = 0;
}
+1
View File
@@ -820,6 +820,7 @@ enum PlayerDelayedOperations
DELAYED_SPELL_CAST_DESERTER = 0x04,
DELAYED_BG_MOUNT_RESTORE = 0x08, ///< Flag to restore mount state after teleport from BG
DELAYED_BG_TAXI_RESTORE = 0x10, ///< Flag to restore taxi state after teleport from BG
DELAYED_BG_GROUP_RESTORE = 0x20, ///< Flag to restore group state after teleport from BG
DELAYED_END
};