192 lines
4.1 KiB
Protocol Buffer
192 lines
4.1 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 propertyId = 1;
|
||
optional int32 propertyValue = 2;
|
||
}
|
||
|
||
|
||
|
||
message Equip{
|
||
optional string id = 1;
|
||
optional int32 equipId = 2;
|
||
optional SpecialEffects mainAttribute = 3;
|
||
repeated SpecialEffects secondAttribute = 4;
|
||
}
|
||
|
||
|
||
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; //入手时间
|
||
|
||
optional int32 energy = 11; //精力
|
||
optional int32 lastUpdateEnergyTime = 13 ;// 上次更新精力时间,-1 代表在队伍中,不需要进行定时恢复。
|
||
|
||
}
|
||
|
||
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 Monster{
|
||
optional string monsterId = 1; // 怪物id
|
||
repeated int32 monsterSkill = 2 ; //怪物技能
|
||
repeated int32 monsterProperty = 3; // 怪物属性
|
||
}
|
||
|
||
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;
|
||
}
|
||
|
||
|
||
message Mission{
|
||
optional int32 itemId = 1;
|
||
optional string state = 2;
|
||
optional int32 missionStep = 3;
|
||
}
|
||
|
||
|
||
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; // 剩余时间
|
||
}
|
||
|
||
message TeamHeroInfo{
|
||
optional int32 position =1;
|
||
optional string heroId = 2;
|
||
}
|
||
|
||
message TeamPokemonInfo{
|
||
optional int32 position =1;
|
||
optional int32 pokemonId = 2;
|
||
}
|
||
|
||
message TeamPosInfo{
|
||
optional int32 teamId = 1; //第几编队
|
||
optional string teamName =2; //编码名称
|
||
repeated TeamHeroInfo teamHeroInfos = 3; //队伍英雄id
|
||
repeated TeamPokemonInfo teamPokemonInfos = 4; // 异妖id
|
||
}
|
||
|
||
message Pokemoncomonpent{
|
||
optional int32 id =1;
|
||
optional int32 level =2;
|
||
}
|
||
|
||
message PokemonInfo{
|
||
optional int32 id = 1; //异妖id
|
||
optional int32 stage =2; //异妖进阶阶数
|
||
repeated Pokemoncomonpent pokemoncomonpent =3; //组件信息
|
||
}
|
||
message WorkShopBaseInfo{
|
||
optional int32 type =1; // 1: 工坊 2:百味居
|
||
optional int32 levle =2 ;
|
||
optional int32 exp =3;
|
||
}
|
||
message WorkShopUnLockInfo{
|
||
optional int32 type =1 ; // 类型 1: 基础锻造 2: 装备打造
|
||
repeated int32 id =4 ; // 蓝图已经解锁的id
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|