上传装备属性加成算法调整

This commit is contained in:
liwei1dao 2022-09-14 11:31:00 +08:00
parent 03b23e7282
commit 1a8ae5e712
9 changed files with 339 additions and 82 deletions

View File

@ -1,6 +1,6 @@
package core
import "go_dreamfactory/modules/battle/fight/component"
import cfg "go_dreamfactory/sys/configure/structs"
type (
///战斗控制器
@ -35,7 +35,20 @@ type (
}
//战斗角色
IFightRole interface {
GetData() component.FightRoleData
/// <summary>
/// 战斗实例
/// </summary>
GetFightBase() IFight
/// <summary>
/// 角色数据
/// </summary>
GetData() FightRoleData
/// <summary>
/// 增加一个主技能
/// </summary>
/// <param name="skillId">技能id</param>
/// <param name="skillLv">技能等级</param>
AddSkill(skillId int32, skillLv int32) ISkil
/// 获取行动令牌
StartAction()
/// 结束行动令牌
@ -73,6 +86,10 @@ type (
}
//技能对象
ISkil interface {
/// <summary>
/// 获取技能配置信息
/// </summary>
GetSkillConf() *cfg.GameSkillAtkData
/// <summary>
/// 触发
/// 遍历所有ChildSkills生成对应的实例并Emit触发
@ -82,7 +99,7 @@ type (
/// 减少CD回合数
/// </summary>
/// <returns>新的回合数</returns>
MinusCD() int32
MinusCD(val int32) int32
/// <summary>
/// 增加CD回合数
/// </summary>
@ -93,11 +110,15 @@ type (
/// </summary>
/// <param name="newVal"></param>
/// <returns></returns>
SetCD(newVal byte) int32
SetCD(newVal int32) int32
/// <summary>
/// 战斗结束时的清理
/// </summary>
Clear()
/// <summary>
///发送技能日志
///</summary>
SendSkillLog()
}
//Buff对象
IBuff interface {
@ -119,8 +140,6 @@ type (
/// 战斗结束时的清理
Clear()
}
///事件管理
IFightEvent interface {
//发送事件
EmitForInt(eventNumber int, args ...interface{})

View File

@ -185,7 +185,7 @@ func (this *ComModifyOperate) ToString() string {
type ComSetSkillCD struct {
From byte
Skillid int
Skillid int32
Nv byte
}
@ -208,7 +208,10 @@ func (this *ComStartFight) ToString() string {
return str
}
type ComEndFight struct{}
type ComEndFight struct {
FightId string
Win bool
}
func (this *ComEndFight) Recycle() {}
func (this *ComEndFight) ToString() string {

View File

@ -1,18 +1,48 @@
package component
package core
import "go_dreamfactory/modules/battle/fight/attribute"
import (
"go_dreamfactory/modules/battle/fight/attribute"
)
type FightRoleData struct {
/// <summary>
/// 角色名
/// </summary>
Name string
/// <summary>
/// 阵营 1=我 2=敌
/// </summary>
Side byte
/// <summary>
/// 种族 1灼热, 2涌动, 3呼啸, 4闪耀
/// </summary>
Race byte
/// <summary>
/// 站位 1~5
/// </summary>
Pos byte
/// <summary>
/// 唯一标记同时也是List FightBase.Roles的索引
/// </summary>
Rid byte
/// <summary>
/// 唯一id, 用于调试打日志
/// </summary>
UniqueId string
/// <summary>
/// 是否活着
/// </summary>
ALive bool
/// <summary>
/// 是否队长
/// </summary>
Captain bool
/// <summary>
/// 队长技 id
/// </summary>
CaptainSkillId int32
//region 战斗属性
//region 战斗属性-----------------------------------------------------------------------
/// <summary>
/// 行动值
/// </summary>
@ -72,8 +102,20 @@ type FightRoleData struct {
/// </summary>
UnderStand *attribute.AttributeNumeric
///region 技能相关-----------------------------------------------------------------------
/// <summary>
/// 最后一次选择的skillAtk类技能
/// </summary>
LastSkillId int32
/// <summary>
/// 最后一次skillAtk技能选择的目标
/// </summary>
LastChooseTarget []byte
/// <summary>
/// 可执行技能列表
/// </summary>
/// <remarks>
/// 在角色初始化时会根据SkillsInfo实例化对应的技能保存于此
/// </remarks>
Skills map[int32]ISkil
}

View File

@ -5,12 +5,17 @@ import (
)
type FightBase struct {
/// <summary>
/// 战斗类型
/// </summary>
FightId string
/// 战斗是否进行中
fightIng bool
/// 战斗控制器
fight core.IFight
/// 战斗类型
fightType core.FightType
/// 战斗是否进行中
fightIng bool
/// 所有参战角色集合
Roles []core.IFightRole
/// 当前回合满足行动值大于等于100的所有角色
@ -21,6 +26,12 @@ type FightBase struct {
FightAI core.IFightAI
///事件系统
FightEvent core.IFightEvent
/// <summary>
/// 触发释放主技能,需要在当前出手角色技能释放完成之后再执行
/// </summary>
readyEmitSkills map[core.IFightRole]int32
/// 下一个行动角色
nextAtkRole core.IFightRole
}
/// 开始战斗
@ -37,6 +48,60 @@ func (this *FightBase) StartFight() {
this.fight.TurnRound()
}
func (this *FightBase) CheckFightEnd() {
lives := []int{0, 0}
for _, role := range this.Roles {
dead := role.IsDead()
if !dead {
lives[role.GetData().Side-1] += 1
}
}
if lives[0] == 0 || lives[1] == 0 {
this.fightIng = false
com := new(core.ComEndFight)
com.FightId = this.FightId
com.Win = lives[1] == 0
// FightLog.AddCommand(com)
// FightDebug.Log("=========战斗结束=========")
}
}
/// <summary>
/// 触发队长技队长技配置在atk表中触发顺序无所谓
/// </summary>
func (this *FightBase) EmitCaptainSkill() {
for _, role := range this.Roles {
if fskill := role.AddSkill(role.GetData().CaptainSkillId, 1); fskill.GetSkillConf().Type == int32(core.SkillType_Captain) {
fskill.Emit()
fskill.SendSkillLog()
}
}
}
/// <summary>
/// 触发被动技队长技配置在atk表中触发顺序无所谓
/// </summary>
func (this *FightBase) EmitPassiveSkillSkill() {
for _, role := range this.Roles {
for _, curskill := range role.GetData().Skills {
if curskill.GetSkillConf().Type == int32(core.SkillType_Passive) {
curskill.Emit()
curskill.SendSkillLog()
}
}
}
}
/// <summary>
/// 初始化所有角色的行动值
/// </summary>
func (this *FightBase) InitRoleOperateValue() {
roles := this.Order("Speed", core.EOrderType_Desc)
for _, role := range roles {
role.ModifyOperateValue(role.GetData().Speed.Value() / roles[0].GetData().Speed.Value() * 100.0)
}
}
/// 开始一个回合
func (this *FightBase) TurnRound() {
//获取当前出手的角色
@ -54,27 +119,78 @@ func (this *FightBase) TurnRound() {
}
}
/// <summary>
/// 初始化所有角色的行动值
/// </summary>
func (this *FightBase) InitRoleOperateValue() {
}
/// <summary>
/// 排序所有角色
/// </summary>
/// <param name="orderBy">排序方式</param>
/// <param name="orderType">升序还是降序asc/desc </param>
func (this *FightBase) Order(orderBy string, pOrder core.EOrderType) {
func (this *FightBase) Order(orderBy string, pOrder core.EOrderType) []core.IFightRole {
if len(this.Roles) <= 1 {
return
return this.Roles
}
this.Roles = FightRoleSort(this.Roles, orderBy, pOrder)
return this.Roles
}
/// <summary>
/// 计算当前可以行动的角色没有时返回null
/// </summary>
func (this *FightBase) GetActionRole() core.IFightRole {
if this.nextAtkRole != nil {
return this.nextAtkRole
}
// if (pOrder == core.EOrderType_Asc){
this.CanAtkRoles = this.CanAtkRoles[:0]
for _, v := range this.Roles {
if v.GetData().ALive && v.GetData().Operate.Value() >= 100 {
this.CanAtkRoles = append(this.CanAtkRoles, v)
}
}
// }
// else{
// }
if len(this.CanAtkRoles) == 0 {
return nil
} else if len(this.CanAtkRoles) == 1 {
return this.CanAtkRoles[0]
} else {
FightRoleSort(this.CanAtkRoles, "OperateValue", core.EOrderType_Asc)
return this.CanAtkRoles[0]
}
}
/// <summary>
/// LastActionRole触发SkillId技能选择的目标是TargetRid
/// 手动时,表现层在玩家操作后,调用本方法
/// 自动战斗或服务端里通过FightAI逻辑来自动触发
/// </summary>
/// <param name="skillId">技能ID</param>
/// <param name="targetRid">选择的目标rid</param>
func (this *FightBase) EmitSkill(skillId int32, targetRid []int32, toNextRound bool) {
// FightDebug.Log($">>>>>>>> {LastActionRole.Data.UniqueId} 使用技能 skillid={skillId} 选择了Rid: {targetRid[0].ToString()}");
this.LastActionRole.EmitSkill(skillId, targetRid)
//主动技能触发所有带动作的子技能需要在主动技能释放完成之后执行
this.EmitPassiveMainSkill()
this.FightEvent.EmitForInt(int(core.EventType_OnRoundEnd), this.LastActionRole)
this.FightEvent.EmitForInt(int(core.EventType_OnPreActionEnd), this.LastActionRole)
this.OnLastActionRoleActionStop()
}
/// <summary>执行被动触发的主技能技能</summary>
func (this *FightBase) EmitPassiveMainSkill() {
for k, v := range this.readyEmitSkills {
if !k.CanAtk() {
continue
}
k.EmitSkill(v, []int32{})
}
this.readyEmitSkills = make(map[core.IFightRole]int32)
}
/// <summary>
/// 表现层在角色表现结束后,调用本方法
/// </summary>
func (this *FightBase) OnLastActionRoleActionStop() {
this.LastActionRole.StopAction()
this.FightEvent.EmitForInt(int(core.EventType_OnStopAction))
//检测战斗是否结束
this.CheckFightEnd()
}

View File

@ -0,0 +1,78 @@
package skill
import (
"go_dreamfactory/modules/battle/fight/core"
cfg "go_dreamfactory/sys/configure/structs"
)
/// <summary>
/// 主动/队长技能
/// </summary>
/// <remarks>
/// 遍历触发子技能
/// </remarks>
type FightSkill struct {
OwnerRole core.IFightRole
CD int32
SkillConf *cfg.GameSkillAtkData
}
/// <summary>
/// 触发
/// 遍历所有ChildSkills生成对应的实例并Emit触发
/// </summary>
func (this *FightSkill) Emit() {
}
/// <summary>
/// 减少CD回合数
/// </summary>
/// <returns>新的回合数</returns>
func (this *FightSkill) MinusCD(val int32) int32 {
if this.CD > 0 {
this.CD -= val
if this.CD < 0 {
this.CD = 0
}
this.SetCD(this.CD)
}
return this.CD
}
/// <summary>
/// 增加CD回合数
/// </summary>
/// <returns>新的回合数</returns>
func (this *FightSkill) ResetCD() int32 {
this.CD = this.SkillConf.CD
this.SetCD(this.CD)
return this.CD
}
/// <summary>
/// 设置CD回合数为新的值
/// </summary>
/// <param name="newVal"></param>
/// <returns></returns>
func (this *FightSkill) SetCD(newVal int32) int32 {
this.CD = newVal
//记录战报
com := new(core.ComSetSkillCD)
com.From = this.OwnerRole.GetData().Rid
com.Skillid = this.SkillConf.Id
com.Nv = byte(newVal)
// this.OwnerRole.GetFightBase().FightLog.AddCommand(com)
return this.CD
}
/// <summary>发送技能日志</summary>
func (this *FightSkill) Clear() {
}
/// <summary>发送技能日志</summary>
func (this *FightSkill) SendSkillLog() {
}

View File

@ -3,21 +3,9 @@ package fight
import (
"go_dreamfactory/modules/battle/fight/core"
"math/rand"
"sort"
)
type FightRoleSlice []core.IFightRole
func (x FightRoleSlice) Len() int { return len(x) }
func (x FightRoleSlice) Less(i, j int) bool {
return x[i].GetData().Operate.Value() < x[j].GetData().Operate.Value()
}
func (x FightRoleSlice) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (x FightRoleSlice) Sort(pType string) {
sort.Sort(x)
}
//战斗角色排序
func FightRoleSort(arr []core.IFightRole, pType string, pOrder core.EOrderType) []core.IFightRole {
if len(arr) <= 1 {
return arr
@ -72,8 +60,8 @@ func FightRoleSort(arr []core.IFightRole, pType string, pOrder core.EOrderType)
break
}
}
lowPart = FightRoleSort(lowPart, pType)
highPart = FightRoleSort(highPart, pType)
lowPart = FightRoleSort(lowPart, pType, pOrder)
highPart = FightRoleSort(highPart, pType, pOrder)
lowPart = append(lowPart, middlePart...)
lowPart = append(lowPart, highPart...)

View File

@ -189,6 +189,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
Lv: 1,
AttrName: mattr[0].Attrkey,
Value: mattr[0].Attrvar,
BaseValue: mattr[0].Attrvar,
}
if sattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Addlibrary); err != nil || len(mattr) == 0 {
return
@ -213,6 +214,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
Lv: 1,
AttrName: sattr[v].Attrkey,
Value: sattr[v].Attrvar,
BaseValue: sattr[v].Attrvar,
})
}
}
@ -223,7 +225,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equip *cfg.GameEquipData, intensify *cfg.GameEquipIntensifyData) (err error) {
equipment.Lv++
equipment.MainEntry.Lv++
equipment.MainEntry.Value += int32(float64(equipment.MainEntry.Value) * float64(intensify.Bonus) / 1000.0)
equipment.MainEntry.Value = equipment.MainEntry.BaseValue + int32(float64(equipment.MainEntry.BaseValue)*float64(intensify.Bonus)/1000.0)
if !intensify.Activation { //不触发副词条变化
return
}
@ -263,7 +265,7 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ
if attrlibrary, err = this.module.configure.GetEquipmentAttrlibraryConfigureByKey(equipment.AdverbEntry[index].Id); err != nil {
return
}
equipment.AdverbEntry[index].Value += int32(float64(attrlibrary.Addition[equipment.AdverbEntry[index].Lv-1]) / 1000.0 * float64(attrlibrary.Attrvar))
equipment.AdverbEntry[index].Value = equipment.AdverbEntry[index].BaseValue + int32(float64(attrlibrary.Addition[equipment.AdverbEntry[index].Lv-1])/1000.0*float64(equipment.AdverbEntry[index].BaseValue))
equipment.AdverbEntry[index].Lv++
}
return

View File

@ -31,6 +31,7 @@ type EquipmentAttributeEntry struct {
AttrName string `protobuf:"bytes,3,opt,name=AttrName,proto3" json:"AttrName"` //属性名
Lv int32 `protobuf:"varint,4,opt,name=Lv,proto3" json:"Lv"` //属性等级
Value int32 `protobuf:"varint,5,opt,name=Value,proto3" json:"Value"` //属性值
BaseValue int32 `protobuf:"varint,6,opt,name=BaseValue,proto3" json:"BaseValue"` //基础属性
}
func (x *EquipmentAttributeEntry) Reset() {
@ -100,6 +101,13 @@ func (x *EquipmentAttributeEntry) GetValue() int32 {
return 0
}
func (x *EquipmentAttributeEntry) GetBaseValue() int32 {
if x != nil {
return x.BaseValue
}
return 0
}
//武器数据
type DB_Equipment struct {
state protoimpl.MessageState
@ -232,7 +240,7 @@ var File_equipment_equipment_db_proto protoreflect.FileDescriptor
var file_equipment_equipment_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7,
0x01, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x69,
@ -241,30 +249,32 @@ var file_equipment_equipment_db_proto_rawDesc = []byte{
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x41, 0x74, 0x74, 0x72,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x44,
0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63,
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46,
0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6b, 0x65,
0x65, 0x70, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x6d, 0x61, 0x69,
0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45,
0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a,
0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a,
0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x18,
0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x61,
0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x42,
0x61, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x44, 0x42, 0x5f,
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68,
0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x61, 0x69,
0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6b, 0x65, 0x65, 0x70,
0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x3a, 0x0a, 0x0b, 0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74,
0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b,
0x61, 0x64, 0x76, 0x65, 0x72, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6f,
0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x69,
0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74,
0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -437,8 +437,8 @@ type PagodaRankListReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FloorId int32 `protobuf:"varint,1,opt,name=floorId,proto3" json:"floorId"` // 层数 0 标识总榜
Friend bool `protobuf:"varint,2,opt,name=friend,proto3" json:"friend"` // true 好友榜
FloorId int32 `protobuf:"varint,1,opt,name=floorId,proto3" json:"floorId"` // 层数
Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type"` // 塔类型
}
func (x *PagodaRankListReq) Reset() {
@ -480,11 +480,11 @@ func (x *PagodaRankListReq) GetFloorId() int32 {
return 0
}
func (x *PagodaRankListReq) GetFriend() bool {
func (x *PagodaRankListReq) GetType() int32 {
if x != nil {
return x.Friend
return x.Type
}
return false
return 0
}
type PagodaRankListResp struct {
@ -575,16 +575,15 @@ var file_pagoda_pagoda_msg_proto_rawDesc = []byte{
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73,
0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0x45, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
0x22, 0x41, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64,
0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a,
0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44,
0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e,
0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e,
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e,
0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67,
0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (