ecs/proto/idl/mod_hero.proto

112 lines
3.4 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package Pb;
option go_package = "pb/";
import "enums.proto";
// ModId.ModuleHero: 5000;
// 英雄模块消息定义
// 如果定义的消息内没有字段或者消息被注释掉了,说明该请求不需要参数,发送消息时仅发送包头即可,包体可为空, 返回的消息亦是如此。
message Hero {
uint64 Uid = 1; //玩家英雄在列表中的唯一ID列表中会有多个相同英雄, 故不能用Id做为键
uint32 Id = 2; //数据表ID
uint64 Exp = 3; //当前经验
uint32 Level = 4; //当前等级
uint32 BreakLevel = 5; //突破等级
uint32 SoulLevel = 6; //命魂等级
repeated uint32 SoulSkill = 7; //选择的命魂技能
uint32 Awaken = 8; //觉醒等级
uint32 InLineup = 9; //是否已上阵,0未上阵1援军2上阵
repeated uint64 Attrs = 10; //属性
}
// MsgId.ModHeroList: 5001
// 英雄列表返回, 玩家登录时同步给前端的所有英雄列表
message HeroListAck {
repeated Hero HeroList = 1;
}
// 有新英雄增加,英雄数据发生改变,或者英雄被消耗掉需要从列表删除时返回的消息
message HeroChange {
ChangeType ChangeType = 1;
Hero Hero = 2; //ChangeType=ChangeType.Delete时, Hero中只有Uid有值用于索引删除
}
// MsgId.ModHeroChang: 5002
// 英雄变更返回,仅返回数据发生了改变的英雄, 可能有多个数据改变,所以是集合
// 英雄请求升级,突破,获得到新英雄,英雄被当做材料消耗掉,以及英雄上下阵,装备装卸,都会使英雄的数据发生改变
message HeroChangeListAck {
repeated HeroChange ChangeList = 1;
}
// MsgId.ModHeroUpgrade: 5003
// 英雄升级请求
message HeroUpgradeReq {
uint64 HeroUid = 1;
uint32 Levels = 2; // 1/5级
}
// MsgId.ModHeroBreak: 5004
// 英雄升级请求
message HeroBreakReq {
uint64 HeroUid = 1;
uint32 OptItemId = 2; //选择的可选消耗物品ID
}
// MsgId.ModHeroAwaken = 5005;
// 英雄觉醒
message HeroAwakenReq{
}
// MsgId.ModHeroSoul = 5006;
// 英雄命魂, 用于升级命魂和更改已升级的命魂选择
message HeroSoulReq{
uint64 HeroUid = 1;
uint32 SoulLevel = 2; //要操作的命魂等级
uint32 SoulSkill = 3; //选择的命魂技能(配置表中左边/右边的技能ID),下面的消耗材料,对于已升级的命魂可以不用传
uint32 ConsumeLeftNum = 4; // 左边优先消耗的信物数量
uint32 ConsumeMiddleNum = 5; // 中间消耗的物品数量(奇葩,明明只能选指定的数量,不能多也不能少,还非得让你手动选),
uint32 ConsumeRightNum = 6; // 右边优先消耗的信物数量
repeated uint64 ConsumeLeft = 7; // 左边消耗的英雄UID
repeated uint64 ConsumeRight = 8; // 右边消耗的英雄UID
}
// MsgId.ModHeroFateBreak = 5007;
// 英雄破命
message HeroFateBreakReq{
}
// MsgId.ModHeroQuality = 5008;
// 英雄界限
message HeroQualityReq{
}
// 英雄名将册状态
message HeroBookItem {
uint32 BookId = 1;
AbleStatus Status = 2;
}
// 英雄名将册
message HeroBook {
uint32 HeroId = 1;
repeated HeroBookItem ItemList = 8;
}
// ModHeroBookList: 5013
// ModHeroBookChange: 5014
// 英雄名将册列表返回
message HeroBookListAck {
repeated HeroBook BookList = 1;
}
// ModHeroBookActivate: 5015
// 英雄名将册激活请求
message HeroBookActivateReq {
uint32 HeroId = 1;
uint32 Index = 2;
}