上传埋点gm工具
This commit is contained in:
parent
cc73d742eb
commit
1d82bb8a63
@ -899,6 +899,19 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
if lv, err := strconv.Atoi(datas[1]); err == nil {
|
if lv, err := strconv.Atoi(datas[1]); err == nil {
|
||||||
module1.(comm.IMoonlv).GMCreateMoonlv(session, int32(lv))
|
module1.(comm.IMoonlv).GMCreateMoonlv(session, int32(lv))
|
||||||
|
|
||||||
|
this.Debug("使用bingo命令",
|
||||||
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
|
log.Field{Key: "0", Value: datas[1]},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else if len(datas) == 2 && (datas[0] == "buried") { // 完成埋点条件
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleBuried)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if id, err := strconv.Atoi(datas[1]); err == nil {
|
||||||
|
module1.(comm.IBuried).CompleteCondition(session, int32(id))
|
||||||
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[1]},
|
log.Field{Key: "0", Value: datas[1]},
|
||||||
|
@ -9,28 +9,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateReq) (errdata *pb.ErrorData) {
|
||||||
// name := strings.TrimSpace(req.NickName)
|
|
||||||
// if name == "" || len(name) > 30 {
|
|
||||||
// errdata = &pb.ErrorData{
|
|
||||||
// Code: pb.ErrorCode_UserNickNameEmpty,
|
|
||||||
// Title: pb.ErrorCode_UserNickNameEmpty.ToString(),
|
|
||||||
// }
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if ok, _ := wordfilter.Validate(name); !ok {
|
|
||||||
// errdata = &pb.ErrorData{
|
|
||||||
// Code: pb.ErrorCode_UserNickSensitive,
|
|
||||||
// Title: pb.ErrorCode_UserNickSensitive.ToString(),
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if req.Gender == 0 || req.Skin == "" {
|
if req.Gender == 0 || req.Skin == "" {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_UserNickNameEmpty,
|
Code: pb.ErrorCode_UserNickNameEmpty,
|
||||||
Title: pb.ErrorCode_UserNickNameEmpty.ToString(),
|
Title: pb.ErrorCode_UserNickNameEmpty.ToString(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,8 +98,9 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
|||||||
for _, v := range val.GetDataList() {
|
for _, v := range val.GetDataList() {
|
||||||
res = append(res, v.Var...)
|
res = append(res, v.Var...)
|
||||||
}
|
}
|
||||||
if errdata, _ := this.module.DispenseAtno(session, res, true); errdata != nil {
|
if errdata, _ = this.module.DispenseAtno(session, res, true); errdata != nil {
|
||||||
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
|
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
|
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
|
||||||
@ -139,7 +124,6 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
|||||||
Lv: user.Lv,
|
Lv: user.Lv,
|
||||||
}
|
}
|
||||||
for _, m := range this.module.notifyUserinfo {
|
for _, m := range this.module.notifyUserinfo {
|
||||||
|
|
||||||
i, err := this.service.GetModule(core.M_Modules(m))
|
i, err := this.service.GetModule(core.M_Modules(m))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
|
@ -47,7 +47,6 @@ func (this *ModelExpand) GetUserExpand(uid string) (result *pb.DBUserExpand, err
|
|||||||
globalConf := this.module.ModuleTools.GetGlobalConf()
|
globalConf := this.module.ModuleTools.GetGlobalConf()
|
||||||
initUpdate := map[string]interface{}{
|
initUpdate := map[string]interface{}{
|
||||||
"uid": uid,
|
"uid": uid,
|
||||||
//"modifynameCount": 1, //修改名称1次
|
|
||||||
"sociatyTicket": globalConf.GuildBossInitialNum, //公会BOSS挑战券
|
"sociatyTicket": globalConf.GuildBossInitialNum, //公会BOSS挑战券
|
||||||
"expitem": make(map[string]int32, 0), // 初始化
|
"expitem": make(map[string]int32, 0), // 初始化
|
||||||
"mline": make(map[string]int32, 0),
|
"mline": make(map[string]int32, 0),
|
||||||
@ -88,27 +87,6 @@ func (this *ModelExpand) ChangeUserExpand(uid string, value map[string]interface
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.Change(uid, value)
|
return this.Change(uid, value)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 累计登录天数 和 全局buff清理
|
|
||||||
// func (this *ModelExpand) updateLoginDay(uid string, timestamp int64) (err error) {
|
|
||||||
// var de *pb.DBUserExpand
|
|
||||||
// if de, err = this.GetUserExpand(uid); err == nil {
|
|
||||||
// count := de.LoginAddCount + 1
|
|
||||||
// update := map[string]interface{}{
|
|
||||||
// "loginAddCount": count,
|
|
||||||
// "globalbuff": 0,
|
|
||||||
// "consumPs": 0, // 重置每日消耗体力
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 更新连续等登录天数
|
|
||||||
// if utils.IsYestoday(timestamp) {
|
|
||||||
// update["loginContinueCount"] = de.LoginContinueCount + 1
|
|
||||||
// }
|
|
||||||
// err = this.ChangeUserExpand(uid, update)
|
|
||||||
// }
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user