diff --git a/server/gameserver/mt/CircuitTime.cc b/server/gameserver/mt/CircuitTime.cc new file mode 100644 index 00000000..db85ccf4 --- /dev/null +++ b/server/gameserver/mt/CircuitTime.cc @@ -0,0 +1,14 @@ +#include "precompile.h" + +#include "mt/CircuitTime.h" + +IMPL_TABLE(mt::CircuitTime) + +namespace mt +{ + + void CircuitTime::Init1() + { + } + +} diff --git a/server/gameserver/mt/CircuitTime.h b/server/gameserver/mt/CircuitTime.h new file mode 100644 index 00000000..70e2e4da --- /dev/null +++ b/server/gameserver/mt/CircuitTime.h @@ -0,0 +1,21 @@ +#pragma once + +#include "mt/macro.h" +#include "mtb/CircuitTime.h" + +namespace mt +{ + + DECLARE_ID_TABLE(CircuitTime, mtb::CircuitTime, + "CircuitTime@CircuitTime.json", + "id") + public: + + void Init1(); + + private: + int _start_time = 0; + int _end_time = 0; + }; + +} diff --git a/server/gameserver/mtb/CircuitTime.h b/server/gameserver/mtb/CircuitTime.h new file mode 100644 index 00000000..df3e8160 --- /dev/null +++ b/server/gameserver/mtb/CircuitTime.h @@ -0,0 +1,40 @@ +#pragma once + +#include + +namespace mtb +{ + + class CircuitTime + { + public: + + std::shared_ptr GetClass() const; + int id() const { return id_; }; + int circuit_season() const { return circuit_season_; }; + int circuit_time_type() const { return circuit_time_type_; }; + const std::string start_time() const { return start_time_; }; + const std::string end_time() const { return end_time_; }; + int cec_pool() const { return cec_pool_; }; + + bool has_id() const { return __flags__.test(0);}; + bool has_circuit_season() const { return __flags__.test(1);}; + bool has_circuit_time_type() const { return __flags__.test(2);}; + bool has_start_time() const { return __flags__.test(3);}; + bool has_end_time() const { return __flags__.test(4);}; + bool has_cec_pool() const { return __flags__.test(5);}; + + protected: + + int id_ = 0; + int circuit_season_ = 0; + int circuit_time_type_ = 0; + std::string start_time_; + std::string end_time_; + int cec_pool_ = 0; + +public: + std::bitset<6> __flags__; + }; + +};