Пример #1
0
        //"Name<uid><wonid><team>" acquired weapon "weapon"  [69]
        /// <summary>
        /// Raises the <see cref="PlayerSelectedWeapon"/> event.
        /// </summary>
        /// <param name="timestamp">Time at which <see cref="PlayerSelectedWeapon"/> event was fired.</param>
        /// <param name="info">Information about <see cref="PlayerSelectedWeapon"/> event.</param>
        protected virtual void OnWeaponPickup(DateTime timestamp, string[] info)
        {
            var eventArgs = new WeaponEventArgs
            {
                Timestamp = timestamp,
                Player    = GetPlayerInfo(info[0]),
                Weapon    = info[2]
            };

            PlayerAcquiredWeapon.Fire(ServerEndPoint, eventArgs);
        }
Пример #2
0
        //"Name<uid><wonid><team>" selected weapon "weapon"     [68]
        /// <summary>
        /// Raises the <see cref="PlayerSelectedWeapon"/> event.
        /// </summary>
        /// <param name="timestamp">Time at which <see cref="PlayerSelectedWeapon"/> event was fired.</param>
        /// <param name="info">Information about <see cref="PlayerSelectedWeapon"/> event.</param>
        protected virtual void OnWeaponSelection(DateTime timestamp, string[] info)
        {
            WeaponEventArgs eventArgs = new WeaponEventArgs()
            {
                Timestamp = timestamp,
                Player    = GetPlayerInfo(info[0]),
                Weapon    = info[2]
            };

            PlayerSelectedWeapon.Fire(ServerEndPoint, eventArgs);
        }