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, 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)