add refreshrule.*
This commit is contained in:
parent
6d76bf63cd
commit
e2c853b369
14
server/gameserver/refreshrule.cc
Normal file
14
server/gameserver/refreshrule.cc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include "refreshrule.h"
|
||||||
|
|
||||||
|
void RefreshRule::Init()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RefreshRule::UnInit()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
11
server/gameserver/refreshrule.h
Normal file
11
server/gameserver/refreshrule.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class Room;
|
||||||
|
class RefreshRule
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Room* room = nullptr;
|
||||||
|
|
||||||
|
void Init();
|
||||||
|
void UnInit();
|
||||||
|
};
|
@ -29,6 +29,7 @@
|
|||||||
#include "perfmonitor.h"
|
#include "perfmonitor.h"
|
||||||
#include "mapinstance.h"
|
#include "mapinstance.h"
|
||||||
#include "mapmgr.h"
|
#include "mapmgr.h"
|
||||||
|
#include "refreshrule.h"
|
||||||
|
|
||||||
#include "framework/cpp/utils.h"
|
#include "framework/cpp/utils.h"
|
||||||
|
|
||||||
@ -85,6 +86,9 @@ void Room::Init()
|
|||||||
CreateDropObjs();
|
CreateDropObjs();
|
||||||
InitObstacleDatas();
|
InitObstacleDatas();
|
||||||
ShuaAndroid();
|
ShuaAndroid();
|
||||||
|
refresh_rule_ = new RefreshRule();
|
||||||
|
refresh_rule_->room = this;
|
||||||
|
refresh_rule_->Init();
|
||||||
if (room_type_ == RT_NewBrid && creator_game_times_ <= 0) {
|
if (room_type_ == RT_NewBrid && creator_game_times_ <= 0) {
|
||||||
CreateLevel0RoomSpecThings();
|
CreateLevel0RoomSpecThings();
|
||||||
}
|
}
|
||||||
@ -95,9 +99,12 @@ void Room::Init()
|
|||||||
|
|
||||||
void Room::UnInit()
|
void Room::UnInit()
|
||||||
{
|
{
|
||||||
|
refresh_rule_->UnInit();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
UnInitDebugInfo();
|
UnInitDebugInfo();
|
||||||
#endif
|
#endif
|
||||||
|
refresh_rule_->UnInit();
|
||||||
|
A8_SAFE_DELETE(refresh_rule_);
|
||||||
timer_attacher.ClearTimerList();
|
timer_attacher.ClearTimerList();
|
||||||
xtimer_attacher_.ClearTimerList();
|
xtimer_attacher_.ClearTimerList();
|
||||||
for (auto& pair : accountid_hash_) {
|
for (auto& pair : accountid_hash_) {
|
||||||
|
@ -36,6 +36,7 @@ class AabbCollider;
|
|||||||
class Android;
|
class Android;
|
||||||
class Car;
|
class Car;
|
||||||
class Hero;
|
class Hero;
|
||||||
|
class RefreshRule;
|
||||||
class Room
|
class Room
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -318,4 +319,6 @@ private:
|
|||||||
std::vector<ObstacleData> obstacle_datas_;
|
std::vector<ObstacleData> obstacle_datas_;
|
||||||
|
|
||||||
xtimer_list* auto_jump_timer_ = nullptr;
|
xtimer_list* auto_jump_timer_ = nullptr;
|
||||||
|
|
||||||
|
RefreshRule* refresh_rule_ = nullptr;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user