1
This commit is contained in:
parent
791039a6e5
commit
e9a3169c95
@ -22,7 +22,6 @@ class Player : public Human
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
int team_mode = 0;
|
int team_mode = 0;
|
||||||
int player_count = 0;
|
|
||||||
bool auto_fill = false;
|
bool auto_fill = false;
|
||||||
bool use_touch = false;
|
bool use_touch = false;
|
||||||
long long create_tick = 0;
|
long long create_tick = 0;
|
||||||
|
@ -47,7 +47,6 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
|
|||||||
hum->health = 0;
|
hum->health = 0;
|
||||||
hum->team_uuid = msg.team_uuid();
|
hum->team_uuid = msg.team_uuid();
|
||||||
hum->team_mode = msg.team_mode();
|
hum->team_mode = msg.team_mode();
|
||||||
hum->player_count = msg.player_count();
|
|
||||||
hum->auto_fill = msg.auto_fill();
|
hum->auto_fill = msg.auto_fill();
|
||||||
hum->use_touch = msg.use_touch();
|
hum->use_touch = msg.use_touch();
|
||||||
hum->avatar_url = msg.avatar_url();
|
hum->avatar_url = msg.avatar_url();
|
||||||
|
@ -47,6 +47,12 @@ package cs;
|
|||||||
客户端可以根据protobuf反射得到字段名和字段id的对应关系做到自动化判断
|
客户端可以根据protobuf反射得到字段名和字段id的对应关系做到自动化判断
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//常量
|
||||||
|
enum Constant_e
|
||||||
|
{
|
||||||
|
ProtoVersion = 2019071501; //系统版本
|
||||||
|
}
|
||||||
|
|
||||||
//心跳
|
//心跳
|
||||||
message CMPing
|
message CMPing
|
||||||
{
|
{
|
||||||
@ -88,6 +94,23 @@ message MFVector2D
|
|||||||
optional float y = 2; //y轴
|
optional float y = 2; //y轴
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//属性变更
|
||||||
|
/*
|
||||||
|
property_type: 1 血量
|
||||||
|
property_type: 2 最大血量
|
||||||
|
property_type: 3 库存
|
||||||
|
property_subtype: 库存数组索引
|
||||||
|
property_type: 4 技能cd时间(剩余时间)
|
||||||
|
property_type: 5 技能cd时间(总时间)
|
||||||
|
*/
|
||||||
|
message MFPropertyChg
|
||||||
|
{
|
||||||
|
optional int32 obj_id = 1; //对象id
|
||||||
|
optional int32 property_type = 2; //属性类型
|
||||||
|
optional int32 property_subtype = 3; //属性子类型
|
||||||
|
optional float value = 4; //属性值
|
||||||
|
}
|
||||||
|
|
||||||
//地图物件
|
//地图物件
|
||||||
message MFMapObject
|
message MFMapObject
|
||||||
{
|
{
|
||||||
@ -586,7 +609,7 @@ message CMJoin
|
|||||||
optional string team_uuid = 2; //队伍唯一id (没组队时为空字符串)
|
optional string team_uuid = 2; //队伍唯一id (没组队时为空字符串)
|
||||||
optional string account_id = 3; //账号id account_id
|
optional string account_id = 3; //账号id account_id
|
||||||
optional int32 team_mode = 4; //队伍模式 0:单人 1:多人
|
optional int32 team_mode = 4; //队伍模式 0:单人 1:多人
|
||||||
optional int32 player_count = 5; //玩家数(单人时为1)
|
optional int32 proto_version = 5; //协议版本号Constant_e.ProtoVersion
|
||||||
optional bool auto_fill = 6; //是否自动填充玩家
|
optional bool auto_fill = 6; //是否自动填充玩家
|
||||||
optional int32 bot = 7; //是否机器人
|
optional int32 bot = 7; //是否机器人
|
||||||
optional string name = 8; //角色名
|
optional string name = 8; //角色名
|
||||||
@ -730,6 +753,7 @@ message SMUpdate
|
|||||||
repeated MFEmote emotes = 23; //表情
|
repeated MFEmote emotes = 23; //表情
|
||||||
optional MFAirDrop airdrop = 26; //空投
|
optional MFAirDrop airdrop = 26; //空投
|
||||||
optional MFPlane plane = 27; //飞机
|
optional MFPlane plane = 27; //飞机
|
||||||
|
repeated MFPropertyChg chged_property_list = 31; //property变更列表
|
||||||
}
|
}
|
||||||
|
|
||||||
//滚动消息
|
//滚动消息
|
||||||
|
Loading…
x
Reference in New Issue
Block a user