From 68ffda04eef66e0d48e5a1d5178e8da8ba237257 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 7 Nov 2022 18:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E4=BB=BB=E5=8A=A1=E6=95=B0?= =?UTF-8?q?=E8=AF=BB=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_global.json | 13 +++++++------ modules/sociaty/model_sociatytask.go | 9 +++++++-- sys/configure/structs/game.globalData.go | 2 ++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bin/json/game_global.json b/bin/json/game_global.json index b0812c246..5c6ef1232 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -201,11 +201,12 @@ "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, + "guild_InitiateImpeachmentTime": 1, + "guild_TaskNum": 4, + "guild_ImpeachmentCountDown": 1, + "guild_DissolutionCountDown_cd": 1, + "guild_dissolution_cd": 1, + "guild_BuildCd": 1, "ArenaTicket_max": 10, "ArenaTicket_RecoveryTime": 144, "VikingExpedition_RecoveryTime": 144, @@ -225,7 +226,7 @@ ], "horoscope_reset_cost": { "a": "attr", - "t": "starcoin", + "t": "diamond", "n": 500 }, "horoscope_reset_cd": 86400 diff --git a/modules/sociaty/model_sociatytask.go b/modules/sociaty/model_sociatytask.go index ec0b09d3b..83f6d77ed 100644 --- a/modules/sociaty/model_sociatytask.go +++ b/modules/sociaty/model_sociatytask.go @@ -36,10 +36,15 @@ func (this *ModelSociatyTask) initSociatyTask(uid, sociatyId string) error { var taskList []*pb.SociatyTask list := ggt.GetDataList() + ggd := this.moduleSociaty.configure.GetGlobalConf() + if ggd == nil { + return errors.New("config not found") + } + // 大于4条配置 - if len(list) > 4 { + if len(list) > int(ggd.GuildTaskNum) { //随机4条任务 - randInts := utils.RandomNumbers(0, len(list)-1, 4) + randInts := utils.RandomNumbers(0, len(list)-1, int(ggd.GuildTaskNum)) for _, v := range randInts { taskList = append(taskList, &pb.SociatyTask{ TaskId: list[v].Id, diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 7d65642f1..e8619ff72 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -100,6 +100,7 @@ type GameGlobalData struct { GuildViceAllianceLeaderMaxNum int32 GuildAdministratorsMaxNum int32 GuildInitiateImpeachmentTime int32 + GuildTaskNum int32 GuildImpeachmentCountDown int32 GuildDissolutionCountDownCd int32 GuildDissolutionCd int32 @@ -356,6 +357,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { 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_TaskNum"].(float64); !_ok_ { err = errors.New("guild_TaskNum error"); return }; _v.GuildTaskNum = 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_) }