1
This commit is contained in:
parent
5c18aede9d
commit
f9226a6c39
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
class Room;
|
||||
class CustomTeam;
|
||||
class CustomBattle
|
||||
{
|
||||
public:
|
||||
@ -7,8 +9,19 @@ class CustomBattle
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
||||
Room* GetRoom() { return room_; }
|
||||
const std::string& GetRoomId() { return room_id_; }
|
||||
const std::string& GetRoomUuid() { return room_uuid_; }
|
||||
int GetZoneId() { return zone_id_; }
|
||||
int GetNodeId() { return zone_id_; }
|
||||
int GetStartTime() { return start_time_; }
|
||||
|
||||
private:
|
||||
Room *room_ = nullptr;
|
||||
std::string room_id_;
|
||||
std::string room_uuid_;
|
||||
int zone_id_ = 0;
|
||||
int node_id_ = 0;
|
||||
int start_time_ = 0;
|
||||
std::map<std::string, std::shared_ptr<CustomTeam>> team_hash_;
|
||||
};
|
||||
|
11
server/gameserver/custom_member.h
Normal file
11
server/gameserver/custom_member.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
class CustomMember
|
||||
{
|
||||
public:
|
||||
|
||||
const std::string& GetAccountId() { return account_id_; }
|
||||
|
||||
private:
|
||||
std::string account_id_;
|
||||
};
|
13
server/gameserver/custom_team.h
Normal file
13
server/gameserver/custom_team.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
class CustomMember;
|
||||
class CustomTeam
|
||||
{
|
||||
public:
|
||||
|
||||
const std::string& GetTeamUuid() { return team_uuid_; }
|
||||
|
||||
private:
|
||||
std::string team_uuid_;
|
||||
std::map<std::string, std::shared_ptr<CustomMember>> member_hash_;
|
||||
};
|
@ -41,6 +41,7 @@ struct RoomInitInfo;
|
||||
struct FrameEventData;
|
||||
class SandTable;
|
||||
class BatchSync;
|
||||
class CustomBattle;
|
||||
|
||||
struct Plane
|
||||
{
|
||||
@ -116,6 +117,7 @@ public:
|
||||
std::string GetMapTplName() { return map_tpl_name_; }
|
||||
const mt::Map* GetMapMeta() { return map_meta_; }
|
||||
bool IsBattleStarting() { return battle_starting_; };
|
||||
std::shared_ptr<CustomBattle> GetCustomBattle() { return custom_battle_; }
|
||||
bool IsPveRoom();
|
||||
bool IsDestoryRoom();
|
||||
bool IsSurvivalRoom();
|
||||
@ -398,6 +400,7 @@ private:
|
||||
|
||||
Incubator* incubator_ = nullptr;
|
||||
std::shared_ptr<SandTable> sand_table_;
|
||||
std::shared_ptr<CustomBattle> custom_battle_;
|
||||
|
||||
bool infinite_bullet_mode_ = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user