diff --git a/comm/imodule.go b/comm/imodule.go index f9e44060f..d4e44aec6 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -714,7 +714,7 @@ type ( UserOffline(roomid string, uid string) (err error) //主动认输 AdmitDefeat(roomid string, uid string) (err error) - + GMAddConsumeexp(session IUserSession, score int32) (errdata *pb.ErrorData) IPayDelivery } IMoonlv interface { diff --git a/modules/entertainment/module.go b/modules/entertainment/module.go index c3ea74a94..84030bfe7 100644 --- a/modules/entertainment/module.go +++ b/modules/entertainment/module.go @@ -351,3 +351,22 @@ func (this *Entertainment) Delivery(session comm.IUserSession, pId int32) (errda }) return } + +func (this *Entertainment) GMAddConsumeexp(session comm.IUserSession, score int32) (errdata *pb.ErrorData) { + + var ( + result *pb.DBXXLData + err error + ) + + if result, err = this.model.getEntertainmList(session.GetUserId()); err != nil { + return + } + result.Consumeexp = score + + this.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{ + "consumeexp": score, + }) + + return +} diff --git a/modules/gm/module.go b/modules/gm/module.go index 64a41f79f..acca27531 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -957,6 +957,19 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er if id, err := strconv.Atoi(datas[1]); err == nil { module1.(comm.IBuried).CompleteCondition(session, int32(id)) + this.Debug("使用bingo命令", + log.Field{Key: "uid", Value: session.GetUserId()}, + log.Field{Key: "0", Value: datas[1]}, + ) + } + } else if len(datas) == 2 && (datas[0] == "consumeexp") { // 完成埋点条件 + module1, err := this.service.GetModule(comm.ModuleEntertainment) + if err != nil { + return + } + if id, err := strconv.Atoi(datas[1]); err == nil { + module1.(comm.IEntertainment).GMAddConsumeexp(session, int32(id)) + this.Debug("使用bingo命令", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "0", Value: datas[1]},