不推送gm 操作成功还是失败,客户端监听物品变化即可
This commit is contained in:
parent
53dda66f46
commit
70935119a4
@ -44,6 +44,7 @@ func (this *GM) OnInstallComp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorCode) {
|
func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorCode) {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
keys := strings.Split(cmd, ":")
|
keys := strings.Split(cmd, ":")
|
||||||
if len(keys) == 2 {
|
if len(keys) == 2 {
|
||||||
if keys[0] == "bingo" {
|
if keys[0] == "bingo" {
|
||||||
@ -61,14 +62,9 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
|||||||
N: int32(num),
|
N: int32(num),
|
||||||
},
|
},
|
||||||
}, true)
|
}, true)
|
||||||
if code == pb.ErrorCode_Success { // 成功直接返回
|
|
||||||
session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: true})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
code = pb.ErrorCode_ReqParameterError
|
|
||||||
session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: false})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user