bingo支持改玩家等级
This commit is contained in:
parent
2bfc1edce5
commit
dac702a58a
@ -4,5 +4,5 @@ Website = "http://legu.cc"
|
||||
Icon = "app.png"
|
||||
Name = "RobotGUI"
|
||||
ID = "cc.legu.app"
|
||||
Version = "1.2.2"
|
||||
Build = 29
|
||||
Version = "1.2.3"
|
||||
Build = 31
|
||||
|
@ -46,7 +46,7 @@ func (this *BingoView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
aSel = &widget.Select{}
|
||||
gridContainer = container.NewGridWithColumns(3, aSel, tEntry, nEntry)
|
||||
|
||||
aSel.Options = []string{"选择", "attr", "item", "hero", "equi", "mapid", "pataid", "alltask", "worldtask", "sociatyexp", "sociatyactivity", "allgrowtask"}
|
||||
aSel.Options = []string{"选择", "attr", "item", "hero", "equi", "mapid", "pataid", "alltask", "worldtask", "sociatyexp", "sociatyactivity", "allgrowtask","userlv"}
|
||||
aSel.SetSelected("选择")
|
||||
aSel.OnChanged = func(s string) {
|
||||
if s == "attr" {
|
||||
|
@ -342,6 +342,24 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
||||
log.Field{Key: "param", Value: datas[0]},
|
||||
log.Field{Key: "res", Value: res},
|
||||
)
|
||||
} else if len(datas) == 2 && (datas[0] == "userlv") { // 玩家等级
|
||||
module1, err := this.service.GetModule(comm.ModuleUser)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
num, err := strconv.Atoi(datas[1])
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
if err = module1.(comm.IUser).BingoSetUserLv(session, int32(num)); err == nil {
|
||||
code = pb.ErrorCode_Success
|
||||
}
|
||||
this.Debug("使用bingo命令:uid = %s ",
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "0", Value: datas[0]},
|
||||
log.Field{Key: "N", Value: int32(num)},
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user