上传装备洗练

This commit is contained in:
liwei1dao 2022-10-25 10:00:48 +08:00
parent 06601537cc
commit 0baabf3414
5 changed files with 99 additions and 3 deletions

View File

@ -28,5 +28,15 @@
"n": 100 "n": 100
} }
] ]
},
{
"index": "equip_wash",
"var": [
{
"a": "attr",
"t": "gold",
"n": 20000
}
]
} }
] ]

View File

@ -180,7 +180,31 @@
], ],
"gourmet_pause": [ "gourmet_pause": [
500, 500,
3000 1500
] ],
"gourmet_pause1": [
500,
2000
],
"gourmet_pause2": [
2000,
4000
],
"guild_BuildCos": {
"a": "attr",
"t": "diamond",
"n": 500
},
"guild_NoticeWordnum": 150,
"guild_RejoinCd": 24,
"guild_ApplyMax": 20,
"guild_AcceptApplyMax": 100,
"guild_ViceAllianceLeader_MaxNum": 3,
"guild_administrators_MaxNum": 5,
"guild_InitiateImpeachmentTime": 72,
"guild_ImpeachmentCountDown": 48,
"guild_DissolutionCountDown_cd": 24,
"guild_dissolution_cd": 72,
"guild_BuildCd": 72
} }
] ]

View File

@ -25,6 +25,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
conf *cfg.GameEquipData conf *cfg.GameEquipData
attrlibrarys []*cfg.GameEquipAttrlibraryData attrlibrarys []*cfg.GameEquipAttrlibraryData
adverbEntry []*pb.EquipmentAttributeEntry adverbEntry []*pb.EquipmentAttributeEntry
deplete *cfg.GameComAtnData
err error err error
) )
if code = this.WashCheck(session, req); code != pb.ErrorCode_Success { if code = this.WashCheck(session, req); code != pb.ErrorCode_Success {
@ -35,6 +36,13 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
code = pb.ErrorCode_SystemError code = pb.ErrorCode_SystemError
return return
} }
if deplete = this.module.configure.GetGlobalAtnConf("equip_wash"); deplete == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if code = this.module.ConsumeRes(session, deplete.Var, true); code == pb.ErrorCode_Success {
return
}
if conf, err = this.module.configure.GetEquipmentConfigureById(equip.CId); err != nil { if conf, err = this.module.configure.GetEquipmentConfigureById(equip.CId); err != nil {
this.module.Errorf("Equip_Check err:%v", err) this.module.Errorf("Equip_Check err:%v", err)
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound

View File

@ -57,6 +57,6 @@ func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWas
code = pb.ErrorCode_SystemError code = pb.ErrorCode_SystemError
return return
} }
session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashConfirmResp{Issucc: true}) session.SendMsg(string(this.module.GetType()), "washconfirm", &pb.EquipmentWashConfirmResp{Issucc: true})
return return
} }

View File

@ -90,6 +90,20 @@ type GameGlobalData struct {
SellingTipsEntry int32 SellingTipsEntry int32
GourmetRobot []int32 GourmetRobot []int32
GourmetPause []int32 GourmetPause []int32
GourmetPause1 []int32
GourmetPause2 []int32
GuildBuildCos *Gameatn
GuildNoticeWordnum int32
GuildRejoinCd int32
GuildApplyMax int32
GuildAcceptApplyMax int32
GuildViceAllianceLeaderMaxNum int32
GuildAdministratorsMaxNum int32
GuildInitiateImpeachmentTime int32
GuildImpeachmentCountDown int32
GuildDissolutionCountDownCd int32
GuildDissolutionCd int32
GuildBuildCd int32
} }
const TypeId_GameGlobalData = 477542761 const TypeId_GameGlobalData = 477542761
@ -295,6 +309,46 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
} }
} }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["gourmet_pause1"].([]interface{}); !_ok_ { err = errors.New("gourmet_pause1 error"); return }
_v.GourmetPause1 = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.GourmetPause1 = append(_v.GourmetPause1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["gourmet_pause2"].([]interface{}); !_ok_ { err = errors.New("gourmet_pause2 error"); return }
_v.GourmetPause2 = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.GourmetPause2 = append(_v.GourmetPause2, _list_v_)
}
}
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["guild_BuildCos"].(map[string]interface{}); !_ok_ { err = errors.New("guild_BuildCos error"); return }; if _v.GuildBuildCos, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_NoticeWordnum"].(float64); !_ok_ { err = errors.New("guild_NoticeWordnum error"); return }; _v.GuildNoticeWordnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_RejoinCd"].(float64); !_ok_ { err = errors.New("guild_RejoinCd error"); return }; _v.GuildRejoinCd = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_ApplyMax"].(float64); !_ok_ { err = errors.New("guild_ApplyMax error"); return }; _v.GuildApplyMax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_AcceptApplyMax"].(float64); !_ok_ { err = errors.New("guild_AcceptApplyMax error"); return }; _v.GuildAcceptApplyMax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_ViceAllianceLeader_MaxNum"].(float64); !_ok_ { err = errors.New("guild_ViceAllianceLeader_MaxNum error"); return }; _v.GuildViceAllianceLeaderMaxNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_administrators_MaxNum"].(float64); !_ok_ { err = errors.New("guild_administrators_MaxNum error"); return }; _v.GuildAdministratorsMaxNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_InitiateImpeachmentTime"].(float64); !_ok_ { err = errors.New("guild_InitiateImpeachmentTime error"); return }; _v.GuildInitiateImpeachmentTime = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_ImpeachmentCountDown"].(float64); !_ok_ { err = errors.New("guild_ImpeachmentCountDown error"); return }; _v.GuildImpeachmentCountDown = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_DissolutionCountDown_cd"].(float64); !_ok_ { err = errors.New("guild_DissolutionCountDown_cd error"); return }; _v.GuildDissolutionCountDownCd = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_dissolution_cd"].(float64); !_ok_ { err = errors.New("guild_dissolution_cd error"); return }; _v.GuildDissolutionCd = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_BuildCd"].(float64); !_ok_ { err = errors.New("guild_BuildCd error"); return }; _v.GuildBuildCd = int32(_tempNum_) }
return return
} }