From dccbdde57f0e060e1bff6bd14829774fae19c0ae Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Sun, 23 Apr 2023 15:24:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E5=B0=8F=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=20=E7=8E=A9=E6=B3=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_global.json | 22 ++++-------- bin/json/game_item.json | 44 +++++++++++++++++++++++- bin/json/game_skillafteratk.json | 4 +-- modules/user/api_changetips.go | 8 ++++- modules/user/api_puzzleaward.go | 4 +-- pb/user_db.pb.go | 2 +- sys/configure/structs/game.globalData.go | 19 ++-------- 7 files changed, 63 insertions(+), 40 deletions(-) diff --git a/bin/json/game_global.json b/bin/json/game_global.json index edd6f3ae3..bef80c771 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -658,7 +658,11 @@ "pandamas_tiguandiaoxiang_cd": 10, "Max_breakingbad_recipe": 15, "puzzlePromptNum": 5, - "Daily_Tips": 3, + "Daily_Tips": { + "a": "item", + "t": "151001", + "n": 1 + }, "Daily_Num": 2, "Week_Num": 2, "fitnessModelId": "25001", @@ -716,20 +720,6 @@ "n": 1000 } ], - "buzkashi_resurrection": 10, - "favorability_attenuation": [ - { - "k": 3, - "v": 1000 - }, - { - "k": 6, - "v": 800 - }, - { - "k": 9, - "v": 500 - } - ] + "buzkashi_resurrection": 10 } ] \ No newline at end of file diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 69c0a7839..01dc9b30b 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -8297,7 +8297,49 @@ "key": "sd_ing_141001", "text": "缺少流通货币" }, - "sale": [], + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "synthetize_deplete": [], + "decompose_deplete": [] + }, + { + "id": "151001", + "name": { + "key": "item_name_151001", + "text": "提示道具" + }, + "usetype": 15, + "color": 4, + "bagtype": 0, + "index": 99, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "box_id": 0, + "synthetize_num": 0, + "access": [ + 107 + ], + "use_skip": 166, + "upper_limit": -1, + "img": "icon_mcs", + "intr": { + "key": "item_name_151001", + "text": "缺少提示道具" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], "synthetize_deplete": [], "decompose_deplete": [] } diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index 4ccff658b..34b8a779a 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -7817,13 +7817,13 @@ "EmitPR": 1000, "From": 1, "Where": [], - "Order": "", + "Order": "PropertyUp=3", "Limit": 2, "ExecuteCnt": 1, "Type": 5, "Argu": [ 1, - 1, + 2, 50 ], "FollowSK": [], diff --git a/modules/user/api_changetips.go b/modules/user/api_changetips.go index 60213a505..9e540505d 100644 --- a/modules/user/api_changetips.go +++ b/modules/user/api_changetips.go @@ -3,6 +3,7 @@ package user import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" ) //参数校验 @@ -17,7 +18,12 @@ func (this *apiComp) ChangeTips(session comm.IUserSession, req *pb.UserChangeTip update := make(map[string]interface{}, 0) if sign, err := this.module.modelSign.GetUserSign(session.GetUserId()); err == nil { - sign.Tips = req.Tips + if conf := this.module.ModuleTools.GetGlobalConf().DailyTips; conf.N > 0 { + if code = this.module.ConsumeRes(session, []*cfg.Gameatn{conf}, true); code != pb.ErrorCode_Success { + return + } + } + sign.Tips += 1 // 记录总的提示次数 update["tips"] = sign.Tips this.module.modelSign.Change(session.GetUserId(), update) diff --git a/modules/user/api_puzzleaward.go b/modules/user/api_puzzleaward.go index f9d4a82bb..2768c9368 100644 --- a/modules/user/api_puzzleaward.go +++ b/modules/user/api_puzzleaward.go @@ -22,7 +22,7 @@ func (this *apiComp) PuzzleAward(session comm.IUserSession, req *pb.UserPuzzleAw code = pb.ErrorCode_DBError return } - if sign.Puzzle[req.Index] != 1 { + if sign.Puzzle[req.Index] != 0 { code = pb.ErrorCode_ReqParameterError return } @@ -33,7 +33,7 @@ func (this *apiComp) PuzzleAward(session comm.IUserSession, req *pb.UserPuzzleAw } } - sign.Puzzle[req.Index] = 2 + sign.Puzzle[req.Index] = 1 if err = this.module.modelSign.Change(session.GetUserId(), map[string]interface{}{ "puzzle": sign.Puzzle, }); err != nil { diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 10ca45045..09d033333 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -541,7 +541,7 @@ type DBSign struct { SignCount int32 `protobuf:"varint,4,opt,name=signCount,proto3" json:"signCount" bson:"signCount"` //玩家累计签到次数 Group int32 `protobuf:"varint,5,opt,name=group,proto3" json:"group"` //记录循环签到值 Day int32 `protobuf:"varint,6,opt,name=day,proto3" json:"day"` // 今天是这个月第几天 - Puzzle []int32 `protobuf:"varint,7,rep,packed,name=puzzle,proto3" json:"puzzle" bson:"puzzle"` //拼图游戏完成情况 // 0 未签到 1 已签到 2 玩了游戏 + Puzzle []int32 `protobuf:"varint,7,rep,packed,name=puzzle,proto3" json:"puzzle" bson:"puzzle"` //拼图游戏完成情况 // 0 没玩游戏 1 玩了游戏 Tips int32 `protobuf:"varint,8,opt,name=tips,proto3" json:"tips"` // 提示次数 } diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 76dc46387..6caf569fc 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -199,7 +199,7 @@ type GameGlobalData struct { PandamasTiguandiaoxiangCd int32 MaxBreakingbadRecipe int32 PuzzlePromptNum int32 - DailyTips int32 + DailyTips *Gameatn DailyNum int32 WeekNum int32 FitnessModelId string @@ -222,7 +222,6 @@ type GameGlobalData struct { BuzkashiVintegral []*Gameatn BuzkashiFintegral []*Gameatn BuzkashiResurrection int32 - FavorabilityAttenuation []*Gamekv } const TypeId_GameGlobalData = 477542761 @@ -836,7 +835,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pandamas_tiguandiaoxiang_cd"].(float64); !_ok_ { err = errors.New("pandamas_tiguandiaoxiang_cd error"); return }; _v.PandamasTiguandiaoxiangCd = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Max_breakingbad_recipe"].(float64); !_ok_ { err = errors.New("Max_breakingbad_recipe error"); return }; _v.MaxBreakingbadRecipe = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["puzzlePromptNum"].(float64); !_ok_ { err = errors.New("puzzlePromptNum error"); return }; _v.PuzzlePromptNum = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Daily_Tips"].(float64); !_ok_ { err = errors.New("Daily_Tips error"); return }; _v.DailyTips = int32(_tempNum_) } + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["Daily_Tips"].(map[string]interface{}); !_ok_ { err = errors.New("Daily_Tips error"); return }; if _v.DailyTips, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Daily_Num"].(float64); !_ok_ { err = errors.New("Daily_Num error"); return }; _v.DailyNum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Week_Num"].(float64); !_ok_ { err = errors.New("Week_Num error"); return }; _v.WeekNum = int32(_tempNum_) } { var _ok_ bool; if _v.FitnessModelId, _ok_ = _buf["fitnessModelId"].(string); !_ok_ { err = errors.New("fitnessModelId error"); return } } @@ -911,20 +910,6 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_resurrection"].(float64); !_ok_ { err = errors.New("buzkashi_resurrection error"); return }; _v.BuzkashiResurrection = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["favorability_attenuation"].([]interface{}); !_ok_ { err = errors.New("favorability_attenuation error"); return } - - _v.FavorabilityAttenuation = make([]*Gamekv, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ *Gamekv - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGamekv(_x_); err != nil { return } } - _v.FavorabilityAttenuation = append(_v.FavorabilityAttenuation, _list_v_) - } - } - return }