Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
fe4dbfe780
@ -40,6 +40,7 @@ type (
|
||||
CheckFriendCond(session IUserSession, num int32)
|
||||
// 查询opencond 配置
|
||||
CheckOpenCondCfgById(uid string, id string) (bOpen bool, errdata *pb.ErrorData)
|
||||
QueryOpenCondData(uid string) (data map[string]int32, errdata *pb.ErrorData) // 查询玩家当前已开启的功能
|
||||
}
|
||||
|
||||
//邮件业务模块对外接口定义 提供给其他模块使用的
|
||||
|
@ -172,3 +172,21 @@ func (this *ModuleSys) FriendCountChange(uid string, count int32) {
|
||||
}
|
||||
}
|
||||
}
|
||||
func (this *ModuleSys) QueryOpenCondData(uid string) (data map[string]int32, errdata *pb.ErrorData) {
|
||||
data = make(map[string]int32, 0)
|
||||
list, err := this.modelSys.GetOpenCondList(uid)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
for k, v := range list.Cond {
|
||||
if v == 2 { // 已经开启的功能
|
||||
data[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user