This commit is contained in:
aozhiwei 2023-09-16 16:02:48 +08:00
parent 5c18aede9d
commit f9226a6c39
4 changed files with 40 additions and 0 deletions

View File

@ -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_;
};

View File

@ -0,0 +1,11 @@
#pragma once
class CustomMember
{
public:
const std::string& GetAccountId() { return account_id_; }
private:
std::string account_id_;
};

View 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_;
};

View File

@ -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;