From 75afa263c849edc26005111c84b307553b465c38 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Jul 2023 18:41:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?#27827=20=E7=BB=B4=E4=BA=AC=E8=BF=9C?= =?UTF-8?q?=E5=BE=81=EF=BC=8C=E4=B8=9B=E6=9E=97=E7=8B=A9=E7=8C=8E=E9=83=BD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hunting/api_challengeover.go | 6 +++--- modules/viking/api_challengeover.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/hunting/api_challengeover.go b/modules/hunting/api_challengeover.go index 11b0849d5..7c32f641a 100644 --- a/modules/hunting/api_challengeover.go +++ b/modules/hunting/api_challengeover.go @@ -94,8 +94,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 } @@ -108,7 +108,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/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 1d450fcf6..febaac284 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -97,14 +97,14 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal key := strconv.Itoa(int(req.BossId)) + "_" + strconv.Itoa(int(req.Difficulty)) if viking.BossTime[key] == 0 { // 新关卡挑战通过 发放首通奖励 - viking.BossTime[key] = req.Report.Costtime - mapData["bossTime"] = viking.BossTime // 更新时间 + //viking.BossTime[key] = req.Report.Costtime + //mapData["bossTime"] = viking.BossTime // 更新时间 if errdata = this.module.DispenseRes(session, vikingCfg.Firstprize, true); errdata != nil { return } } - if viking.BossTime[key] > req.Report.Costtime { + if viking.BossTime[key] == 0 || viking.BossTime[key] > req.Report.Costtime { viking.BossTime[key] = req.Report.Costtime mapData["bossTime"] = viking.BossTime // 更新时间 this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, req.Report) From 8719e1c357d775cfdd2d521d610ceadb5b5c1ef3 Mon Sep 17 00:00:00 2001 From: liwei Date: Tue, 11 Jul 2023 09:36:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?#27819=20=E5=A5=BD=E5=8F=8B=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95BUG=20=E5=90=8C=E6=AD=A5=E7=89=88=E7=BD=B2?= =?UTF-8?q?=E6=9C=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_addblack.go | 4 +++- modules/friend/api_cross_agree.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/friend/api_cross_addblack.go b/modules/friend/api_cross_addblack.go index 2f9e1f35d..6d463bab7 100644 --- a/modules/friend/api_cross_addblack.go +++ b/modules/friend/api_cross_addblack.go @@ -89,11 +89,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 a8c99520a..0a75ecca3 100644 --- a/modules/friend/api_cross_agree.go +++ b/modules/friend/api_cross_agree.go @@ -109,6 +109,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,