diff --git a/bin/json/game_comatn.json b/bin/json/game_comatn.json index 43a4efd61..2a2633bda 100644 --- a/bin/json/game_comatn.json +++ b/bin/json/game_comatn.json @@ -28,5 +28,15 @@ "n": 100 } ] + }, + { + "index": "equip_wash", + "var": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } + ] } ] \ No newline at end of file diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 009749061..8a51abd74 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -180,7 +180,31 @@ ], "gourmet_pause": [ 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 } ] \ No newline at end of file diff --git a/modules/equipment/api_wash.go b/modules/equipment/api_wash.go index 769416e40..75d288d37 100644 --- a/modules/equipment/api_wash.go +++ b/modules/equipment/api_wash.go @@ -25,6 +25,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) ( conf *cfg.GameEquipData attrlibrarys []*cfg.GameEquipAttrlibraryData adverbEntry []*pb.EquipmentAttributeEntry + deplete *cfg.GameComAtnData err error ) 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 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 { this.module.Errorf("Equip_Check err:%v", err) code = pb.ErrorCode_ConfigNoFound diff --git a/modules/equipment/api_washconfirm.go b/modules/equipment/api_washconfirm.go index bc90d1564..97079bc31 100644 --- a/modules/equipment/api_washconfirm.go +++ b/modules/equipment/api_washconfirm.go @@ -57,6 +57,6 @@ func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWas code = pb.ErrorCode_SystemError return } - session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashConfirmResp{Issucc: true}) + session.SendMsg(string(this.module.GetType()), "washconfirm", &pb.EquipmentWashConfirmResp{Issucc: true}) return } diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 4144afcb6..dc5962670 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -90,6 +90,20 @@ type GameGlobalData struct { SellingTipsEntry int32 GourmetRobot []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 @@ -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 }