/// <summary> /// Handle the player weapon fired packet /// </summary> /// <param name="pBuffer">Packet Data buffer</param> private void HandlePlayerWeapon(Byte[] pBuffer) { PlayerWeaponPacket packet = new PlayerWeaponPacket(); // Set the player weapon packet packet.Packet = pBuffer; // Check if this packet contains a weapon if (packet.Event.Weapon.Type != WeaponTypes.NoWeapon) { // Increment the weapon count m_sessionStatistics.IncrementWeaponCount(); } }
/// <summary> /// Handle a Weapon update message. /// </summary> /// <param name="buffer">packet buffer</param> private void HandleWeaponUpdate(Byte[] buffer) { PlayerWeaponPacket packet = new PlayerWeaponPacket(); // Parse the player weapon message packet.Packet = buffer; // Get the player information PlayerInfo playerInfo = m_playerHandler.PlayerInformation(packet.Event.PlayerId); if (playerInfo != null) { // Set the player name and moderator level in the event packet.Event.PlayerName = playerInfo.PlayerName; packet.Event.ModLevel = playerInfo.ModeratorLevel; // Set the position information playerInfo.Position = packet.Event; } // Add the event to the core event queue m_eventQueue.Add(packet.Event); }