update
This commit is contained in:
parent
7b809c856d
commit
eed5cf07a0
@ -217,6 +217,8 @@ func (this *ModelHero) resetJuexingProperty(hero *pb.DBHero) {
|
||||
hero.JuexProperty[comm.Atk] += int32(value)
|
||||
case comm.Speed:
|
||||
hero.JuexProperty[comm.Speed] += int32(value)
|
||||
case comm.Cri:
|
||||
hero.JuexProperty[comm.Cri] += int32(value)
|
||||
case comm.ResonanceHpPro:
|
||||
hero.JuexProperty[comm.Hp] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Hp])))
|
||||
case comm.ResonanceAtkPro:
|
||||
|
@ -67,6 +67,7 @@ func (this *ModelMline) cleanChapter(uId string) (err error) {
|
||||
|
||||
// 清除数据
|
||||
func (this *ModelMline) cleanChapterDataById(uId string, ids ...string) (err error) {
|
||||
this.module.Debugf("cleanChapterDataById:%s,%v", uId, ids)
|
||||
if err = this.DelListlds(uId, ids); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
|
@ -11,49 +11,56 @@ func (this *apiComp) FuncGetListCheck(session comm.IUserSession, req *pb.SysFunc
|
||||
|
||||
func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetListReq) (errdata *pb.ErrorData) {
|
||||
|
||||
var (
|
||||
bChange bool
|
||||
)
|
||||
rsp := &pb.SysFuncGetListResp{}
|
||||
rsp.Cond = make(map[string]int32, 0)
|
||||
opencfg, err := this.module.configure.getOpencondCfg()
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
list, _ := this.module.modelSys.GetOpenCondList(session.GetUserId())
|
||||
if len(req.Keys) == 0 {
|
||||
confList := this.module.configure.getOpencondList()
|
||||
for _, v := range confList {
|
||||
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), v)
|
||||
if id != "" {
|
||||
if v.ActivateType == 1 {
|
||||
if _, ok := list.Cond[id]; ok {
|
||||
rsp.Cond[id] = 1
|
||||
} else {
|
||||
rsp.Cond[id] = 0
|
||||
}
|
||||
} else {
|
||||
for _, v := range opencfg.GetDataList() {
|
||||
if list.Cond[v.Id] == 0 {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), v)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
list.Cond[id] = 1 //设置激活
|
||||
bChange = true
|
||||
}
|
||||
} else {
|
||||
rsp.Cond[v.Id] = 1
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, key := range req.Keys {
|
||||
opencfg, err := this.module.configure.getOpencondCfg()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if conf, ok := opencfg.GetDataMap()[key]; ok {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), conf)
|
||||
if id != "" {
|
||||
if conf.ActivateType == 1 {
|
||||
if _, ok := list.Cond[id]; ok {
|
||||
rsp.Cond[id] = 1
|
||||
} else {
|
||||
rsp.Cond[id] = 0
|
||||
}
|
||||
} else {
|
||||
if list.Cond[key] == 0 {
|
||||
if conf, ok := opencfg.GetDataMap()[key]; ok {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), conf)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
list.Cond[key] = 1 //设置激活
|
||||
bChange = true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rsp.Cond[key] = 1
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if bChange {
|
||||
this.module.modelSys.ChangeOpenCondData(session.GetUserId(), map[string]interface{}{
|
||||
"cond": list.Cond,
|
||||
})
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "funcgetlist", rsp)
|
||||
return
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ func (this *configureComp) GetOpenCondCfgById(id string) (data *cfg.GameOpencond
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) getOpencondList() (list []*cfg.GameOpencondData) {
|
||||
func (this *configureComp) getOpencondConf() (list []*cfg.GameOpencondData) {
|
||||
if cfg, err := this.getOpencondCfg(); err == nil {
|
||||
list = cfg.GetDataList()
|
||||
}
|
||||
|
@ -1000,6 +1000,7 @@ func (this *User) recoverUserPs(uid string) {
|
||||
this.Error("玩家体力变化 UserPsChangedPush推送失败",
|
||||
log.Field{Key: "uid", Value: u.Uid},
|
||||
log.Field{Key: comm.ResPs, Value: changed},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user