Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
7d14cab842
28
modules/hero/api_heroSkillUp.go
Normal file
28
modules/hero/api_heroSkillUp.go
Normal file
@ -0,0 +1,28 @@
|
||||
package hero
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) StrengthenUpSkillCheck(session comm.IUserSession, req *pb.HeroStrengthenUpSkillReq) (result map[string]interface{}, code comm.ErrorCode) {
|
||||
if req.HeroObjID == "" {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
/// 英雄技能升级
|
||||
func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, agrs map[string]interface{}, req *pb.HeroStrengthenUpSkillReq) (code pb.ErrorCode) {
|
||||
|
||||
defer func() {
|
||||
if code == pb.ErrorCode_Success {
|
||||
session.SendMsg(string(this.moduleHero.GetType()), StrengthenUplv, &pb.HeroStrengthenUpSkillResp{})
|
||||
}
|
||||
}()
|
||||
|
||||
return
|
||||
}
|
@ -2,7 +2,9 @@ package hero
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
@ -11,19 +13,123 @@ func (this *apiComp) StrengthenUpStarCheck(session comm.IUserSession, req *pb.He
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
var (
|
||||
curLv int32
|
||||
target *cfg.Game_heroStarupData // 配置表目标升星英雄信息
|
||||
raceHero *pb.DBHero // 消耗的阵容英雄
|
||||
costRaceCount int32
|
||||
curGold int32
|
||||
)
|
||||
tagHero, err := this.moduleHero.modelHero.moduleHero.GetHero(session.GetUserId(), req.HeroObjID)
|
||||
if err != 0 {
|
||||
code.Code = pb.ErrorCode_HeroNoExist
|
||||
return
|
||||
}
|
||||
curLv = tagHero.Lv
|
||||
log.Debugf("curLv:%d", curLv)
|
||||
// 校验指定英雄
|
||||
tagHeroConfig, err1 := this.moduleHero.configure.GetHeroStarupConfig()
|
||||
if err1 != nil {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
|
||||
for _, value := range tagHeroConfig.GetDataList() {
|
||||
if tagHero.HeroID == value.Id && tagHero.Star == value.Star && tagHero.Lv == value.Maxlevel { // 找到了 满足升星条件
|
||||
target = value
|
||||
break
|
||||
}
|
||||
}
|
||||
// 指定英雄消耗校验
|
||||
for _, v := range req.Hero {
|
||||
if tagHero, err := this.moduleHero.modelHero.moduleHero.GetHero(session.GetUserId(), v.CostCardObj); err != 0 {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
} else {
|
||||
if tagHero.Count < v.Amount { // 校验数量
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
// 校验ID
|
||||
if tagHero.HeroID != target.Needhero && tagHero.Star != target.Needherostar && tagHero.Count < target.Needheronum {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
// 校验阵容英雄消耗
|
||||
for _, v := range req.HeroRace {
|
||||
if raceHero, err = this.moduleHero.modelHero.moduleHero.GetHero(session.GetUserId(), v.CostCardObj); err != 0 {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
} else {
|
||||
// 校验阵容信息
|
||||
if raceHero.Star != target.Needracestar {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
bFind := false
|
||||
for _, value := range target.Needrace { // 阵营校验
|
||||
if raceHero.Formation == value {
|
||||
bFind = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !bFind {
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
costRaceCount += v.Amount
|
||||
}
|
||||
if costRaceCount != target.Needracenum { // 数量不匹配
|
||||
code.Code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
// 金币消耗判断
|
||||
curGold = this.user.QueryAttributeValue(session.GetUserId(), "gold")
|
||||
if curGold < target.Gold { // 金币不足
|
||||
code.Code = pb.ErrorCode_GoldNoEnough
|
||||
return
|
||||
}
|
||||
|
||||
result = map[string]interface{}{
|
||||
"costGold": target.Gold,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
/// 英雄升星
|
||||
func (this *apiComp) StrengthenUpStar(session comm.IUserSession, agrs map[string]interface{}, req *pb.HeroStrengthenUpStarReq) (code pb.ErrorCode) {
|
||||
|
||||
var (
|
||||
costGold int32 // 当前需要消耗金币的数量
|
||||
)
|
||||
defer func() {
|
||||
if code == pb.ErrorCode_Success {
|
||||
session.SendMsg(string(this.moduleHero.GetType()), StrengthenUplv, &pb.HeroStrengthenUpStarResp{})
|
||||
}
|
||||
}()
|
||||
costGold = agrs["costGold"].(int32)
|
||||
// 消耗道具
|
||||
code = this.user.AddAttributeValue(session.GetUserId(), "gold", -costGold) // 减少金币
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
// 消耗指定英雄
|
||||
for _, v := range req.Hero {
|
||||
code = this.moduleHero.DelCard(v.CostCardObj, v.Amount)
|
||||
if code != 0 {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
//消耗种族英雄
|
||||
for _, v := range req.HeroRace {
|
||||
code = this.moduleHero.DelCard(v.CostCardObj, v.Amount)
|
||||
if code != 0 {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ func (this *apiComp) StrengthenUplvCheck(session comm.IUserSession, req *pb.Hero
|
||||
curExp int32 // 当前英雄的经验
|
||||
costGold int32 // 当前需要消耗金币的数量
|
||||
addExp int32 // 需要增加的经验
|
||||
curGold int32
|
||||
//atn = map[string]interface{}{}
|
||||
)
|
||||
|
||||
@ -84,6 +85,11 @@ func (this *apiComp) StrengthenUplvCheck(session comm.IUserSession, req *pb.Hero
|
||||
costGold += _data.Gold[0].N // 统计 升级需要消耗金币的数量
|
||||
}
|
||||
}
|
||||
// 金币消耗判断
|
||||
curGold = this.user.QueryAttributeValue(session.GetUserId(), "gold")
|
||||
if curGold < costGold {
|
||||
code.Code = pb.ErrorCode_GoldNoEnough
|
||||
}
|
||||
} else {
|
||||
code.Code = pb.ErrorCode_HeroNoExist
|
||||
return
|
||||
|
@ -56,7 +56,7 @@ func (this *configureComp) getHeroConfigure() (configure *cfg.Game_newHero, err
|
||||
}
|
||||
|
||||
// 获取英雄强化增加属性配置数据
|
||||
func (this *configureComp) GetHeroStargrowCon() (configure *cfg.Game_heroStargrow, err error) {
|
||||
func (this *configureComp) GetHeroStargrowConfig() (configure *cfg.Game_heroStargrow, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
@ -74,7 +74,7 @@ func (this *configureComp) GetHeroStargrowCon() (configure *cfg.Game_heroStargro
|
||||
}
|
||||
|
||||
// 获取英雄升级属性变化相关配置数据
|
||||
func (this *configureComp) GetHeroLevelgrowCon() (configure *cfg.Game_heroLevelgrow, err error) {
|
||||
func (this *configureComp) GetHeroLevelgrowConfig() (configure *cfg.Game_heroLevelgrow, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
@ -90,7 +90,7 @@ func (this *configureComp) GetHeroLevelgrowCon() (configure *cfg.Game_heroLevelg
|
||||
}
|
||||
|
||||
// 获取英雄升星相关配置数据
|
||||
func (this *configureComp) GetHeroStarupCon() (configure *cfg.Game_heroStarup, err error) {
|
||||
func (this *configureComp) GetHeroStarupConfig() (configure *cfg.Game_heroStarup, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
@ -107,7 +107,7 @@ func (this *configureComp) GetHeroStarupCon() (configure *cfg.Game_heroStarup, e
|
||||
}
|
||||
|
||||
// 获取英雄升级相关配置数据
|
||||
func (this *configureComp) GetHeroLevelUpCon() (configure *cfg.Game_heroLevelup, err error) {
|
||||
func (this *configureComp) GetHeroLevelUpConfig() (configure *cfg.Game_heroLevelup, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
@ -123,7 +123,7 @@ func (this *configureComp) GetHeroLevelUpCon() (configure *cfg.Game_heroLevelup,
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetHeroExpCon() (configure *cfg.Game_heroExp, err error) {
|
||||
func (this *configureComp) GetHeroExpConfig() (configure *cfg.Game_heroExp, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
|
@ -46,6 +46,8 @@ const (
|
||||
ErrorCode_SecKeyInvalid ErrorCode = 1000 //秘钥无效
|
||||
ErrorCode_SecKey ErrorCode = 1001 //秘钥格式错误
|
||||
ErrorCode_BindUser ErrorCode = 1002 //用户绑定错误
|
||||
ErrorCode_GoldNoEnough ErrorCode = 1003 // 金币不足
|
||||
ErrorCode_DiamondNoEnough ErrorCode = 1004 // 钻石不足
|
||||
// friend
|
||||
ErrorCode_FriendNotSelf ErrorCode = 1100 //不能是自己
|
||||
ErrorCode_FriendSelfMax ErrorCode = 1101 //超出好友最大数量
|
||||
@ -99,6 +101,8 @@ var (
|
||||
1000: "SecKeyInvalid",
|
||||
1001: "SecKey",
|
||||
1002: "BindUser",
|
||||
1003: "GoldNoEnough",
|
||||
1004: "DiamondNoEnough",
|
||||
1100: "FriendNotSelf",
|
||||
1101: "FriendSelfMax",
|
||||
1102: "FriendTargetMax",
|
||||
@ -145,6 +149,8 @@ var (
|
||||
"SecKeyInvalid": 1000,
|
||||
"SecKey": 1001,
|
||||
"BindUser": 1002,
|
||||
"GoldNoEnough": 1003,
|
||||
"DiamondNoEnough": 1004,
|
||||
"FriendNotSelf": 1100,
|
||||
"FriendSelfMax": 1101,
|
||||
"FriendTargetMax": 1102,
|
||||
@ -201,7 +207,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_errorcode_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2a, 0xa6, 0x07, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x6f, 0x2a, 0xcf, 0x07, 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, 0x11, 0x0a, 0x0d,
|
||||
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
|
||||
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
@ -228,39 +234,42 @@ var file_errorcode_proto_rawDesc = []byte{
|
||||
0x6f, 0x75, 0x6e, 0x64, 0x10, 0x68, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x4b, 0x65, 0x79,
|
||||
0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0xe8, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x65,
|
||||
0x63, 0x4b, 0x65, 0x79, 0x10, 0xe9, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x69, 0x6e, 0x64, 0x55,
|
||||
0x73, 0x65, 0x72, 0x10, 0xea, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x4e, 0x6f, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72,
|
||||
0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14,
|
||||
0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61,
|
||||
0x78, 0x10, 0xce, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65,
|
||||
0x6c, 0x66, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74,
|
||||
0x61, 0x10, 0xd0, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65,
|
||||
0x74, 0x10, 0xd1, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70,
|
||||
0x70, 0x6c, 0x79, 0x59, 0x65, 0x74, 0x10, 0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10,
|
||||
0xd3, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a,
|
||||
0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x10, 0xd5, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c,
|
||||
0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x10, 0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x10, 0xd7, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f,
|
||||
0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09,
|
||||
0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d,
|
||||
0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72,
|
||||
0x10, 0xb3, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69,
|
||||
0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45,
|
||||
0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f,
|
||||
0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f,
|
||||
0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x1e, 0x0a, 0x19,
|
||||
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64,
|
||||
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17,
|
||||
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x65, 0x72, 0x10, 0xea, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x47, 0x6f, 0x6c, 0x64, 0x4e, 0x6f,
|
||||
0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xeb, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x44, 0x69, 0x61,
|
||||
0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xec, 0x07, 0x12,
|
||||
0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x6c, 0x66,
|
||||
0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c,
|
||||
0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x10, 0xce, 0x08, 0x12, 0x15, 0x0a,
|
||||
0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4e, 0x6f, 0x44, 0x61, 0x74,
|
||||
0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xd0, 0x08, 0x12, 0x0e, 0x0a,
|
||||
0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x74, 0x10, 0xd1, 0x08, 0x12, 0x13, 0x0a,
|
||||
0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x59, 0x65, 0x74, 0x10,
|
||||
0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66,
|
||||
0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd3, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x46,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b,
|
||||
0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd5, 0x08, 0x12, 0x13, 0x0a,
|
||||
0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x10,
|
||||
0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72,
|
||||
0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xd7, 0x08, 0x12, 0x12,
|
||||
0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10,
|
||||
0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75,
|
||||
0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2,
|
||||
0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x10, 0x0a, 0x0b,
|
||||
0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11,
|
||||
0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95,
|
||||
0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96,
|
||||
0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64,
|
||||
0x10, 0xf9, 0x0a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -26,6 +26,8 @@ enum ErrorCode {
|
||||
SecKeyInvalid = 1000; //秘钥无效
|
||||
SecKey = 1001; //秘钥格式错误
|
||||
BindUser = 1002; //用户绑定错误
|
||||
GoldNoEnough = 1003; // 金币不足
|
||||
DiamondNoEnough = 1004; // 钻石不足
|
||||
|
||||
// friend
|
||||
FriendNotSelf = 1100; //不能是自己
|
||||
|
Loading…
Reference in New Issue
Block a user