This commit is contained in:
liwei1dao 2022-07-21 09:34:50 +08:00
commit 28d91331f5
12 changed files with 346 additions and 145 deletions

View File

@ -7,6 +7,8 @@ import (
type Target struct {
//这里定义需要测试的方法
Set func()
Get func()
}
//测试基准
@ -46,15 +48,15 @@ func RunBenchmark(b *testing.B, benchmarks []Benchmark) {
for _, bench := range benchmarks {
bench := bench
b.Run(fmt.Sprintf("%s-parallelism(%d)- ", bench.TargetBuilder.Name, bench.Parallelism), func(b *testing.B) {
// target, err := bench.TargetBuilder.Make(bench)
// if err != nil {
// b.Fatalf("%s setup fail: %v", bench.TargetBuilder.Name, err)
// }
target, err := bench.TargetBuilder.Make(bench)
if err != nil {
b.Fatalf("%s setup fail: %v", bench.TargetBuilder.Name, err)
}
if bench.Parallelism == 0 {
b.ResetTimer()
for i := 0; i < b.N; i++ {
//执行测试方法
target.Get()
}
} else {
@ -63,6 +65,7 @@ func RunBenchmark(b *testing.B, benchmarks []Benchmark) {
b.RunParallel(func(pb *testing.PB) { //并行执行
for pb.Next() {
//执行测试方法
target.Get()
}
})
}

View File

@ -1,27 +1,104 @@
package bench
import (
"context"
"fmt"
"go_dreamfactory/sys/cache"
"os"
"testing"
"github.com/go-redis/redis/v8"
)
func BenchmarkMarsh(b *testing.B) {
var LusScriptgetList = `
local data = {}
local n = 1
for i, v in ipairs(KEYS) do
if i%2 == 0 then
data[n] = redis.call("HGETALL", v)
n = n+1
end
end
return data
`
var res string
func TestMain(m *testing.M) {
if err := cache.OnInit(nil, cache.Set_Redis_Addr([]string{
"10.0.0.9:6986",
// "10.0.0.9:9001", "10.0.0.9:9002", "10.0.0.9:9003", "10.0.1.45:9004", "10.0.1.45:9005", "10.0.1.45:9006",
}),
// cache.Set_Redis_Password(""),
cache.Set_Redis_Password("li13451234"),
cache.Set_Redis_DB(9),
cache.Set_Redis_IsCluster(false)); err != nil {
fmt.Printf("err:%v\n", err)
return
}
var err error
res, err = cache.Redis().NewScript(LusScriptgetList).Result()
if err != nil {
fmt.Println("err:", err)
}
defer os.Exit(m.Run())
}
func BenchmarkRedis(b *testing.B) {
var (
// ncpu = runtime.NumCPU()
parallelisms = []int{4, 16, 64}
dataSizes = []int{100, 1000, 10000}
numKeys = 1024
builders = []TargetBuilder{
keys = []string{
"hero:0_62d6131a3a719b898a90b5fb-62d6131a3a719b898a90b5fe",
"hero:0_62d6131a3a719b898a90b5fb-62d6131a3a719b898a90b600",
"hero:0_62d6131a3a719b898a90b5fb-62d661d6bca6eab554879fc6",
"hero:0_62d6131a3a719b898a90b5fb-62d6694dbca6eab554879fef",
// "hero:0_62bbf14cf88fbd265e61a121-62bbf1849d64e5ee7ff12529",
// "hero:0_62bbf364f88fbd265e61a122-62bbf5189b1970ed6b28b638",
// "hero:0_62bbf364f88fbd265e61a122-62bbf5189b1970ed6b28b63e",
// "hero:0_62bbf57346a32c12466c2e64-62bbf58d9b1970ed6b28b643",
}
// keys2 = []string{
// "hero:0_62bbf14cf88fbd265e61a121-62bbf1849d64e5ee7ff12529{yes}",
// "hero:0_62bbf364f88fbd265e61a122-62bbf5189b1970ed6b28b638{yes}",
// "hero:0_62bbf364f88fbd265e61a122-62bbf5189b1970ed6b28b63e{yes}",
// "hero:0_62bbf57346a32c12466c2e64-62bbf58d9b1970ed6b28b643{yes}",
// }
builders = []TargetBuilder{
{
Name: "测试名1",
Name: "pipeline",
Make: func(bench Benchmark) (Target, error) {
return Target{}, nil
return Target{
Get: func() {
for _, v := range keys {
ctx := context.Background()
cache.Redis().Pipeline(ctx, func(pipe redis.Pipeliner) error {
pipe.HGetAll(ctx, v)
_, err := pipe.Exec(ctx)
// fmt.Println(v)
return err
})
}
},
}, nil
},
},
{
Name: "测试名2",
Name: "lua",
Make: func(bench Benchmark) (Target, error) {
return Target{}, nil
return Target{
Get: func() {
if _, err := cache.Redis().EvalSha(context.Background(), res, keys).Result(); err != nil {
fmt.Println(err)
} else {
// fmt.Println(v)
}
},
}, nil
},
},
}

View File

@ -35,8 +35,8 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
)
szCards = make([]int32, 0)
rsp := &pb.HeroDrawCardResp{}
curStar4Count = this.GetFloorStarData(req.DrawType, session.GetUserId(), 4)
curStar5Count = this.GetFloorStarData(req.DrawType, session.GetUserId(), 5)
//curStar4Count = this.GetFloorStarData(req.DrawType, session.GetUserId(), 4)
//curStar5Count = this.GetFloorStarData(req.DrawType, session.GetUserId(), 5)
this.module.Debugf("当前4星抽卡没中次数:%d, 当前5星抽卡没中次数:%d", curStar4Count, curStar5Count)
// 抽卡相关
@ -83,12 +83,12 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
continue
}
if _getCardCfg.Star == 4 { // 当抽取到的英雄是4星的时候 清除 该类型的保底次数
this.SetFloorStarData(req.DrawType, session.GetUserId(), 4)
//SetFloorStarData(req.DrawType, session.GetUserId(), 4)
hitStar4 = 0
hitStar = 4
break
} else if _getCardCfg.Star == 5 { // 当抽取到的英雄是5星的时候 清除 该类型的保底次数
this.SetFloorStarData(req.DrawType, session.GetUserId(), 5)
//SetFloorStarData(req.DrawType, session.GetUserId(), 5)
hitStar5 = 0 // 清0
hitStar = 5
break
@ -108,15 +108,15 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
}
if hitStar != 0 {
hitStar = 0
this.ModifyFloorStarData(req.DrawType, session.GetUserId(), hitStar) // 重置该星级保底
//ModifyFloorStarData(req.DrawType, session.GetUserId(), hitStar) // 重置该星级保底
}
}
if hitStar4 != 0 {
this.AddFloorStarData(req.DrawType, session.GetUserId(), 4, hitStar4) // 增加4星保底次数
//AddFloorStarData(req.DrawType, session.GetUserId(), 4, hitStar4) // 增加4星保底次数
}
if hitStar5 != 0 {
this.AddFloorStarData(req.DrawType, session.GetUserId(), 5, hitStar5) // 增加5星保底次数
//AddFloorStarData(req.DrawType, session.GetUserId(), 5, hitStar5) // 增加5星保底次数
}
//计算保底
@ -130,24 +130,24 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
return
}
// 获取当前卡牌类型保底次数
func (this *apiComp) GetFloorStarData(drawType int32, uid string, star int32) (count int32) {
return
}
// // 获取当前卡牌类型保底次数
// func GetFloorStarData(drawType int32, uid string, star int32) (count int32) {
// return
// }
// 清除保底信息(drawType 抽卡类型)
func (this *apiComp) SetFloorStarData(drawType int32, uid string, star int32) {
return
}
// // 清除保底信息(drawType 抽卡类型)
// func SetFloorStarData(drawType int32, uid string, star int32) {
// return
// }
// 当前没有抽中 增加保底次数
func (this *apiComp) AddFloorStarData(drawType int32, uid string, star int32, count int32) {
// // 当前没有抽中 增加保底次数
// func AddFloorStarData(drawType int32, uid string, star int32, count int32) {
return
}
// return
// }
// 当前有抽中 修改保底次数
func (this *apiComp) ModifyFloorStarData(drawType int32, uid string, star int32) {
// // 当前有抽中 修改保底次数
// func ModifyFloorStarData(drawType int32, uid string, star int32) {
return
}
// return
// }

View File

@ -263,9 +263,9 @@ func (this *ModelHero) setEquipProperty(hero *pb.DBHero, equip []*pb.DB_Equipmen
}
//设置装备
func (this *ModelHero) setEquipment(hero *pb.DBHero) (err error) {
func (this *ModelHero) setEquipment(hero *pb.DBHero) (newHero *pb.DBHero, err error) {
if len(hero.EquipID) == 0 {
return nil
return
}
update := make(map[string]interface{})
@ -280,19 +280,21 @@ func (this *ModelHero) setEquipment(hero *pb.DBHero) (err error) {
}
//创建新卡
newHero, err := this.createOneHero(hero.Uid, hero.HeroID)
newHero, err = this.createOneHero(hero.Uid, hero.HeroID)
if err != nil {
this.moduleHero.Errorf("%v", err)
return err
return
}
newHero.EquipID = hero.EquipID
hero = newHero
return this.modifyHeroData(newHero.Uid, newHero.Id, update)
this.modifyHeroData(newHero.Uid, newHero.Id, update)
return
} else {
update["equipID"] = hero.EquipID
}
return this.modifyHeroData(hero.Uid, hero.Id, update)
this.modifyHeroData(hero.Uid, hero.Id, update)
return
}
//合并属性即属性值累加

View File

@ -64,9 +64,17 @@ func (this *Hero) UpdateEquipment(session comm.IUserSession, hero *pb.DBHero, eq
return
}
if err := this.modelHero.setEquipment(hero); err != nil {
if newHero, err := this.modelHero.setEquipment(hero); err != nil {
code = pb.ErrorCode_HeroEquipUpdate
return
} else {
list := make([]*pb.DBHero, 0)
if newHero != nil {
list = append(list, newHero)
}
list = append(list, hero)
session.SendMsg("hero", "change", &pb.HeroChangePush{List: list})
}
this.modelHero.setEquipProperty(hero, equip)
@ -75,6 +83,7 @@ func (this *Hero) UpdateEquipment(session comm.IUserSession, hero *pb.DBHero, eq
code = pb.ErrorCode_Unknown
this.Errorf("PushHeroProperty err!")
}
return
}

View File

@ -29,6 +29,11 @@ func (this *apiComp) Initdata(session comm.IUserSession, req *pb.UserInitdataReq
}
}()
if !this.module.modelSetting.checkInitCount(session.GetUserId()) {
code = pb.ErrorCode_UserResetData
return
}
if vc, ok := this.module.modelSetting.checkVeriCode(session.GetUserId()); ok {
if vc != req.Code {
code = pb.ErrorCode_VeriCodeNoValid

View File

@ -61,6 +61,33 @@ func (this *ModelSetting) UpdateSetting(uid string, data map[string]interface{})
return this.moduleUser.modelSetting.Change(uid, data)
}
//校验时间和初始次数
func (this *ModelSetting) checkInitCount(uid string) bool {
ue, err := this.moduleUser.modelSetting.GetUserExpand(uid)
if err != nil {
return false
}
if ue != nil {
//验证时间
tt := time.Unix(ue.LastInitdataTime, 0)
if !time.Now().After(tt) {
return false
}
//判断上次初始的时间
if utils.IsToday(ue.LastInitdataTime) {
if ue.InitdataCount >= 3 {
return false
}
ue.InitdataCount++
} else {
}
}
return false
}
//验证码
func (this *ModelSetting) checkVeriCode(uid string) (int32, bool) {
key := fmt.Sprintf("code:%s", uid)

View File

@ -52,6 +52,7 @@ const (
ErrorCode_NameExist ErrorCode = 1006 //昵称已存在
ErrorCode_VeriCodeNoValid ErrorCode = 1007 //验证码无效
ErrorCode_VeriCodeExpired ErrorCode = 1008 //验证码过期
ErrorCode_UserResetData ErrorCode = 1009 //初始化用户失败
// friend
ErrorCode_FriendNotSelf ErrorCode = 1100 //不能是自己
ErrorCode_FriendSelfMax ErrorCode = 1101 //超出好友最大数量
@ -142,6 +143,7 @@ var (
1006: "NameExist",
1007: "VeriCodeNoValid",
1008: "VeriCodeExpired",
1009: "UserResetData",
1100: "FriendNotSelf",
1101: "FriendSelfMax",
1102: "FriendTargetMax",
@ -223,6 +225,7 @@ var (
"NameExist": 1006,
"VeriCodeNoValid": 1007,
"VeriCodeExpired": 1008,
"UserResetData": 1009,
"FriendNotSelf": 1100,
"FriendSelfMax": 1101,
"FriendTargetMax": 1102,
@ -308,7 +311,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xec, 0x0c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0x80, 0x0d, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -343,75 +346,77 @@ var file_errorcode_proto_rawDesc = []byte{
0x07, 0x12, 0x14, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x56,
0x61, 0x6c, 0x69, 0x64, 0x10, 0xef, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x43,
0x6f, 0x64, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0xf0, 0x07, 0x12, 0x12, 0x0a,
0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x10, 0xcc,
0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4d,
0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54,
0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x10, 0xce, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10,
0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67,
0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xd0, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x74, 0x10, 0xd1, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x59, 0x65, 0x74, 0x10, 0xd2, 0x08,
0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x42, 0x6c,
0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd3, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x46, 0x72, 0x69,
0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65,
0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70,
0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd5, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x10, 0xd6, 0x08,
0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xd7, 0x08, 0x12, 0x12, 0x0a, 0x0d,
0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09,
0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64,
0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12,
0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65,
0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a, 0x0c,
0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a, 0x12,
0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a, 0x12,
0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74,
0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c, 0x6f, 0x72,
0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b,
0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48,
0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9a,
0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e,
0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f,
0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c, 0x0a,
0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79,
0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69,
0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65,
0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12, 0x0f,
0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a, 0x12,
0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10,
0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79,
0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f,
0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65,
0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a, 0x0e,
0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa6,
0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78, 0x45,
0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61,
0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72,
0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, 0x0a, 0x12, 0x1e, 0x0a,
0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e,
0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a,
0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69,
0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68,
0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e,
0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12,
0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e,
0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f,
0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12,
0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10,
0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65,
0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41,
0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12,
0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65,
0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a,
0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x0d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x10, 0xf1,
0x07, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x53, 0x65,
0x6c, 0x66, 0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53,
0x65, 0x6c, 0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x46, 0x72, 0x69,
0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x10, 0xce, 0x08, 0x12,
0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4e, 0x6f, 0x44,
0x61, 0x74, 0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xd0, 0x08, 0x12,
0x0e, 0x0a, 0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x74, 0x10, 0xd1, 0x08, 0x12,
0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x59, 0x65,
0x74, 0x10, 0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65,
0x6c, 0x66, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd3, 0x08, 0x12, 0x19, 0x0a,
0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x6c, 0x61,
0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65,
0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd5, 0x08, 0x12,
0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4d, 0x61,
0x78, 0x10, 0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65,
0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xd7, 0x08,
0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67,
0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46,
0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49,
0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72,
0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x10,
0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a,
0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68,
0x10, 0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76,
0x10, 0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43,
0x72, 0x65, 0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43,
0x6f, 0x6c, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65,
0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12,
0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61,
0x74, 0x65, 0x10, 0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52,
0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65,
0x72, 0x6f, 0x4e, 0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74,
0x65, 0x10, 0x9c, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e,
0x65, 0x72, 0x67, 0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f,
0x45, 0x71, 0x75, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12,
0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10,
0xa0, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b,
0x10, 0xa1, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f,
0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b,
0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10,
0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a,
0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45,
0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64,
0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72,
0x6f, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a,
0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9,
0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e,
0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8,
0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76,
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12,
0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69,
0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10,
0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64,
0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10,
0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10,
0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65,
0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63,
0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54,
0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64,
0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76,
0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e,
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7,
0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
0x64, 0x10, 0xc8, 0x0c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -1632,6 +1632,54 @@ func (x *HeroDrawCardResp) GetHeroes() []int32 {
return nil
}
// 英雄变化推送
type HeroChangePush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
List []*DBHero `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
}
func (x *HeroChangePush) Reset() {
*x = HeroChangePush{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroChangePush) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroChangePush) ProtoMessage() {}
func (x *HeroChangePush) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HeroChangePush.ProtoReflect.Descriptor instead.
func (*HeroChangePush) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{31}
}
func (x *HeroChangePush) GetList() []*DBHero {
if x != nil {
return x.List
}
return nil
}
var File_hero_hero_msg_proto protoreflect.FileDescriptor
var file_hero_hero_msg_proto_rawDesc = []byte{
@ -1787,8 +1835,11 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2a,
0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65,
0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65,
0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x04,
0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48,
0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1803,7 +1854,7 @@ func file_hero_hero_msg_proto_rawDescGZIP() []byte {
return file_hero_hero_msg_proto_rawDescData
}
var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 36)
var file_hero_hero_msg_proto_goTypes = []interface{}{
(*HeroInfoReq)(nil), // 0: HeroInfoReq
(*HeroInfoResp)(nil), // 1: HeroInfoResp
@ -1836,38 +1887,40 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{
(*HeroDelHeroPush)(nil), // 28: HeroDelHeroPush
(*HeroDrawCardReq)(nil), // 29: HeroDrawCardReq
(*HeroDrawCardResp)(nil), // 30: HeroDrawCardResp
nil, // 31: HeroStrengthenUplvReq.ExpCardsEntry
nil, // 32: HeroPropertyPush.PropertyEntry
nil, // 33: HeroPropertyPush.AddPropertyEntry
nil, // 34: HeroDelHeroPush.HerosEntry
(*DBHero)(nil), // 35: DBHero
(*HeroChangePush)(nil), // 31: HeroChangePush
nil, // 32: HeroStrengthenUplvReq.ExpCardsEntry
nil, // 33: HeroPropertyPush.PropertyEntry
nil, // 34: HeroPropertyPush.AddPropertyEntry
nil, // 35: HeroDelHeroPush.HerosEntry
(*DBHero)(nil), // 36: DBHero
}
var file_hero_hero_msg_proto_depIdxs = []int32{
35, // 0: HeroInfoResp.base:type_name -> DBHero
35, // 1: HeroListResp.list:type_name -> DBHero
31, // 2: HeroStrengthenUplvReq.expCards:type_name -> HeroStrengthenUplvReq.ExpCardsEntry
35, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
36, // 0: HeroInfoResp.base:type_name -> DBHero
36, // 1: HeroListResp.list:type_name -> DBHero
32, // 2: HeroStrengthenUplvReq.expCards:type_name -> HeroStrengthenUplvReq.ExpCardsEntry
36, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
7, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData
7, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData
35, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero
35, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
35, // 8: HeroResonanceResp.hero:type_name -> DBHero
35, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero
35, // 10: HeroResonanceResetResp.hero:type_name -> DBHero
35, // 11: HeroResonanceUseEnergyResp.hero:type_name -> DBHero
35, // 12: HeroAwakenResp.hero:type_name -> DBHero
35, // 13: HeroChoukaResp.heroes:type_name -> DBHero
32, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
33, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
35, // 16: HeroLockResp.hero:type_name -> DBHero
35, // 17: HeroAddNewHeroPush.hero:type_name -> DBHero
35, // 18: HeroGetSpecifiedResp.hero:type_name -> DBHero
34, // 19: HeroDelHeroPush.heros:type_name -> HeroDelHeroPush.HerosEntry
20, // [20:20] is the sub-list for method output_type
20, // [20:20] is the sub-list for method input_type
20, // [20:20] is the sub-list for extension type_name
20, // [20:20] is the sub-list for extension extendee
0, // [0:20] is the sub-list for field type_name
36, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero
36, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
36, // 8: HeroResonanceResp.hero:type_name -> DBHero
36, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero
36, // 10: HeroResonanceResetResp.hero:type_name -> DBHero
36, // 11: HeroResonanceUseEnergyResp.hero:type_name -> DBHero
36, // 12: HeroAwakenResp.hero:type_name -> DBHero
36, // 13: HeroChoukaResp.heroes:type_name -> DBHero
33, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
34, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
36, // 16: HeroLockResp.hero:type_name -> DBHero
36, // 17: HeroAddNewHeroPush.hero:type_name -> DBHero
36, // 18: HeroGetSpecifiedResp.hero:type_name -> DBHero
35, // 19: HeroDelHeroPush.heros:type_name -> HeroDelHeroPush.HerosEntry
36, // 20: HeroChangePush.list:type_name -> DBHero
21, // [21:21] is the sub-list for method output_type
21, // [21:21] is the sub-list for method input_type
21, // [21:21] is the sub-list for extension type_name
21, // [21:21] is the sub-list for extension extendee
0, // [0:21] is the sub-list for field type_name
}
func init() { file_hero_hero_msg_proto_init() }
@ -2249,6 +2302,18 @@ func file_hero_hero_msg_proto_init() {
return nil
}
}
file_hero_hero_msg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroChangePush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -2256,7 +2321,7 @@ func file_hero_hero_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hero_hero_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 35,
NumMessages: 36,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -32,6 +32,7 @@ enum ErrorCode {
NameExist = 1006; //
VeriCodeNoValid = 1007; //
VeriCodeExpired = 1008; //
UserResetData = 1009; //
// friend
FriendNotSelf = 1100; //

View File

@ -152,4 +152,9 @@ message HeroDrawCardReq {
message HeroDrawCardResp {
repeated int32 heroes = 1; // configID
}
//
message HeroChangePush{
repeated DBHero list = 1;
}

View File

@ -4,11 +4,13 @@ import (
"fmt"
"go_dreamfactory/utils"
"testing"
"time"
)
func TestIsToday(t *testing.T) {
fmt.Println(utils.IsToday(1657163870))
// fmt.Println(utils.IsToday(0))
tt := time.Unix(1658139742, 0)
fmt.Println(time.Now().Before(tt))
}
func TestSubTime(t *testing.T) {