136 lines
2.9 KiB
Protocol Buffer
136 lines
2.9 KiB
Protocol Buffer
|
||
package com.ljsd.jieling.protocols;
|
||
|
||
option optimize_for = SPEED;
|
||
|
||
// 嵌套的proto 必须在当前 proto 之前声明
|
||
|
||
message ErrorResponse{
|
||
optional int32 errCode =1 ; // 错误码,默认为0
|
||
optional string errMsg =2 ; // 错误信息
|
||
}
|
||
|
||
message Player{
|
||
optional int32 uid = 1;
|
||
optional string nickName = 2;
|
||
optional int32 level = 3;
|
||
optional int32 exp = 4;
|
||
optional int32 vipLevel = 5;
|
||
optional string familyId = 6;
|
||
optional string head = 7;
|
||
optional int32 curMapId = 8;
|
||
}
|
||
|
||
|
||
message Item{
|
||
optional int32 itemId = 1;
|
||
optional int32 itemNum = 2;
|
||
optional int32 endingTime = 3;
|
||
}
|
||
|
||
message Buff{
|
||
optional int32 buffId = 1;
|
||
}
|
||
|
||
|
||
message SpecialEffects{
|
||
optional int32 specialId = 1;
|
||
repeated int32 effects = 2;
|
||
}
|
||
|
||
message Equip{
|
||
optional string id = 1;
|
||
optional int32 equipId = 2;
|
||
optional int32 mainAttribute = 3;
|
||
repeated int32 attributeList = 4;
|
||
optional SpecialEffects specialEffects = 5;
|
||
}
|
||
|
||
|
||
message Hero{
|
||
optional string id = 1;
|
||
optional int32 heroId = 2;
|
||
optional int32 level = 3;
|
||
optional int32 breakId = 4;
|
||
optional int32 star = 5;
|
||
optional int32 skinId = 6;
|
||
|
||
repeated int32 skillIdList = 7;
|
||
repeated string equipIdList = 8;
|
||
optional int32 actionPower = 9 ; //行动力
|
||
optional int32 createTime = 10; //入手时间
|
||
}
|
||
|
||
message HeroFightInfo {
|
||
optional Hero hero = 1;
|
||
optional float attack = 2;
|
||
optional float physicalDefence = 3;
|
||
optional float magicDefence = 4;
|
||
optional float hp = 5;
|
||
optional float speed = 6;
|
||
}
|
||
|
||
message EventBehaviorValues{
|
||
repeated int32 behaviorValues = 1;
|
||
}
|
||
// 事件行为结果
|
||
message EventBehaviorCommon{
|
||
// 行为类型
|
||
optional int32 behaviorType = 1;
|
||
// 行为参数
|
||
repeated EventBehaviorValues eventBehaviorValues = 2;
|
||
}
|
||
|
||
|
||
|
||
// 地图每个格子的信息
|
||
message Cell{
|
||
// 格子id
|
||
optional int32 cellId = 1;
|
||
// mapPointConfig id
|
||
optional int32 pointId = 2;
|
||
// eventPointConfig id
|
||
optional int32 eventId = 3;
|
||
}
|
||
|
||
|
||
message Mission{
|
||
optional string id = 1;
|
||
optional int32 itemId = 2;
|
||
}
|
||
|
||
|
||
message Mail{
|
||
optional string mailId = 1;
|
||
optional int32 state = 2; //0:未读 1:已读取 2: 未领取 3 已领取
|
||
optional string head = 3;
|
||
optional string content = 4;
|
||
optional string mailItem = 5; //附件
|
||
optional int32 sendTime = 6;
|
||
optional int32 effectiveTime = 7; // 秒 0:永久有效
|
||
optional string sendName = 8 ; //发送者名字
|
||
optional int32 mailType = 9; //邮件类型 1:系统邮件 2:idip 业务邮件
|
||
|
||
}
|
||
|
||
|
||
message Family{
|
||
optional string id = 1;
|
||
}
|
||
|
||
message Drop{
|
||
repeated Item itemlist = 1;
|
||
repeated Equip equipId = 2;
|
||
repeated Hero Hero = 3;
|
||
}
|
||
|
||
message GMCommand{
|
||
optional string command =1 ; // 指令字符串 type#prarm1#param2
|
||
}
|
||
|
||
message AdventureStateInfo{
|
||
optional int32 positionId = 1; // 区域编号
|
||
repeated string heroIdList =2 ; // 驻扎英雄id
|
||
optional int32 remainTime = 3; // 剩余时间
|
||
}
|