新增错误
This commit is contained in:
parent
a640c50d22
commit
2377793a98
@ -181,17 +181,27 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
color = 2
|
color = 2
|
||||||
}
|
}
|
||||||
if req.Itype == 1 { //释放技能
|
if req.Itype == 1 { //释放技能
|
||||||
this.NexPower = this.curPower
|
|
||||||
// 能量校验
|
// 能量校验
|
||||||
if color == 1 { // 玩家1 放技能
|
if color == 1 { // 玩家1 放技能
|
||||||
conf, err := this.module.configure.GetGameConsumeHero(this.player1.Cardid)
|
conf, err := this.module.configure.GetGameConsumeHero(this.player1.Cardid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_EntertainNoHeroSkill,
|
||||||
|
Title: pb.ErrorCode_EntertainNoHeroSkill.ToString(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if this.player1.Energy >= conf.Skillload {
|
if this.player1.Energy >= conf.Skillload {
|
||||||
this.player1.Energy = conf.Skillload // 清零
|
this.player1.Energy = conf.Skillload // 清零
|
||||||
curScore, szMap = this.chessboard.SkillUp(conf.Skilleffect, conf.Skillvalue)
|
curScore, szMap = this.chessboard.SkillUp(conf.Skilleffect, conf.Skillvalue)
|
||||||
|
} else {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_EntertainNoEnergy,
|
||||||
|
Title: pb.ErrorCode_EntertainNoEnergy.ToString(),
|
||||||
}
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.NexPower = this.curPower
|
||||||
}
|
}
|
||||||
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
||||||
Mpadata: szMap,
|
Mpadata: szMap,
|
||||||
|
@ -453,6 +453,8 @@ const (
|
|||||||
// xxl
|
// xxl
|
||||||
ErrorCode_EntertainCantSwap ErrorCode = 5201 //不能交换
|
ErrorCode_EntertainCantSwap ErrorCode = 5201 //不能交换
|
||||||
ErrorCode_EntertainNoPower ErrorCode = 5202 //对方操作
|
ErrorCode_EntertainNoPower ErrorCode = 5202 //对方操作
|
||||||
|
ErrorCode_EntertainNoHeroSkill ErrorCode = 5203 //没找到该英雄对应的技能
|
||||||
|
ErrorCode_EntertainNoEnergy ErrorCode = 5204 //技能能量不足
|
||||||
)
|
)
|
||||||
|
|
||||||
// Enum value maps for ErrorCode.
|
// Enum value maps for ErrorCode.
|
||||||
@ -843,6 +845,8 @@ var (
|
|||||||
5101: "CapturesheepRankCloseed",
|
5101: "CapturesheepRankCloseed",
|
||||||
5201: "EntertainCantSwap",
|
5201: "EntertainCantSwap",
|
||||||
5202: "EntertainNoPower",
|
5202: "EntertainNoPower",
|
||||||
|
5203: "EntertainNoHeroSkill",
|
||||||
|
5204: "EntertainNoEnergy",
|
||||||
}
|
}
|
||||||
ErrorCode_value = map[string]int32{
|
ErrorCode_value = map[string]int32{
|
||||||
"Success": 0,
|
"Success": 0,
|
||||||
@ -1230,6 +1234,8 @@ var (
|
|||||||
"CapturesheepRankCloseed": 5101,
|
"CapturesheepRankCloseed": 5101,
|
||||||
"EntertainCantSwap": 5201,
|
"EntertainCantSwap": 5201,
|
||||||
"EntertainNoPower": 5202,
|
"EntertainNoPower": 5202,
|
||||||
|
"EntertainNoHeroSkill": 5203,
|
||||||
|
"EntertainNoEnergy": 5204,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1264,7 +1270,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_errorcode_proto_rawDesc = []byte{
|
var file_errorcode_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x2a, 0xb1, 0x47, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
0x6f, 0x2a, 0xe4, 0x47, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
||||||
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
|
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
|
||||||
@ -1835,8 +1841,11 @@ var file_errorcode_proto_rawDesc = []byte{
|
|||||||
0x65, 0x65, 0x64, 0x10, 0xed, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74,
|
0x65, 0x65, 0x64, 0x10, 0xed, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74,
|
||||||
0x61, 0x69, 0x6e, 0x43, 0x61, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x10, 0xd1, 0x28, 0x12, 0x15,
|
0x61, 0x69, 0x6e, 0x43, 0x61, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x10, 0xd1, 0x28, 0x12, 0x15,
|
||||||
0x0a, 0x10, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x50, 0x6f, 0x77,
|
0x0a, 0x10, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x50, 0x6f, 0x77,
|
||||||
0x65, 0x72, 0x10, 0xd2, 0x28, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
0x65, 0x72, 0x10, 0xd2, 0x28, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x69, 0x6e, 0x4e, 0x6f, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x10, 0xd3, 0x28,
|
||||||
|
0x12, 0x16, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x45,
|
||||||
|
0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0xd4, 0x28, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||||
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user