1
This commit is contained in:
parent
08dfa906c9
commit
2a92ff7267
@ -135,6 +135,7 @@ void HandlerMgr::RegisterNetMsgHandlers()
|
|||||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMReportSpecShotHitPos);
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMReportSpecShotHitPos);
|
||||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMWatchTarget);
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMWatchTarget);
|
||||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMTeamCommand);
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMTeamCommand);
|
||||||
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMMobaBattleData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
||||||
|
@ -1876,6 +1876,11 @@ void Player::_CMTeamCommand(f8::MsgHdr* hdr, const cs::CMTeamCommand& msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::_CMMobaBattleData(f8::MsgHdr* hdr, const cs::CMMobaBattleData& msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void Player::SetShotHold(bool hold)
|
void Player::SetShotHold(bool hold)
|
||||||
{
|
{
|
||||||
if (!hold && shot_hold) {
|
if (!hold && shot_hold) {
|
||||||
|
@ -30,6 +30,7 @@ namespace cs
|
|||||||
class CMReportSpecShotHitPos;
|
class CMReportSpecShotHitPos;
|
||||||
class CMWatchTarget;
|
class CMWatchTarget;
|
||||||
class CMTeamCommand;
|
class CMTeamCommand;
|
||||||
|
class CMMobaBattleData;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Room;
|
class Room;
|
||||||
@ -147,6 +148,7 @@ class Player : public Human
|
|||||||
void _CMReportSpecShotHitPos(f8::MsgHdr* hdr, const cs::CMReportSpecShotHitPos& msg);
|
void _CMReportSpecShotHitPos(f8::MsgHdr* hdr, const cs::CMReportSpecShotHitPos& msg);
|
||||||
void _CMWatchTarget(f8::MsgHdr* hdr, const cs::CMWatchTarget& msg);
|
void _CMWatchTarget(f8::MsgHdr* hdr, const cs::CMWatchTarget& msg);
|
||||||
void _CMTeamCommand(f8::MsgHdr* hdr, const cs::CMTeamCommand& msg);
|
void _CMTeamCommand(f8::MsgHdr* hdr, const cs::CMTeamCommand& msg);
|
||||||
|
void _CMMobaBattleData(f8::MsgHdr* hdr, const cs::CMMobaBattleData& msg);
|
||||||
virtual void SetAttackDir(const glm::vec3& attack_dir) override;
|
virtual void SetAttackDir(const glm::vec3& attack_dir) override;
|
||||||
void AsyncRequestWatchWar(bool send_rsp_msg);
|
void AsyncRequestWatchWar(bool send_rsp_msg);
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ enum CMMessageId_e
|
|||||||
_CMReportSpecShotHitPos = 240;
|
_CMReportSpecShotHitPos = 240;
|
||||||
_CMWatchTarget = 241;
|
_CMWatchTarget = 241;
|
||||||
_CMTeamCommand = 242;
|
_CMTeamCommand = 242;
|
||||||
|
_CMMobaBattleData = 243;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SMMessageId_e
|
enum SMMessageId_e
|
||||||
@ -49,6 +50,7 @@ enum SMMessageId_e
|
|||||||
_SMGetSettlementTeamList = 238;
|
_SMGetSettlementTeamList = 238;
|
||||||
_SMWatchTarget = 241;
|
_SMWatchTarget = 241;
|
||||||
_SMTeamComamnd = 242;
|
_SMTeamComamnd = 242;
|
||||||
|
_SMMobaBattleData = 243;
|
||||||
|
|
||||||
_SMJoinedNotify = 103;
|
_SMJoinedNotify = 103;
|
||||||
_SMMapInfo = 1002;
|
_SMMapInfo = 1002;
|
||||||
@ -78,4 +80,6 @@ enum SMMessageId_e
|
|||||||
_SMViewerUiNotify = 1029;
|
_SMViewerUiNotify = 1029;
|
||||||
_SMViewerUiMemberUpdate = 1030;
|
_SMViewerUiMemberUpdate = 1030;
|
||||||
_SMTeamCommandNotify = 1031;
|
_SMTeamCommandNotify = 1031;
|
||||||
|
_SMTeamFullNotify = 1032;
|
||||||
|
_SMTeamPartNotify = 1033;
|
||||||
}
|
}
|
||||||
|
@ -739,6 +739,48 @@ message MFTeamData
|
|||||||
repeated MFSkin skin = 39; //皮肤id
|
repeated MFSkin skin = 39; //皮肤id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//队伍数据-全量
|
||||||
|
message MFTeamMemberNew
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍Id
|
||||||
|
optional int32 obj_uniid = 2; //玩家id
|
||||||
|
optional MFVec3 pos = 3; //位置
|
||||||
|
optional MFVec3 dir = 4; //方向
|
||||||
|
optional float health = 5; //血量
|
||||||
|
optional bool disconnected = 6 [default = false]; //是否短线
|
||||||
|
optional bool dead = 7 [default = false]; //是否死亡
|
||||||
|
optional bool downed = 8 [default = false]; //是否倒下
|
||||||
|
optional string name = 9; //名字
|
||||||
|
optional float max_health = 10; //最大血量
|
||||||
|
optional int32 hero_id = 20 [default = 0]; //英雄id
|
||||||
|
optional int32 level = 21 [default = 0]; //等级
|
||||||
|
optional int32 hero_level = 22; //hero等级
|
||||||
|
optional int32 hero_exp = 23; //hero经验
|
||||||
|
optional int32 hero_max_exp = 24; //hero max经验
|
||||||
|
optional int32 main_skill_cd = 25 [default = 0]; //技能cd时间
|
||||||
|
}
|
||||||
|
|
||||||
|
//队伍数据-全量
|
||||||
|
message MFTeamFull
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍Id
|
||||||
|
repeated MFTeamMemberNew members = 2; //队伍成员
|
||||||
|
}
|
||||||
|
|
||||||
|
//队伍数据-部分
|
||||||
|
message MFTeamPart
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍Id
|
||||||
|
optional int32 obj_uniid = 2; //玩家id
|
||||||
|
optional MFVec3 pos = 3; //位置
|
||||||
|
optional MFVec3 dir = 4; //方向
|
||||||
|
optional float health = 5; //血量
|
||||||
|
optional float max_health = 6; //最大血量
|
||||||
|
optional bool disconnected = 7 [default = false]; //是否短线
|
||||||
|
optional bool dead = 8 [default = false]; //是否死亡
|
||||||
|
optional bool downed = 9 [default = false]; //是否倒下
|
||||||
|
}
|
||||||
|
|
||||||
//队伍数据
|
//队伍数据
|
||||||
message MFTeamDataNew
|
message MFTeamDataNew
|
||||||
{
|
{
|
||||||
@ -1403,7 +1445,6 @@ message MFMobaTeamMember
|
|||||||
optional int32 head_frame = 10; //头像框
|
optional int32 head_frame = 10; //头像框
|
||||||
optional int32 obj_uniid = 11; //对象唯一id
|
optional int32 obj_uniid = 11; //对象唯一id
|
||||||
}
|
}
|
||||||
|
|
||||||
//moba队伍
|
//moba队伍
|
||||||
message MFMobaTeam
|
message MFMobaTeam
|
||||||
{
|
{
|
||||||
@ -1432,6 +1473,28 @@ message MFViewerTeam
|
|||||||
repeated MFViewTeamMember members = 2; //成员列表
|
repeated MFViewTeamMember members = 2; //成员列表
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//moba战斗数据-队伍
|
||||||
|
message MFMobaBattleDataMember
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍id
|
||||||
|
optional int32 member_uniid = 2; //uniid
|
||||||
|
optional string avatar_url = 3; //头像
|
||||||
|
optional int32 hero_id = 4; //英雄id
|
||||||
|
optional int32 head_frame = 5; //头像框
|
||||||
|
|
||||||
|
repeated int32 inventory = 11; //库存(相当于其他游戏里的背包)
|
||||||
|
|
||||||
|
optional int32 main_skill_id = 30; //主技能id
|
||||||
|
optional int32 main_skill_cd = 31; //主技能cd(单位毫秒)
|
||||||
|
}
|
||||||
|
|
||||||
|
//moba战斗数据-队伍
|
||||||
|
message MFMobaBattleDataTeam
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍id
|
||||||
|
repeated MFMobaBattleDataMember members = 2; //成员列表
|
||||||
|
}
|
||||||
|
|
||||||
//end mfmsg
|
//end mfmsg
|
||||||
|
|
||||||
//加入
|
//加入
|
||||||
@ -1736,6 +1799,16 @@ message CMTeamCommand
|
|||||||
optional string custom_command = 2; //指令(json格式,客户端自定义)
|
optional string custom_command = 2; //指令(json格式,客户端自定义)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//请求moba战斗数据
|
||||||
|
message CMMobaBattleData
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
message SMMobaBattleData
|
||||||
|
{
|
||||||
|
repeated MFMobaBattleDataTeam team_list = 1; //队伍列表(客户端通过判断team_id是否等于自己队伍)
|
||||||
|
}
|
||||||
|
|
||||||
//加入成功
|
//加入成功
|
||||||
message SMJoinedNotify
|
message SMJoinedNotify
|
||||||
{
|
{
|
||||||
@ -2034,3 +2107,19 @@ message SMTeamCommandNotify
|
|||||||
optional int32 sender_id = 1; //指令发起者
|
optional int32 sender_id = 1; //指令发起者
|
||||||
optional string custom_command = 2; //指令(json格式客户端自定义)
|
optional string custom_command = 2; //指令(json格式客户端自定义)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//队伍信息通知-全量
|
||||||
|
/*
|
||||||
|
该消息在进入战斗开始后发(注意战前准备阶段不发因为那时可能会发生队伍合并)后续如果断线重连也会补发客户端需要处理多次的问题
|
||||||
|
不同于SMUpdate.team_data该队伍关系不会在发生改变(由于战前准备阶段会有合并队伍的情况所欲SMUpdate.team_data是会发生队伍的变更)
|
||||||
|
*/
|
||||||
|
message SMTeamFullNotify
|
||||||
|
{
|
||||||
|
repeated MFTeamFull team_list = 1; //队伍列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//队伍信息通知-部分
|
||||||
|
message SMTeamPartNotify
|
||||||
|
{
|
||||||
|
repeated MFTeamPart members = 1; //待更新成员列表
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user