血战到底协议定义,和郭涛简单确认过

master_huanxiang
王永芳 2019-06-13 14:52:12 +08:00
parent 1543d1f8f6
commit be8e68a55b
2 changed files with 60 additions and 57 deletions

View File

@ -0,0 +1,52 @@
package com.ljsd.jieling.protocols;
option optimize_for = SPEED;
import "CommonProto.proto";
message AgentInfo {
optional int32 playerUid = 1;
optional int32 curHp = 2;
optional int32 maxHp =3;
optional int32 camp =4; //
optional int32 curXY =5; //
repeated FoodBuffer foodBuffers = 6; // buff
optional int32 reviveTime = 7; //
repeated int32 dieList = 8; // (uid)
repeated int32 killList = 9; // (uid)
}
message GameStartRequest{
//使
optional int64 clientTimestamp = 1;
}
message GameStartResponse{
optional int64 clientTimestamp = 1; //
optional int64 serverTimestamp = 2; //
optional int32 mapId =3;
//
repeated Cell mapList = 4;
//
optional AgentInfo agentInfo = 5;
//
repeated AgentInfo otherAgentInfos = 6;
//
optional int32 leftTime = 7;
//
optional Drop temporaryItems = 8;
}
message SyncMyselfMoveRequest{
optional int64 clientTimestamp = 1; //
optional int32 tartXY = 2;
}
message SyncMyselfMoveResponse{
optional int64 clientTimestamp = 1; //
optional int64 serverTimestamp = 2; //
}
message SyncOtherFightIndication{
//ID
optional AgentInfo player1 = 1;
optional AgentInfo player2 = 2;
optional int32 result = 3; //1 player1 2 player2
}

View File

@ -3,90 +3,41 @@ package com.ljsd.jieling.protocols;
option optimize_for = SPEED;
import "CommonProto.proto";
message HeroInfo {
optional string heroId = 1;
optional int32 heroHp = 2;
optional int32 heroMaxHp =3;
}
//
//
message RoomMatchRequest{
//使
optional int64 clientTimestamp = 1;
optional int32 type = 1; //type 1
}
//
message RoomMatchResponse{
optional int64 clientTimestamp = 1; //
optional int64 serverTimestamp = 2; //
optional bool result = 1; //true false
optional int32 type = 2; //type 1
}
//退
//退
message RoomCancelMatchRequest{
optional int32 type = 1; //type 1
}
message RoomCancelMatchResponse{
optional bool result = 1; //true false
}
message MatchSuccessIndication{
optional int32 roomId =1;
//
repeated Cell mapList = 2;
//
optional int32 curXY = 3;
//
repeated HeroInfo heroInfos = 4;
//
optional int32 leftTime = 5;
//
optional Drop temporaryItems = 6;
// buff
repeated FoodBuffer foodBuffers = 7;
//
repeated int32 wakeCells = 8;
//
optional Mission missions = 9;
//
optional int32 reviveTime = 10;
//
optional int32 dieCount = 11;
optional int32 type = 2; //type 1
}
//
message StartGameReadyRequest{
//使
optional int64 clientTimestamp = 1;
optional int32 type = 1; //type 1
}
//
message StartGameReadyResponse{
optional int64 clientTimestamp = 1; //
optional int64 serverTimestamp = 2; //
optional int32 type = 1; //type 1
}
message StartGameIndication{
optional int32 roomId = 1;
}
message SyncMyselfMoveRequest{
optional int64 clientTimestamp = 1; //
optional int32 tartX = 2;
optional int32 tartY = 3;
}
message SyncMyselfMoveResponse{
optional int64 clientTimestamp = 1; //
optional int64 serverTimestamp = 2; //
optional int32 type = 2; //type 1
}
message SyncOtherMoveIndication{
//ID
optional int32 player1Uid = 1;
optional int32 player2Uid = 2;
optional int32 successUid = 3; //-1
//
optional int32 player1X = 4;
optional int32 player1Y = 5;
optional int32 player2X = 6;
optional int32 player2Y = 7;
}