版署同步 增加gm 满好感动命令
This commit is contained in:
parent
1059337959
commit
a3f60b27ca
@ -428,6 +428,7 @@ type (
|
|||||||
// 任务完成通知
|
// 任务完成通知
|
||||||
TaskFinishNotify(uid string, taskId, fetterId int32) error
|
TaskFinishNotify(uid string, taskId, fetterId int32) error
|
||||||
IGetReddot
|
IGetReddot
|
||||||
|
GMCreateFavorability(uid string)
|
||||||
}
|
}
|
||||||
// 个人成长任务
|
// 个人成长任务
|
||||||
IGrowtask interface {
|
IGrowtask interface {
|
||||||
|
@ -578,6 +578,22 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
|
|
||||||
module1.(comm.IGourmet).GMCreateAltas(session.GetUserId())
|
module1.(comm.IGourmet).GMCreateAltas(session.GetUserId())
|
||||||
|
|
||||||
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
|
)
|
||||||
|
} else if len(datas) == 1 && (datas[0] == "library") {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleLibrary)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
module1.(comm.ILibrary).GMCreateFavorability(session.GetUserId())
|
||||||
|
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[0]},
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
|
@ -326,3 +326,24 @@ func (this *Library) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *Library) GMCreateFavorability(uid string) {
|
||||||
|
fetter := this.GetHeroFetterList(uid)
|
||||||
|
update := map[string]interface{}{}
|
||||||
|
for _, v := range fetter {
|
||||||
|
|
||||||
|
if conf, er := this.configure.GetFavorabilityExp(v.Heroid); er == nil {
|
||||||
|
// 达到最大等级不让继续升级
|
||||||
|
v.Favorlv = int32(len(conf))
|
||||||
|
v.Favorexp = 0
|
||||||
|
update["favorlv"] = v.Favorlv
|
||||||
|
update["favorexp"] = v.Favorexp
|
||||||
|
|
||||||
|
if err := this.modelFetter.ChangeList(uid, v.Id, update); err != nil {
|
||||||
|
this.Errorf("modelFetter ChangeList error: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user