private static void ChatEventsOnPlayerInjured(object sender, InjureEventArgs injureEventArgs)
        {
            DateTime time    = injureEventArgs.Timestamp;
            string   chatMsg = injureEventArgs.Damage;

            Console.WriteLine(Convert.ToString(time, CultureInfo.InvariantCulture) + chatMsg);
        }
Esempio n. 2
0
        //"Name<uid><wonid><team>" attacked "Name<uid><wonid><team>" with "weapon" (damage "damage") [58]
        /// <summary>
        /// Raises the <see cref="PlayerInjured"/> event.
        /// </summary>
        /// <param name="timestamp">Time at which <see cref="PlayerInjured"/> event was fired.</param>
        /// <param name="info">Information about <see cref="PlayerInjured"/> event.</param>
        protected virtual void OnInjure(DateTime timestamp, string[] info)
        {
            InjureEventArgs eventArgs = new InjureEventArgs()
            {
                Timestamp = timestamp,
                Player    = GetPlayerInfo(info[0]),
                Victim    = GetPlayerInfo(info[2]),
                Weapon    = info[4],
                Damage    = info[6]
            };

            PlayerInjured.Fire(ServerEndPoint, eventArgs);
        }