1
This commit is contained in:
parent
c4f90d2c3b
commit
9c74103711
@ -25,6 +25,9 @@ func (this *HandlerMgr) Init() {
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMStartGame), constant.PLAYER_HANDLER_ID)
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMCancel), constant.PLAYER_HANDLER_ID)
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMSetReady), constant.PLAYER_HANDLER_ID)
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMSetSpecSkill), constant.PLAYER_HANDLER_ID)
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMChooseHero), constant.PLAYER_HANDLER_ID)
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMChooseMap), constant.PLAYER_HANDLER_ID)
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMGrantInvitePermission), constant.PLAYER_HANDLER_ID)
|
||||
}
|
||||
|
||||
|
@ -256,6 +256,39 @@ func (this *player) CMSetReady(hdr *f5.MsgHdr, msg *cs.CMSetReady) {
|
||||
this.GetTeam().SendUpdateNotify()
|
||||
}
|
||||
|
||||
func (this *player) CMSpecSkill(hdr *f5.MsgHdr, msg *cs.CMSetSpecSkill) {
|
||||
rspMsg := &cs.SMSetSpecSkill{}
|
||||
if this.GetTeam().Started() {
|
||||
rspMsg.Errcode = proto.Int32(1)
|
||||
rspMsg.Errmsg = proto.String("team already started")
|
||||
} else {
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
this.GetTeam().SendUpdateNotify()
|
||||
}
|
||||
|
||||
func (this *player) CMChooseHero(hdr *f5.MsgHdr, msg *cs.CMChooseHero) {
|
||||
rspMsg := &cs.SMChooseHero{}
|
||||
if this.GetTeam().Started() {
|
||||
rspMsg.Errcode = proto.Int32(1)
|
||||
rspMsg.Errmsg = proto.String("team already started")
|
||||
} else {
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
this.GetTeam().SendUpdateNotify()
|
||||
}
|
||||
|
||||
func (this *player) CMChooseMap(hdr *f5.MsgHdr, msg *cs.CMChooseMap) {
|
||||
rspMsg := &cs.SMChooseMap{}
|
||||
if this.GetTeam().Started() {
|
||||
rspMsg.Errcode = proto.Int32(1)
|
||||
rspMsg.Errmsg = proto.String("team already started")
|
||||
} else {
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
this.GetTeam().SendUpdateNotify()
|
||||
}
|
||||
|
||||
func (this *player) CMGrantInvitePermission(hdr *f5.MsgHdr, msg *cs.CMGrantInvitePermission) {
|
||||
rspMsg := &cs.SMGrantInvitePermission{}
|
||||
if this.GetTeam().Started() {
|
||||
|
@ -17,6 +17,9 @@ enum CMMessageId_e
|
||||
_CMCancel = 112;
|
||||
_CMSetReady = 113;
|
||||
_CMGrantInvitePermission = 114;
|
||||
_CMSetSpecSkill = 115;
|
||||
_CMChooseHero = 116;
|
||||
_CMChooseMap = 117;
|
||||
}
|
||||
|
||||
enum SMMessageId_e
|
||||
@ -33,6 +36,9 @@ enum SMMessageId_e
|
||||
_SMCancel = 112;
|
||||
_SMSetReady = 113;
|
||||
_SMGrantInvitePermission = 114;
|
||||
_SMSetSpecSkill = 115;
|
||||
_SMChooseHero = 116;
|
||||
_SMChooseMap = 117;
|
||||
|
||||
_SMTeamUpdateNotify = 1001;
|
||||
_SMTeamStateNotify = 1002;
|
||||
|
@ -266,6 +266,41 @@ message SMSetReady
|
||||
optional string errmsg = 2; //错误描述
|
||||
}
|
||||
|
||||
//设置召唤师技能
|
||||
message CMSetSpecSkill
|
||||
{
|
||||
}
|
||||
|
||||
message SMSetSpecSkill
|
||||
{
|
||||
optional int32 errcode = 1; //错误码 0:成功
|
||||
optional string errmsg = 2; //错误描述
|
||||
}
|
||||
|
||||
//选择英雄
|
||||
message CMChooseHero
|
||||
{
|
||||
optional string hero_uniid = 1; //英雄唯一id
|
||||
}
|
||||
|
||||
message SMChooseHero
|
||||
{
|
||||
optional int32 errcode = 1; //错误码 0:成功
|
||||
optional string errmsg = 2; //错误描述
|
||||
}
|
||||
|
||||
//选择地图
|
||||
message CMChooseMap
|
||||
{
|
||||
optional int32 map_id = 1; //地图id
|
||||
}
|
||||
|
||||
message SMChooseMap
|
||||
{
|
||||
optional int32 errcode = 1; //错误码 0:成功
|
||||
optional string errmsg = 2; //错误描述
|
||||
}
|
||||
|
||||
//授予邀请队友权限
|
||||
message CMGrantInvitePermission
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user