1 #ifndef EVENTMANAGER_H_ 
    2 #define EVENTMANAGER_H_ 
    8 #include "../Objects/Map.h" 
    9 #include "../Objects/Player.h" 
   84     int RegisterEcho(std::vector<std::function<
void(std::string, std::string)>> functions);
 
  102     int RegisterEndMatch(std::vector<std::function<
void(std::vector<PlayerRanking>, 
int)>> functions);
 
  165     int RegisterBillUpdated(std::vector<std::function<
void(
int, 
int, std::string, 
int)>> functions);
 
  192     int RegisterVoteUpdated(std::vector<std::function<
void(std::string, std::string, std::string, std::string)>> functions);
 
  242     void CallEcho(std::string 
internal, std::string publicEcho);
 
  255     void CallEndMatch(std::vector<PlayerRanking> rankings, 
int winnerTeam);
 
  312     void CallBillUpdated(
int billId, 
int state, std::string stateName, 
int transactionId);
 
  338     void CallVoteUpdated(std::string stateName, std::string login, std::string commandName, std::string commandParam);
 
  348     std::vector<std::function<void(std::string, std::string)>> 
methodsEcho;            
 
  360     std::vector<std::function<void(std::string, std::string, std::string, std::string)>> 
methodsVoteUpdated; 
 
  363 #endif // EVENTMANAGER_H_ 
std::vector< std::function< void(Player)> > methodsPlayerConnect
Vector with functions for the PlayerConnect event. 
Definition: EventManager.h:344
void CallMapListModified(int currentMap, int nextMap, bool listModified)
Calls all functions which are subscribed to the MapListModified event. 
Definition: EventManager.cpp:380
void CallBeginMap(Map map)
Calls all functions which are subscribed to the EndMatch event. 
Definition: EventManager.cpp:317
int RegisterBeginMatch(std::vector< std::function< void()>> functions)
Register functions for the BeginMatch callback. 
Definition: EventManager.cpp:104
int RegisterMapListModified(std::vector< std::function< void(int, int, bool)>> functions)
Register functions for the MapListModified callback. 
Definition: EventManager.cpp:203
int RegisterEndMap(std::vector< std::function< void(Map)>> functions)
Register functions for the EndMap callback. 
Definition: EventManager.cpp:137
std::vector< std::function< void(Player, std::string)> > methodsPlayerChat
Vector with functions for the PlayerChat event. 
Definition: EventManager.h:346
void CallPlayerManialinkPageAnswer(Player player, std::string answer, std::vector< EntryVal > entries)
Calls all functions which are subscribed to the PlayerManialinkPageAnswer event. 
Definition: EventManager.cpp:281
void CallStatusChanged(int statusCode, std::string statusName)
Calls all functions which are subscribed to the StatusChanged event. 
Definition: EventManager.cpp:335
EventManager()
Definition: EventManager.cpp:3
int RegisterPlayerIncoherence(std::vector< std::function< void(Player)>> functions)
Register functions for the PlayerIncoherence callback. 
Definition: EventManager.cpp:181
Contains all information about a player in easy-to-use format. 
Definition: Player.h:11
std::vector< std::function< void()> > methodsBeginMatch
Vector with functions for the BeginMatch event. 
Definition: EventManager.h:349
void CallPlayerFinish(Player player, int time)
Calls all functions which are subscribed to the PlayerFinish event. 
Definition: EventManager.cpp:353
int RegisterEcho(std::vector< std::function< void(std::string, std::string)>> functions)
Register functions for the Echo callback. 
Definition: EventManager.cpp:93
int RegisterPlayerConnect(std::vector< std::function< void(Player)>> functions)
Register functions for the PlayerConnect callback. 
Definition: EventManager.cpp:49
int RegisterStatusChanged(std::vector< std::function< void(int, std::string)>> functions)
Register functions for the StatusChanged callback. 
Definition: EventManager.cpp:148
std::vector< std::function< void(Player)> > methodsPlayerIncoherence
Vector with functions for the PlayerIncoherence event. 
Definition: EventManager.h:356
std::vector< std::function< void(int, int, std::string, int)> > methodsBillUpdated
Vector with functions for the BillUpdated event. 
Definition: EventManager.h:357
void CallPlayerConnect(Player player)
Calls all functions which are subscribed to the PlayerConnect event. 
Definition: EventManager.cpp:254
std::vector< std::function< void(Player, std::string, std::vector< EntryVal >)> > methodsPlayerManialinkPageAnswer
Vector with functions for the PlayerManialinkPageAnswer event. 
Definition: EventManager.h:347
void CallPlayerCheckpoint(Player player, int time, int currentLap, int checkpointIndex)
Calls all functions which are subscribed to the PlayerCheckpoint event. 
Definition: EventManager.cpp:344
std::vector< std::function< void(Player)> > methodsPlayerDisconnect
Vector with functions for the PlayerDisconnect event. 
Definition: EventManager.h:345
std::vector< std::function< void(std::string, std::string)> > methodsEcho
Vector with functions for the Echo event. 
Definition: EventManager.h:348
Contains all information about a map in easy-to-use format. 
Definition: Map.h:14
void CallBeginMatch()
Calls all functions which are subscribed to the BeginMatch event. 
Definition: EventManager.cpp:299
int RegisterPlayerDisconnect(std::vector< std::function< void(Player)>> functions)
Register functions for the PlayerDisconnect callback. 
Definition: EventManager.cpp:60
int RegisterPlayerManialinkPageAnswer(std::vector< std::function< void(Player, std::string, std::vector< EntryVal >)>> functions)
Register functions for the PlayerManialinkPageAnswer callback. 
Definition: EventManager.cpp:82
std::vector< std::function< void(Player, int, int, int)> > methodsPlayerCheckpoint
Vector with functions for the PlayerCheckpoint event. 
Definition: EventManager.h:354
void CallVoteUpdated(std::string stateName, std::string login, std::string commandName, std::string commandParam)
Calls all functions which are subscribed to the VoteUpdated event. 
Definition: EventManager.cpp:398
void CallPlayerInfoChanged(Player player)
Calls all functions which are subscribed to the PlayerInfoChanged event. 
Definition: EventManager.cpp:389
std::vector< std::function< void(Player, int)> > methodsPlayerFinish
Vector with functions for the PlayerFinish event. 
Definition: EventManager.h:355
std::vector< std::function< void()> > methodsEveryMinute
Vector with functions for the EveryMinute event. 
Definition: EventManager.h:342
std::vector< std::function< void(std::vector< PlayerRanking >, int)> > methodsEndMatch
Vector with functions for the EndMatch event. 
Definition: EventManager.h:350
std::vector< std::function< void(int, int, bool)> > methodsMapListModified
Vector with functions for the MapListModified event. 
Definition: EventManager.h:358
std::vector< std::function< void(Player)> > methodsPlayerInfoChanged
Vector with functions for the PlayerInfoChanged event. 
Definition: EventManager.h:359
int RegisterBeginMap(std::vector< std::function< void(Map)>> functions)
Register functions for the BeginMap callback. 
Definition: EventManager.cpp:126
void CallEndMap(Map map)
Calls all functions which are subscribed to the EndMap event. 
Definition: EventManager.cpp:326
std::vector< std::function< void(std::string, std::string, std::string, std::string)> > methodsVoteUpdated
Vector with functions for the VoteUpdated event. 
Definition: EventManager.h:360
int RegisterPlayerCheckpoint(std::vector< std::function< void(Player, int, int, int)>> functions)
Register functions for the PlayerCheckpoint callback. 
Definition: EventManager.cpp:159
void CallEveryMinute()
Calls all functions which are subscribed to the EveryMinute event. 
Definition: EventManager.cpp:245
void CallEverySecond()
Calls all functions which are subscribed to the EverySecond event. 
Definition: EventManager.cpp:236
int RegisterPlayerInfoChanged(std::vector< std::function< void(Player)>> functions)
Register functions for the PlayerInfoChanged callback. 
Definition: EventManager.cpp:214
int RegisterEndMatch(std::vector< std::function< void(std::vector< PlayerRanking >, int)>> functions)
Register functions for the EndMatch callback. 
Definition: EventManager.cpp:115
std::vector< std::function< void(Map)> > methodsBeginMap
Vector with functions for the BeginMap event. 
Definition: EventManager.h:351
void CallPlayerDisconnect(Player player)
Calls all functions which are subscribed to the PlayerDisconnect event. 
Definition: EventManager.cpp:263
int RegisterBillUpdated(std::vector< std::function< void(int, int, std::string, int)>> functions)
Register functions for the BillUpdated callback. 
Definition: EventManager.cpp:192
std::vector< std::function< void(int, std::string)> > methodsStatusChanged
Vector with functions for the StatusChanged event. 
Definition: EventManager.h:353
int RegisterPlayerChat(std::vector< std::function< void(Player, std::string)>> functions)
Register functions for the PlayerChat callback. 
Definition: EventManager.cpp:71
std::vector< std::function< void(Map)> > methodsEndMap
Vector with functions for the EndMap event. 
Definition: EventManager.h:352
void CallEcho(std::string internal, std::string publicEcho)
Calls all functions which are subscribed to the Echo event. 
Definition: EventManager.cpp:290
void CallBillUpdated(int billId, int state, std::string stateName, int transactionId)
Calls all functions which are subscribed to the BillUpdated event. 
Definition: EventManager.cpp:371
int RegisterEverySecond(std::vector< std::function< void()>> functions)
Register functions for the EverySecond callback (from controller). 
Definition: EventManager.cpp:27
std::vector< std::function< void()> > methodsEverySecond
Vector with functions for the EverySecond event. 
Definition: EventManager.h:341
void CallPlayerChat(Player player, std::string text, bool isRegisteredCommand)
Calls all functions which are subscribed to the PlayerChat event. 
Definition: EventManager.cpp:272
int RegisterVoteUpdated(std::vector< std::function< void(std::string, std::string, std::string, std::string)>> functions)
Register functions for the VoteUpdated callback. 
Definition: EventManager.cpp:225
void CallPlayerIncoherence(Player player)
Calls all functions which are subscribed to the PlayerIncoherence event. 
Definition: EventManager.cpp:362
void CallEndMatch(std::vector< PlayerRanking > rankings, int winnerTeam)
Calls all functions which are subscribed to the EndMatch event. 
Definition: EventManager.cpp:308
Handles events (callbacks) from server to plugins. 
Definition: EventManager.h:15
int RegisterEveryMinute(std::vector< std::function< void()>> functions)
Register functions for the EveryMinute callback (from controller). 
Definition: EventManager.cpp:38
int RegisterPlayerFinish(std::vector< std::function< void(Player, int)>> functions)
Register functions for the PlayerFinish callback. 
Definition: EventManager.cpp:170