Files
Sun1602/Server/AgentServer/TimeCheck/BattleGroundOpenTimeManager.h
T
2022-10-26 12:25:11 +08:00

33 lines
1.0 KiB
C++

#pragma once
#ifdef _NA_008679_20160202_REWORK_BATTLEGROUND
#include <Singleton.h>
#include <BattleGroundTimeInfoParser.h>
#include <ChaosZoneSystem/PacketStruct_ChaosZoneSystem.h>
struct MSG_CG_ETC_GET_BATTLE_GROUND_OPEN_TIME_ACK;
class BattleGroundManager;
class BattleGroundOpenTimeManager
{
public:
static const ulong kUpdateInterval = 5 * 1000;
BattleGroundOpenTimeManager(BattleGroundManager* mgr);
~BattleGroundOpenTimeManager();
BOOL CanReservationTime();
void Update(const util::TimeInfoPerFrame& time_info, ns_func::eBATTLEGROUND_TIMEMODE& time_mode);
//
// making message: find closely first event and calculation
bool SetupMessage(const util::TimeInfoPerFrame& time_info,
MSG_CG_BATTLE_GROUND_GET_OPEN_TIME_ACK* const msg_ack) const;
private:
void ExecuteNotifier();
//
bool loaded_;
util::ITimerBase update_timer_;
ns_func::BattleGroundTimeNode current_mode_;
BattleGroundManager* owner_manager;
};
#endif //_NA_008679_20160202_REWORK_BATTLEGROUND