2015-03-08 17:20:10 -04:00
|
|
|
|
using System;
|
2017-09-29 22:42:24 -04:00
|
|
|
|
using System.Linq;
|
2015-03-08 17:20:10 -04:00
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
using SharedLibraryCore.Objects;
|
2017-11-25 20:29:58 -05:00
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
namespace SharedLibraryCore
|
2015-03-08 17:20:10 -04:00
|
|
|
|
{
|
2018-04-13 02:32:30 -04:00
|
|
|
|
public class GameEvent
|
2015-03-08 17:20:10 -04:00
|
|
|
|
{
|
2018-04-13 02:32:30 -04:00
|
|
|
|
public enum EventType
|
2015-03-08 17:20:10 -04:00
|
|
|
|
{
|
|
|
|
|
//FROM SERVER
|
2015-08-21 21:11:35 -04:00
|
|
|
|
Start,
|
|
|
|
|
Stop,
|
2015-03-08 17:20:10 -04:00
|
|
|
|
Connect,
|
|
|
|
|
Disconnect,
|
|
|
|
|
Say,
|
|
|
|
|
MapChange,
|
|
|
|
|
MapEnd,
|
2015-08-20 01:06:44 -04:00
|
|
|
|
|
2015-03-08 17:20:10 -04:00
|
|
|
|
//FROM ADMIN
|
|
|
|
|
Broadcast,
|
|
|
|
|
Tell,
|
|
|
|
|
Kick,
|
2015-08-20 01:06:44 -04:00
|
|
|
|
Ban,
|
2017-05-26 18:49:27 -04:00
|
|
|
|
Remote,
|
2015-03-08 17:20:10 -04:00
|
|
|
|
Unknown,
|
2017-05-26 18:49:27 -04:00
|
|
|
|
|
|
|
|
|
//FROM PLAYER
|
2017-06-19 13:58:01 -04:00
|
|
|
|
Report,
|
2017-09-29 22:42:24 -04:00
|
|
|
|
Flag,
|
2018-04-14 00:51:38 -04:00
|
|
|
|
Command,
|
2017-09-29 22:42:24 -04:00
|
|
|
|
|
|
|
|
|
// FROM GAME
|
|
|
|
|
Script,
|
|
|
|
|
Kill,
|
2018-04-15 21:27:43 -04:00
|
|
|
|
Damage,
|
2017-09-29 22:42:24 -04:00
|
|
|
|
Death,
|
2015-03-08 17:20:10 -04:00
|
|
|
|
}
|
|
|
|
|
|
2018-04-13 02:32:30 -04:00
|
|
|
|
public GameEvent(EventType t, string d, Player O, Player T, Server S)
|
2015-03-08 17:20:10 -04:00
|
|
|
|
{
|
|
|
|
|
Type = t;
|
2018-03-13 17:30:22 -04:00
|
|
|
|
Data = d?.Trim();
|
2015-03-08 17:20:10 -04:00
|
|
|
|
Origin = O;
|
|
|
|
|
Target = T;
|
|
|
|
|
Owner = S;
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-13 02:32:30 -04:00
|
|
|
|
public GameEvent() { }
|
2015-03-08 17:20:10 -04:00
|
|
|
|
|
|
|
|
|
|
2018-04-13 02:32:30 -04:00
|
|
|
|
public EventType Type;
|
2015-03-08 17:20:10 -04:00
|
|
|
|
public string Data; // Data is usually the message sent by player
|
2017-05-31 01:31:56 -04:00
|
|
|
|
public string Message;
|
2015-03-08 17:20:10 -04:00
|
|
|
|
public Player Origin;
|
|
|
|
|
public Player Target;
|
|
|
|
|
public Server Owner;
|
2017-05-26 18:49:27 -04:00
|
|
|
|
public Boolean Remote = false;
|
2018-04-14 00:51:38 -04:00
|
|
|
|
public object Extra { get; set; }
|
2015-03-08 17:20:10 -04:00
|
|
|
|
}
|
|
|
|
|
}
|