diff --git a/modules/battle/fight/core/core.go b/modules/battle/fight/core/core.go
index 17dec3158..8c6967d9c 100644
--- a/modules/battle/fight/core/core.go
+++ b/modules/battle/fight/core/core.go
@@ -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
+ ///
+ /// 战斗实例
+ ///
+ GetFightBase() IFight
+ ///
+ /// 角色数据
+ ///
+ GetData() FightRoleData
+ ///
+ /// 增加一个主技能
+ ///
+ /// 技能id
+ /// 技能等级
+ AddSkill(skillId int32, skillLv int32) ISkil
/// 获取行动令牌
StartAction()
/// 结束行动令牌
@@ -73,6 +86,10 @@ type (
}
//技能对象
ISkil interface {
+ ///
+ /// 获取技能配置信息
+ ///
+ GetSkillConf() *cfg.GameSkillAtkData
///
/// 触发
/// 遍历所有ChildSkills,生成对应的实例,并Emit触发
@@ -82,7 +99,7 @@ type (
/// 减少CD回合数
///
/// 新的回合数
- MinusCD() int32
+ MinusCD(val int32) int32
///
/// 增加CD回合数
///
@@ -93,11 +110,15 @@ type (
///
///
///
- SetCD(newVal byte) int32
+ SetCD(newVal int32) int32
///
/// 战斗结束时的清理
///
Clear()
+ ///
+ ///发送技能日志
+ ///
+ SendSkillLog()
}
//Buff对象
IBuff interface {
@@ -119,8 +140,6 @@ type (
/// 战斗结束时的清理
Clear()
}
-
- ///事件管理
IFightEvent interface {
//发送事件
EmitForInt(eventNumber int, args ...interface{})
diff --git a/modules/battle/fight/core/enum.go b/modules/battle/fight/core/enum.go
index 7e420fff6..8f61c94ca 100644
--- a/modules/battle/fight/core/enum.go
+++ b/modules/battle/fight/core/enum.go
@@ -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 {
diff --git a/modules/battle/fight/component/fightroledata.go b/modules/battle/fight/core/fightroledata.go
similarity index 55%
rename from modules/battle/fight/component/fightroledata.go
rename to modules/battle/fight/core/fightroledata.go
index 79900ab55..d86258cc2 100644
--- a/modules/battle/fight/component/fightroledata.go
+++ b/modules/battle/fight/core/fightroledata.go
@@ -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 {
+ ///
+ /// 角色名
+ ///
+ Name string
///
/// 阵营 1=我 2=敌
///
Side byte
///
+ /// 种族 1灼热, 2涌动, 3呼啸, 4闪耀
+ ///
+ Race byte
+ ///
+ /// 站位 1~5
+ ///
+ Pos byte
+ ///
/// 唯一标记,同时也是List FightBase.Roles的索引
///
Rid byte
+ ///
+ /// 唯一id, 用于调试打日志
+ ///
+ UniqueId string
+ ///
+ /// 是否活着
+ ///
+ ALive bool
+ ///
+ /// 是否队长
+ ///
+ Captain bool
+ ///
+ /// 队长技 id
+ ///
+ CaptainSkillId int32
- //region 战斗属性
+ //region 战斗属性-----------------------------------------------------------------------
///
/// 行动值
///
@@ -72,8 +102,20 @@ type FightRoleData struct {
///
UnderStand *attribute.AttributeNumeric
+ ///region 技能相关-----------------------------------------------------------------------
+ ///
+ /// 最后一次选择的skillAtk类技能
+ ///
+ LastSkillId int32
///
/// 最后一次skillAtk技能选择的目标
///
LastChooseTarget []byte
+ ///
+ /// 可执行技能列表
+ ///
+ ///
+ /// 在角色初始化时,会根据SkillsInfo实例化对应的技能保存于此
+ ///
+ Skills map[int32]ISkil
}
diff --git a/modules/battle/fight/fightbase.go b/modules/battle/fight/fightbase.go
index 95b44b48e..8c7926234 100644
--- a/modules/battle/fight/fightbase.go
+++ b/modules/battle/fight/fightbase.go
@@ -5,12 +5,17 @@ import (
)
type FightBase struct {
+ ///
+ /// 战斗类型
+ ///
+ 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
+ ///
+ /// 触发释放主技能,需要在当前出手角色技能释放完成之后再执行
+ ///
+ 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("=========战斗结束=========")
+ }
+}
+
+///
+/// 触发队长技,队长技配置在atk表中,触发顺序无所谓
+///
+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()
+ }
+ }
+}
+
+///
+/// 触发被动技,队长技配置在atk表中,触发顺序无所谓
+///
+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()
+ }
+ }
+ }
+}
+
+///
+/// 初始化所有角色的行动值
+///
+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() {
}
}
-///
-/// 初始化所有角色的行动值
-///
-func (this *FightBase) InitRoleOperateValue() {
-
-}
-
///
/// 排序所有角色
///
/// 排序方式
/// 升序还是降序:asc/desc
-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
+}
+
+///
+/// 计算当前可以行动的角色,没有时返回null
+///
+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]
+ }
+}
+
+///
+/// LastActionRole触发SkillId技能,选择的目标是TargetRid
+/// 手动时,表现层在玩家操作后,调用本方法
+/// 自动战斗或服务端里,通过FightAI逻辑来自动触发
+///
+/// 技能ID
+/// 选择的目标rid
+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()
+}
+
+/// 执行被动触发的主技能技能
+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)
+}
+
+///
+/// 表现层在角色表现结束后,调用本方法
+///
+func (this *FightBase) OnLastActionRoleActionStop() {
+ this.LastActionRole.StopAction()
+ this.FightEvent.EmitForInt(int(core.EventType_OnStopAction))
+ //检测战斗是否结束
+ this.CheckFightEnd()
}
diff --git a/modules/battle/fight/skill/fightskill.go b/modules/battle/fight/skill/fightskill.go
new file mode 100644
index 000000000..5fa8f08bf
--- /dev/null
+++ b/modules/battle/fight/skill/fightskill.go
@@ -0,0 +1,78 @@
+package skill
+
+import (
+ "go_dreamfactory/modules/battle/fight/core"
+ cfg "go_dreamfactory/sys/configure/structs"
+)
+
+///
+/// 主动/队长技能
+///
+///
+/// 遍历触发子技能
+///
+type FightSkill struct {
+ OwnerRole core.IFightRole
+ CD int32
+ SkillConf *cfg.GameSkillAtkData
+}
+
+///
+/// 触发
+/// 遍历所有ChildSkills,生成对应的实例,并Emit触发
+///
+func (this *FightSkill) Emit() {
+
+}
+
+///
+/// 减少CD回合数
+///
+/// 新的回合数
+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
+}
+
+///
+/// 增加CD回合数
+///
+/// 新的回合数
+func (this *FightSkill) ResetCD() int32 {
+ this.CD = this.SkillConf.CD
+ this.SetCD(this.CD)
+ return this.CD
+}
+
+///
+/// 设置CD回合数为新的值
+///
+///
+///
+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
+}
+
+/// 发送技能日志
+func (this *FightSkill) Clear() {
+
+}
+
+/// 发送技能日志
+func (this *FightSkill) SendSkillLog() {
+
+}
diff --git a/modules/battle/fight/utils.go b/modules/battle/fight/utils.go
index 8a7f2fc12..b98513ba2 100644
--- a/modules/battle/fight/utils.go
+++ b/modules/battle/fight/utils.go
@@ -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...)
diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go
index 7f6d9b0cb..981e8745e 100644
--- a/modules/equipment/modelEquipment.go
+++ b/modules/equipment/modelEquipment.go
@@ -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
diff --git a/pb/equipment_db.pb.go b/pb/equipment_db.pb.go
index 6597d9fb2..e6372b01a 100644
--- a/pb/equipment_db.pb.go
+++ b/pb/equipment_db.pb.go
@@ -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 (
diff --git a/pb/pagoda_msg.pb.go b/pb/pagoda_msg.pb.go
index c888204d0..b4d352725 100644
--- a/pb/pagoda_msg.pb.go
+++ b/pb/pagoda_msg.pb.go
@@ -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 (