This commit is contained in:
aozhiwei 2024-03-20 15:54:34 +08:00
parent 08dfa906c9
commit 2a92ff7267
5 changed files with 102 additions and 1 deletions

View File

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

View File

@ -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) {

View File

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

View File

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

View File

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