From bd70b4a435c00fb84920f42245b80bfc15d15870 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Jul 2023 18:39:33 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=95=86=E9=98=9F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_bubblegroup.json | 12 ++++++ bin/json/game_caravancity.json | 5 +++ bin/json/game_caravanreward.json | 30 ++++++------- bin/json/game_global.json | 4 +- bin/json/game_item.json | 24 +++++------ bin/json/game_skillafteratk.json | 2 +- bin/json/game_skillatk.json | 6 +-- bin/json/game_skillbuff.json | 2 +- modules/caravan/comp_configure.go | 13 ++++++ modules/caravan/module.go | 43 ++++++++----------- modules/hunting/api_challengeover.go | 6 +-- modules/pagoda/comp_configure.go | 2 - sys/configure/structs/Game.CaravanCityData.go | 2 + .../structs/Game.CaravanRewardData.go | 4 -- sys/configure/structs/game.globalData.go | 4 ++ 15 files changed, 93 insertions(+), 66 deletions(-) diff --git a/bin/json/game_bubblegroup.json b/bin/json/game_bubblegroup.json index ab00a17e5..c70e18aa7 100644 --- a/bin/json/game_bubblegroup.json +++ b/bin/json/game_bubblegroup.json @@ -778,5 +778,17 @@ "key": "bubblegroup_bubblegroup_Text_Bubble_65", "text": "玩家购买成功语录" } + }, + { + "KeyId": 66, + "GroupID": 11005, + "Type": 2, + "TaskIDMin": 0, + "TaskIDMax": 0, + "weight": 10, + "Text_Bubble": { + "key": "bubblegroup_bubblegroup_Text_Bubble_66", + "text": "你的背包装不下啦,卖掉一些再来购买吧。" + } } ] \ No newline at end of file diff --git a/bin/json/game_caravancity.json b/bin/json/game_caravancity.json index 2e423bf2c..97cecf142 100644 --- a/bin/json/game_caravancity.json +++ b/bin/json/game_caravancity.json @@ -49,6 +49,7 @@ "ortalk": 11002, "sptalk": 11003, "buytalk": 11004, + "weitalk": 11005, "cityeventpro": 50000, "cityevent": 1 }, @@ -102,6 +103,7 @@ "ortalk": 11002, "sptalk": 11003, "buytalk": 11004, + "weitalk": 11005, "cityeventpro": 100000, "cityevent": 1 }, @@ -156,6 +158,7 @@ "ortalk": 11002, "sptalk": 11003, "buytalk": 11004, + "weitalk": 11005, "cityeventpro": 50000, "cityevent": 1 }, @@ -210,6 +213,7 @@ "ortalk": 11002, "sptalk": 11003, "buytalk": 11004, + "weitalk": 11005, "cityeventpro": 100000, "cityevent": 1 }, @@ -263,6 +267,7 @@ "ortalk": 11002, "sptalk": 11003, "buytalk": 11004, + "weitalk": 11005, "cityeventpro": 50000, "cityevent": 1 } diff --git a/bin/json/game_caravanreward.json b/bin/json/game_caravanreward.json index dc87432e0..23ab5787d 100644 --- a/bin/json/game_caravanreward.json +++ b/bin/json/game_caravanreward.json @@ -1,8 +1,6 @@ [ { - "key": 1, - "moneystart": -1, - "moneyend": 10000, + "key": 1000, "reward": [ { "a": "attr", @@ -12,9 +10,7 @@ ] }, { - "key": 2, - "moneystart": 10000, - "moneyend": 20000, + "key": 2000, "reward": [ { "a": "attr", @@ -24,9 +20,7 @@ ] }, { - "key": 3, - "moneystart": 20000, - "moneyend": 30000, + "key": 3000, "reward": [ { "a": "attr", @@ -36,9 +30,7 @@ ] }, { - "key": 4, - "moneystart": 30000, - "moneyend": 50000, + "key": 4000, "reward": [ { "a": "attr", @@ -48,9 +40,7 @@ ] }, { - "key": 5, - "moneystart": 50000, - "moneyend": -1, + "key": 5000, "reward": [ { "a": "attr", @@ -58,5 +48,15 @@ "n": 9999 } ] + }, + { + "key": 0, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 10 + } + ] } ] \ No newline at end of file diff --git a/bin/json/game_global.json b/bin/json/game_global.json index f33db7c1a..5d23aa749 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -705,6 +705,7 @@ "business_bag": 20, "business_rewardday": 1, "business_renovatething": 180, + "business_change": 0.5, "favorability_likes": 1500, "favorability_dislikes": 500, "buzkashi_time": 180, @@ -787,6 +788,7 @@ "a": "item", "t": "10000035", "n": 0 - } + }, + "passlvmax": 50 } ] \ No newline at end of file diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 3d695c5c2..08c1dd5db 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -9664,7 +9664,7 @@ "img": "item_15000101", "intr": { "key": "item_item_intr_251", - "text": "狩猎头目的初级掉落物,可用于守护者回响。" + "text": "狩猎头目的初级掉落物,可用于真诚阵营守护者回响。" }, "sale": [ { @@ -9715,7 +9715,7 @@ "img": "item_15000102", "intr": { "key": "item_item_intr_252", - "text": "狩猎头目的初级掉落物,可用于守护者回响。" + "text": "狩猎头目的初级掉落物,可用于直觉阵营守护者回响。" }, "sale": [ { @@ -9766,7 +9766,7 @@ "img": "item_15000103", "intr": { "key": "item_item_intr_253", - "text": "狩猎头目的初级掉落物,可用于守护者回响。" + "text": "狩猎头目的初级掉落物,可用于共情阵营守护者回响。" }, "sale": [ { @@ -9817,7 +9817,7 @@ "img": "item_15000104", "intr": { "key": "item_item_intr_254", - "text": "狩猎头目的初级掉落物,可用于守护者回响。" + "text": "狩猎头目的初级掉落物,可用于责任阵营守护者回响。" }, "sale": [ { @@ -9880,7 +9880,7 @@ "img": "item_15000201", "intr": { "key": "item_item_intr_255", - "text": "狩猎头目的中级掉落物,可用于守护者回响。" + "text": "狩猎头目的中级掉落物,可用于真诚阵营守护者回响。" }, "sale": [ { @@ -9943,7 +9943,7 @@ "img": "item_15000202", "intr": { "key": "item_item_intr_256", - "text": "狩猎头目的中级掉落物,可用于守护者回响。" + "text": "狩猎头目的中级掉落物,可用于直觉阵营守护者回响。" }, "sale": [ { @@ -10006,7 +10006,7 @@ "img": "item_15000203", "intr": { "key": "item_item_intr_257", - "text": "狩猎头目的中级掉落物,可用于守护者回响。" + "text": "狩猎头目的中级掉落物,可用于共情阵营守护者回响。" }, "sale": [ { @@ -10069,7 +10069,7 @@ "img": "item_15000204", "intr": { "key": "item_item_intr_258", - "text": "狩猎头目的中级掉落物,可用于守护者回响。" + "text": "狩猎头目的中级掉落物,可用于责任阵营守护者回响。" }, "sale": [ { @@ -10120,7 +10120,7 @@ "img": "item_15000301", "intr": { "key": "item_item_intr_259", - "text": "狩猎头目的高级掉落物,可用于守护者回响。" + "text": "狩猎头目的高级掉落物,可用于真诚阵营守护者回响。" }, "sale": [ { @@ -10171,7 +10171,7 @@ "img": "item_15000302", "intr": { "key": "item_item_intr_260", - "text": "狩猎头目的高级掉落物,可用于守护者回响。" + "text": "狩猎头目的高级掉落物,可用于直觉阵营守护者回响。" }, "sale": [ { @@ -10222,7 +10222,7 @@ "img": "item_15000303", "intr": { "key": "item_item_intr_261", - "text": "狩猎头目的高级掉落物,可用于守护者回响。" + "text": "狩猎头目的高级掉落物,可用于共情阵营守护者回响。" }, "sale": [ { @@ -10273,7 +10273,7 @@ "img": "item_15000304", "intr": { "key": "item_item_intr_262", - "text": "狩猎头目的高级掉落物,可用于守护者回响。" + "text": "狩猎头目的高级掉落物,可用于责任阵营守护者回响。" }, "sale": [ { diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index 060f1e3f2..6cce6095e 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -13483,7 +13483,7 @@ "Type": 3, "Argu": [ 390001007, - 1000, + 500, 1, 2 ], diff --git a/bin/json/game_skillatk.json b/bin/json/game_skillatk.json index 724f2febb..195657863 100644 --- a/bin/json/game_skillatk.json +++ b/bin/json/game_skillatk.json @@ -9569,7 +9569,7 @@ }, "Desc": { "key": "skill_skill_atk_Desc_135005211_1", - "text": "幸运·普雷斯科特对敌方目标造成350%伤害。" + "text": "幸运·普雷斯科特对敌方目标造成350%伤害。50%的概率为目标附加2回合[color=#e5621b]防御下降[/color]。" }, "buffid": [], "map": "" @@ -12686,7 +12686,7 @@ }, "Desc": { "key": "skill_skill_atk_Desc_143002211_1", - "text": "果酱教授每次攻击可减少目标15%行动值。" + "text": "果酱教授每次攻击可减少目标15%行动值。目标行动值低于30%时,附加1回合[color=#e5621b]石化[/color] 。" }, "buffid": [ 390001108 @@ -16604,7 +16604,7 @@ }, "Desc": { "key": "skill_skill_atk_Desc_134007111_1", - "text": "菲奥娜对敌方1个目标造成2次攻击力750%的伤害,若发生暴击,则为自身附加1回合[color=#37d8a9]免疫[/color]状态。" + "text": "菲奥娜对敌方1个目标造成2次攻击力75%的伤害,若发生暴击,则为自身附加1回合[color=#37d8a9]免疫[/color]状态。" }, "buffid": [ 390001111 diff --git a/bin/json/game_skillbuff.json b/bin/json/game_skillbuff.json index d32027c01..9d583b0ee 100644 --- a/bin/json/game_skillbuff.json +++ b/bin/json/game_skillbuff.json @@ -4128,7 +4128,7 @@ }, "Desc": { "key": "skill_skill_buff_Desc_390001452", - "text": "喜悦" + "text": "全体友方受到伤害降低25%,效果期间自身无法行动。" }, "BuffType": 0, "EffectArgu": [], diff --git a/modules/caravan/comp_configure.go b/modules/caravan/comp_configure.go index bcf911bf1..71a01dc68 100644 --- a/modules/caravan/comp_configure.go +++ b/modules/caravan/comp_configure.go @@ -208,6 +208,19 @@ func (this *configureComp) GetCaravanReward() (reward []*cfg.GameCaravanRewardDa return } +func (this *configureComp) GetCaravanMoreReward() (reward []*cfg.Gameatn) { + if v, err := this.GetConfigure(game_caravan_reward); err == nil { + if configure, ok := v.(*cfg.GameCaravanReward); ok { + if configure.Get(0) != nil { + return configure.Get(0).Reward + } + } + } else { + log.Errorf("get GetCaravanInitCity conf err:%v", err) + } + return +} + func (this *configureComp) GetCaravanRank(index int32) (reward *cfg.GameCaravanRankData, err error) { var ( v interface{} diff --git a/modules/caravan/module.go b/modules/caravan/module.go index f643c750c..0e5f3389c 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -388,6 +388,13 @@ func (this *Caravan) Rpc_ModuleCaravanSettlement(ctx context.Context, args *pb.E } } } + var maxKey int32 + for _, v := range this.configure.GetCaravanReward() { + if v.Key > maxKey { + maxKey = v.Key + } + } + moreReard := this.configure.GetCaravanMoreReward() // 超过部分 // 发送虚拟币奖励 if _data, err := this.modelCaravan.DB.Find(comm.TableUser, bson.M{"merchantmoney": bson.M{"$gt": comm.CaravanMerchantmoney}}); err == nil { for _data.Next(context.TODO()) { @@ -395,32 +402,20 @@ func (this *Caravan) Rpc_ModuleCaravanSettlement(ctx context.Context, args *pb.E if err = _data.Decode(temp); err == nil { - for _, v := range this.configure.GetCaravanReward() { - s := v.Moneystart - e := v.Moneyend - more := false - if e == -1 { - e = math.MaxInt32 - more = true - } - - if s < temp.Merchantmoney && e <= temp.Merchantmoney { - var res []*cfg.Gameatn - if more { // 超过的部分 - r := this.ModuleTools.GetGlobalConf().BusinessMaxintReward - m := this.ModuleTools.GetGlobalConf().BusinessMaxint - n := (temp.Merchantmoney - s) / m - atn := &cfg.Gameatn{ - A: r.A, - T: r.T, - N: r.N * n, - } - res = append(res, atn) + if maxKey <= temp.Merchantmoney { + var res []*cfg.Gameatn + for _, v := range moreReard { + if v.N == 0 { + continue } - res = append(res, v.Reward...) - this.mail.SendMailByUID(temp.Uid, "CaravanRewards", v.Reward, []string{}) + atn := &cfg.Gameatn{ + A: v.A, + T: v.T, + N: v.N * (temp.Merchantmoney - maxKey), + } + res = append(res, atn) } - + this.mail.SendMailByUID(temp.Uid, "CaravanRewards", res, []string{}) } } } diff --git a/modules/hunting/api_challengeover.go b/modules/hunting/api_challengeover.go index 980182fec..ebf3360bb 100644 --- a/modules/hunting/api_challengeover.go +++ b/modules/hunting/api_challengeover.go @@ -96,8 +96,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha key := strconv.Itoa(int(req.BossType)) + "_" + strconv.Itoa(int(req.Difficulty)) if hunting.BossTime[key] == 0 { // 新关卡挑战通过 发放首通奖励 - hunting.BossTime[key] = req.Report.Costtime - mapData["bossTime"] = hunting.BossTime + //hunting.BossTime[key] = req.Report.Costtime + //mapData["bossTime"] = hunting.BossTime if errdata = this.module.DispenseRes(session, cfgHunting.Firstprize, true); errdata != nil { return } @@ -110,7 +110,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha } } // 耗时校验 当前战斗胜利时间消耗小于之前刷新数据 - if hunting.BossTime[key] > req.Report.Costtime { + if hunting.BossTime[key] == 0 || hunting.BossTime[key] > req.Report.Costtime { hunting.BossTime[key] = req.Report.Costtime mapData["bossTime"] = hunting.BossTime // 更新时间 this.module.CheckRank(session.GetUserId(), req.BossType, req.Difficulty, req.Report) diff --git a/modules/pagoda/comp_configure.go b/modules/pagoda/comp_configure.go index 6d972b46a..399198360 100644 --- a/modules/pagoda/comp_configure.go +++ b/modules/pagoda/comp_configure.go @@ -46,8 +46,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp configure.RegisterConfigure(game_pagoda, cfg.NewGamePagoda, this.LoadPagoda) configure.RegisterConfigure(game_circulate, cfg.NewGameCirculate, this.LoadCirculate) - this.GetPagodaRaceConfById(11000027) - this.GetPagodaCirculateConf(0, 25) return } diff --git a/sys/configure/structs/Game.CaravanCityData.go b/sys/configure/structs/Game.CaravanCityData.go index 3f328da7f..7e38af3f2 100644 --- a/sys/configure/structs/Game.CaravanCityData.go +++ b/sys/configure/structs/Game.CaravanCityData.go @@ -33,6 +33,7 @@ type GameCaravanCityData struct { Ortalk int32 Sptalk int32 Buytalk int32 + Weitalk int32 Cityeventpro int32 Cityevent int32 } @@ -131,6 +132,7 @@ func (_v *GameCaravanCityData)Deserialize(_buf map[string]interface{}) (err erro { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ortalk"].(float64); !_ok_ { err = errors.New("ortalk error"); return }; _v.Ortalk = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["sptalk"].(float64); !_ok_ { err = errors.New("sptalk error"); return }; _v.Sptalk = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buytalk"].(float64); !_ok_ { err = errors.New("buytalk error"); return }; _v.Buytalk = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weitalk"].(float64); !_ok_ { err = errors.New("weitalk error"); return }; _v.Weitalk = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cityeventpro"].(float64); !_ok_ { err = errors.New("cityeventpro error"); return }; _v.Cityeventpro = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cityevent"].(float64); !_ok_ { err = errors.New("cityevent error"); return }; _v.Cityevent = int32(_tempNum_) } return diff --git a/sys/configure/structs/Game.CaravanRewardData.go b/sys/configure/structs/Game.CaravanRewardData.go index 823614bda..fb5b56e7f 100644 --- a/sys/configure/structs/Game.CaravanRewardData.go +++ b/sys/configure/structs/Game.CaravanRewardData.go @@ -12,8 +12,6 @@ import "errors" type GameCaravanRewardData struct { Key int32 - Moneystart int32 - Moneyend int32 Reward []*Gameatn } @@ -25,8 +23,6 @@ func (*GameCaravanRewardData) GetTypeId() int32 { func (_v *GameCaravanRewardData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["moneystart"].(float64); !_ok_ { err = errors.New("moneystart error"); return }; _v.Moneystart = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["moneyend"].(float64); !_ok_ { err = errors.New("moneyend error"); return }; _v.Moneyend = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 70c3b8d01..da2fc5b9b 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -213,6 +213,7 @@ type GameGlobalData struct { BusinessBag int32 BusinessRewardday int32 BusinessRenovatething int32 + BusinessChange float32 FavorabilityLikes int32 FavorabilityDislikes int32 BuzkashiTime int32 @@ -240,6 +241,7 @@ type GameGlobalData struct { MrylReward []*Gameatn OverexpReward *Gameatn Voucher *Gameatn + Passlvmax int32 } const TypeId_GameGlobalData = 477542761 @@ -880,6 +882,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_bag"].(float64); !_ok_ { err = errors.New("business_bag error"); return }; _v.BusinessBag = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_rewardday"].(float64); !_ok_ { err = errors.New("business_rewardday error"); return }; _v.BusinessRewardday = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_renovatething"].(float64); !_ok_ { err = errors.New("business_renovatething error"); return }; _v.BusinessRenovatething = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_change"].(float64); !_ok_ { err = errors.New("business_change error"); return }; _v.BusinessChange = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favorability_likes"].(float64); !_ok_ { err = errors.New("favorability_likes error"); return }; _v.FavorabilityLikes = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favorability_dislikes"].(float64); !_ok_ { err = errors.New("favorability_dislikes error"); return }; _v.FavorabilityDislikes = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_time"].(float64); !_ok_ { err = errors.New("buzkashi_time error"); return }; _v.BuzkashiTime = int32(_tempNum_) } @@ -985,6 +988,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["overexp_reward"].(map[string]interface{}); !_ok_ { err = errors.New("overexp_reward error"); return }; if _v.OverexpReward, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["voucher"].(map[string]interface{}); !_ok_ { err = errors.New("voucher error"); return }; if _v.Voucher, err = DeserializeGameatn(_x_); err != nil { return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["passlvmax"].(float64); !_ok_ { err = errors.New("passlvmax error"); return }; _v.Passlvmax = int32(_tempNum_) } return } From adced06a7aca41ac2f8f4f85a448f5ba8d035dd1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Jul 2023 19:44:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?#27819=20=E5=A5=BD=E5=8F=8B=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_addblack.go | 3 +++ modules/friend/api_cross_agree.go | 1 + 2 files changed, 4 insertions(+) diff --git a/modules/friend/api_cross_addblack.go b/modules/friend/api_cross_addblack.go index 2f9e1f35d..56aa2ddcb 100644 --- a/modules/friend/api_cross_addblack.go +++ b/modules/friend/api_cross_addblack.go @@ -90,10 +90,13 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR // 将目标从好友列表中移除 friendIds := utils.Deletex(self.FriendIds, req.FriendId) + // 将好友从申请列表移除 + applyIds := utils.Deletex(self.ApplyIds, req.FriendId) //更新 err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{ "blackIds": self.BlackIds, "friendIds": friendIds, + "applyIds": applyIds, }) if err != nil { errdata = &pb.ErrorData{ diff --git a/modules/friend/api_cross_agree.go b/modules/friend/api_cross_agree.go index a29fdbb42..004fffd42 100644 --- a/modules/friend/api_cross_agree.go +++ b/modules/friend/api_cross_agree.go @@ -110,6 +110,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e } if err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{ "friendIds": target.FriendIds, + "applyIds": target.ApplyIds, }); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, From 7130c5141f486c169abd5bbd1eafc096810f3654 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Jul 2023 21:16:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B5=9B=E5=AD=A3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/viking/api_seasonrank.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/viking/api_seasonrank.go b/modules/viking/api_seasonrank.go index 83486a1f5..766ae707b 100644 --- a/modules/viking/api_seasonrank.go +++ b/modules/viking/api_seasonrank.go @@ -55,7 +55,7 @@ func (this *apiComp) SeasonRank(session comm.IUserSession, req *pb.VikingSeasonR } } - dbModel := db.NewDBModel(comm.TableVikingRank, 0, conn) + dbModel := db.NewDBModel(comm.TableVikingSRank, 0, conn) pipe = conn.Redis.RedisPipe(context.TODO()) rd = pipe.ZRevRange("vSeasonRank"+strconv.Itoa(int(req.BoosType)), 0, comm.MaxRankList) From e5c7e05cb56baaaa7461dfaa1f82d00fd466c979 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Jul 2023 21:24:24 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B5=9B=E5=AD=A3=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/viking/module.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/viking/module.go b/modules/viking/module.go index f6e0c5294..6cc725cd2 100644 --- a/modules/viking/module.go +++ b/modules/viking/module.go @@ -83,7 +83,7 @@ func (this *Viking) Start() (err error) { } this.battle = module.(comm.IBattle) - + this.CheckCurSeasonData() return } @@ -234,11 +234,13 @@ func (this *Viking) CompleteAllLevel(session comm.IUserSession) (errdata *pb.Err // 检查当前赛季是在本服还是在跨服 func (this *Viking) CheckCurSeasonData() (bLocal bool, endSeasonTime int64) { + var subTime int64 + var oneSeason int64 openTime := this.service.GetOpentime().Unix() this.Debugf("%d", openTime) // 获取第一个赛季结束的时间 - endSeasonTime = utils.GetTodayZeroTime(openTime) //+ int64((6-d)*3600*24) - this.Debugf("%d", endSeasonTime) + oneSeason = utils.GetTodayZeroTime(openTime) //+ int64((6-d)*3600*24) + this.Debugf("%d", oneSeason) var c int32 if Continued%Cycle == 0 { @@ -247,11 +249,18 @@ func (this *Viking) CheckCurSeasonData() (bLocal bool, endSeasonTime int64) { c = Continued/Cycle + 1 } + if configure.Now().Unix() > oneSeason { + subTime = configure.Now().Unix() - oneSeason + subTime = subTime/(14*3600*24) + 1 + } // 只需判断当前时间是否大于第c个赛季即可 + endSeasonTime = oneSeason endSeasonTime += 14 * 3600 * 24 * int64(c) if endSeasonTime <= configure.Now().Unix() { + endSeasonTime = oneSeason + subTime*14*3600*24 return false, endSeasonTime } + endSeasonTime = oneSeason + subTime*14*3600*24 return true, endSeasonTime } From 2919cbb3a4f91eb44de55a714fb29e2647228d14 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 11 Jul 2023 10:05:48 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=88=98=E6=96=97=E8=83=9C=E5=88=A9buf=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pagoda/api_racechallenge.go | 4 ++-- modules/pagoda/api_racechallengeover.go | 3 +-- pb/pagoda_db.pb.go | 18 +++++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/modules/pagoda/api_racechallenge.go b/modules/pagoda/api_racechallenge.go index c07b0f564..b7c9e8235 100644 --- a/modules/pagoda/api_racechallenge.go +++ b/modules/pagoda/api_racechallenge.go @@ -69,8 +69,8 @@ func (this *apiComp) CallengeRace(session comm.IUserSession, req *pb.PagodaChall if _, ok := pagoda.Race[conf.Restriction]; !ok { if conf.Floors == 1 { pagoda.Race[conf.Restriction] = &pb.RaceData{ - Race: conf.Restriction, - Buf: []int32{}, + Race: conf.Restriction, + Rtime: configure.Now().Unix(), Defeat: 0, Endtime: 0, diff --git a/modules/pagoda/api_racechallengeover.go b/modules/pagoda/api_racechallengeover.go index 6f5f0aaed..f9d16d6b8 100644 --- a/modules/pagoda/api_racechallengeover.go +++ b/modules/pagoda/api_racechallengeover.go @@ -74,7 +74,6 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda if conf.Floors == 1 { race.Race[conf.Restriction] = &pb.RaceData{ Race: conf.Restriction, - Buf: []int32{}, Rtime: configure.Now().Unix(), Defeat: 0, Endtime: 0, @@ -128,7 +127,7 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda } race.Race[conf.Restriction].Curfloor += 1 - + race.Race[conf.Restriction].Buf = conf.Gaineffect mapData["race"] = race.Race errdata = this.module.ModifyPagodaData(session.GetUserId(), mapData) diff --git a/pb/pagoda_db.pb.go b/pb/pagoda_db.pb.go index f8bbdcc15..86142298a 100644 --- a/pb/pagoda_db.pb.go +++ b/pb/pagoda_db.pb.go @@ -312,12 +312,12 @@ type RaceData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Race int32 `protobuf:"varint,1,opt,name=race,proto3" json:"race"` // 阵营ID 0:循环塔 1: 阵营1 - Buf []int32 `protobuf:"varint,2,rep,packed,name=buf,proto3" json:"buf"` - Rtime int64 `protobuf:"varint,3,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用 - Defeat int32 `protobuf:"varint,4,opt,name=defeat,proto3" json:"defeat"` // 今日战胜的次数 - Endtime int64 `protobuf:"varint,5,opt,name=endtime,proto3" json:"endtime"` //剩余倒计时 - Curfloor int32 `protobuf:"varint,6,opt,name=curfloor,proto3" json:"curfloor"` //当前层数 + Race int32 `protobuf:"varint,1,opt,name=race,proto3" json:"race"` // 阵营ID 0:循环塔 1: 阵营1 + Buf int32 `protobuf:"varint,2,opt,name=buf,proto3" json:"buf"` //赛季子技能buff + Rtime int64 `protobuf:"varint,3,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用 + Defeat int32 `protobuf:"varint,4,opt,name=defeat,proto3" json:"defeat"` // 今日战胜的次数 + Endtime int64 `protobuf:"varint,5,opt,name=endtime,proto3" json:"endtime"` //剩余倒计时 + Curfloor int32 `protobuf:"varint,6,opt,name=curfloor,proto3" json:"curfloor"` //当前层数 } func (x *RaceData) Reset() { @@ -359,11 +359,11 @@ func (x *RaceData) GetRace() int32 { return 0 } -func (x *RaceData) GetBuf() []int32 { +func (x *RaceData) GetBuf() int32 { if x != nil { return x.Buf } - return nil + return 0 } func (x *RaceData) GetRtime() int64 { @@ -450,7 +450,7 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x66, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69,