From f86291f4bc8f02eb7607fe679dff1c47b37d35eb Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 8 Apr 2019 14:31:44 +0800 Subject: [PATCH] 1 --- server/gameserver/handlermgr.cc | 1 - server/gameserver/player.cc | 5 ---- server/gameserver/player.h | 2 -- server/tools/protobuild/cs_msgid.proto | 1 - server/tools/protobuild/cs_proto.proto | 32 ++++++++++++-------------- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/server/gameserver/handlermgr.cc b/server/gameserver/handlermgr.cc index 80f2e1c..494c1b7 100644 --- a/server/gameserver/handlermgr.cc +++ b/server/gameserver/handlermgr.cc @@ -47,7 +47,6 @@ void HandlerMgr::RegisterNetMsgHandlers() RegisterNetMsgHandler(&ggmsghandler, &Player::_CMMove); RegisterNetMsgHandler(&ggmsghandler, &Player::_CMEmote); - RegisterNetMsgHandler(&ggmsghandler, &Player::_CMSpectate); RegisterNetMsgHandler(&ggmsghandler, &Player::_CMVoice); } diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index fe0edc7..bcace50 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -708,11 +708,6 @@ void Player::_CMEmote(f8::MsgHdr& hdr, const cs::CMEmote& msg) } -void Player::_CMSpectate(f8::MsgHdr& hdr, const cs::CMSpectate& msg) -{ - -} - void Player::_CMVoice(f8::MsgHdr& hdr, const cs::CMVoice& msg) { cs::SMVoiceNotify notifymsg; diff --git a/server/gameserver/player.h b/server/gameserver/player.h index 617ccab..e156520 100644 --- a/server/gameserver/player.h +++ b/server/gameserver/player.h @@ -8,7 +8,6 @@ namespace cs class CMMove; class CMDropItem; class CMEmote; - class CMSpectate; class CMVoice; class MFActivePlayerData; class MFGasData; @@ -84,7 +83,6 @@ class Player : public Human void _CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg); void _CMEmote(f8::MsgHdr& hdr, const cs::CMEmote& msg); - void _CMSpectate(f8::MsgHdr& hdr, const cs::CMSpectate& msg); void _CMVoice(f8::MsgHdr& hdr, const cs::CMVoice& msg); void FillMFActivePlayerData(cs::MFActivePlayerData* player_data); diff --git a/server/tools/protobuild/cs_msgid.proto b/server/tools/protobuild/cs_msgid.proto index 8343ae9..0189a56 100644 --- a/server/tools/protobuild/cs_msgid.proto +++ b/server/tools/protobuild/cs_msgid.proto @@ -8,7 +8,6 @@ enum CMMessageId_e _CMJoin = 103; _CMMove = 201; _CMEmote = 204; - _CMSpectate = 205; _CMVoice = 206; } diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 231378d..28ac8c1 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -477,22 +477,25 @@ message MFPlayerStats { optional int32 player_id = 1; //玩家id optional string player_avatar_url = 2; //玩家头像 + + //本次成绩 optional int32 time_alive = 3; //存活时间 optional int32 kills = 4; //击杀敌人数 + optional int32 damage_amount = 8; //伤害总量 + optional int32 heal_amount = 20; //治疗总量 + //历史最佳成绩 + optional int32 history_time_alive = 30; //存活时间 + optional int32 history_kills = 31; //击杀敌人数 + optional int32 history_damage_amount = 32; //伤害总量 + optional int32 history_heal_amount = 33; //治疗总量 + + optional int32 gold = 10; //金币 + optional int32 score = 11; //积分 + optional int32 dead = 5; //是否已死亡 optional int32 killer_id = 7; //杀手id(自杀时为自己) - optional int32 damage_amount = 8; //伤害总量 - optional int32 gold = 10; //金币 - optional int32 all_score = 11; //所有积分 - optional int32 heal_cnt = 15; //治疗次数 - optional int32 heal_amount = 20; //治疗总量 - - optional int32 old_elo = 17; - optional int32 new_elo = 18; - optional int32 chg_elo = 19; optional string account_id = 21; //账号id - repeated MFGoods annual_goods = 22; } //end mfmsg @@ -542,6 +545,8 @@ message CMMove optional bool interaction = 9; //是否有交互 repeated int32 interaction_objids = 23; //交互的对象id列表 + + optional bool spectate = 30; //自杀 } //丢弃道具 @@ -559,13 +564,6 @@ message CMEmote optional bool team_only = 4; } -//自杀 -message CMSpectate -{ - optional int32 spec_next = 1; - optional int32 spec_prev = 2; -} - //语音 message CMVoice {