2018-04-26 02:13:04 -04:00
|
|
|
|
using SharedLibraryCore;
|
|
|
|
|
using SharedLibraryCore.Interfaces;
|
|
|
|
|
using System;
|
2018-04-28 01:22:18 -04:00
|
|
|
|
using System.Collections.Concurrent;
|
2018-04-26 02:13:04 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace IW4MAdmin.Application
|
|
|
|
|
{
|
|
|
|
|
class GameEventHandler : IEventHandler
|
|
|
|
|
{
|
2018-08-27 18:07:54 -04:00
|
|
|
|
private readonly IManager Manager;
|
2018-04-26 02:13:04 -04:00
|
|
|
|
|
|
|
|
|
public GameEventHandler(IManager mgr)
|
|
|
|
|
{
|
|
|
|
|
Manager = mgr;
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-27 18:07:54 -04:00
|
|
|
|
public void AddEvent(GameEvent gameEvent)
|
2018-04-26 02:13:04 -04:00
|
|
|
|
{
|
|
|
|
|
#if DEBUG
|
|
|
|
|
Manager.GetLogger().WriteDebug($"Got new event of type {gameEvent.Type} for {gameEvent.Owner}");
|
|
|
|
|
#endif
|
2018-08-27 18:07:54 -04:00
|
|
|
|
// todo: later
|
|
|
|
|
((Manager as ApplicationManager).OnServerEvent)(this, new ApplicationManager.GameEventArgs(null, false, gameEvent));
|
2018-04-26 02:13:04 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|