IW4M-Admin/SharedLibraryCore/Event.cs

65 lines
1.3 KiB
C#
Raw Normal View History

2015-03-08 17:20:10 -04:00
using System;
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;
2018-04-08 02:44:42 -04:00
namespace SharedLibraryCore
2015-03-08 17:20:10 -04:00
{
public class GameEvent
2015-03-08 17:20:10 -04:00
{
public enum EventType
2015-03-08 17:20:10 -04:00
{
//FROM SERVER
Start,
Stop,
2015-03-08 17:20:10 -04:00
Connect,
Disconnect,
Say,
MapChange,
MapEnd,
2015-03-08 17:20:10 -04:00
//FROM ADMIN
Broadcast,
Tell,
Kick,
Ban,
Remote,
2015-03-08 17:20:10 -04:00
Unknown,
//FROM PLAYER
Report,
Flag,
2018-04-14 00:51:38 -04:00
Command,
// FROM GAME
Script,
Kill,
Damage,
Death,
2015-03-08 17:20:10 -04:00
}
public GameEvent(EventType t, string d, Player O, Player T, Server S)
2015-03-08 17:20:10 -04:00
{
Type = t;
Data = d?.Trim();
2015-03-08 17:20:10 -04:00
Origin = O;
Target = T;
Owner = S;
}
public GameEvent() { }
2015-03-08 17:20:10 -04:00
public EventType Type;
2015-03-08 17:20:10 -04:00
public string Data; // Data is usually the message sent by player
public string Message;
2015-03-08 17:20:10 -04:00
public Player Origin;
public Player Target;
public Server Owner;
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
}
}