1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/server/TurnTimerHandler.h

40 lines
871 B
C
Raw Normal View History

/*
* TurnTimerHandler.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
VCMI_LIB_NAMESPACE_BEGIN
2023-08-14 21:31:44 +02:00
class CStack;
class PlayerColor;
struct PlayerState;
VCMI_LIB_NAMESPACE_END
class CGameHandler;
class TurnTimerHandler
{
CGameHandler & gameHandler;
const int turnTimePropagateFrequency = 5000;
2023-08-14 21:31:44 +02:00
const int turnTimePropagateFrequencyCrit = 1000;
const int turnTimePropagateThreshold = 3000;
public:
TurnTimerHandler(CGameHandler &);
void onGameplayStart(PlayerState & state);
void onPlayerGetTurn(PlayerState & state);
void onPlayerMakingTurn(PlayerState & state, int waitTime);
void onBattleStart();
2023-08-21 23:49:50 +02:00
void onBattleNextStack(const CStack & stack);
void onBattleLoop(int waitTime);
};