diff --git a/bin/json/game_global.json b/bin/json/game_global.json index a1b8c1553..80cefbaaf 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -154,11 +154,15 @@ "viking_reset": 1, "kungfu_time": 30, "dreamland_fightnum": 30, + "dreamland_recovery": 60, + "dreamland_cos": 1, "dreamland_resettime": 0, "dreamland_limit_time": 30, "dreamland_share_time": 300, "dreamland_triggernum": 20, "hunting_num": 10, + "hunting_recovery": 60, + "hunting_cos": 1, "hunting_reset": 1, "hunting_cap": [ 25001, @@ -209,7 +213,9 @@ "guild_BuildCd": 1, "ArenaTicket_max": 10, "ArenaTicket_RecoveryTime": 144, + "ArenaTicket_cos": 1, "VikingExpedition_RecoveryTime": 144, + "VikingExpedition_cos": 1, "ArenaTicket_PurchaseRrestrictions": 10, "arena_InitiaIntegral": 1000, "arena_RecordMax": 10, @@ -276,6 +282,19 @@ "run_horsetime2": 10, "boy_headPortrait": "action_44006", "girl_headPortrait": "action_11011", - "namecolor": "#000080" + "namecolor": "#000080", + "skillGetLocation": [ + 114 + ], + "DrawCard_RechargeReward": [ + 648, + 30 + ], + "DrawCard_RegressionReward": [ + 7, + 10 + ], + "DrawCard_ContinuousRestriction_Star5": 20, + "DrawCard_ContinuousRestriction_Camp": 2 } ] \ No newline at end of file diff --git a/modules/moonfantasy/api_battle.go b/modules/moonfantasy/api_battle.go index e9ef1b129..ab0a6b961 100644 --- a/modules/moonfantasy/api_battle.go +++ b/modules/moonfantasy/api_battle.go @@ -28,7 +28,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle defer func() { if cd == pb.ErrorCode_Success { this.module.modelUserMF.Change(session.GetUserId(), map[string]interface{}{ - "battleNum": umfantasy.BattleNum, + "ticket": umfantasy.Ticket, }) this.module.modelDream.ChangeList("", mdata.Id, map[string]interface{}{ "record": mdata.Record, @@ -80,10 +80,10 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle if umfantasy, err = this.module.modelUserMF.queryUsermfantasy(session.GetUserId()); err != nil { cd = pb.ErrorCode_CacheReadError } - if umfantasy.BattleNum <= 0 { + if umfantasy.Ticket < this.module.configure.GetGlobalConf().DreamlandCos { cd = pb.ErrorCode_MoonfantasyNotEnoughbattles } - umfantasy.BattleNum-- + umfantasy.Ticket -= this.module.configure.GetGlobalConf().DreamlandCos if boss, err = this.module.configure.GetMonsterById(mdata.Monster); err != nil { cd = pb.ErrorCode_ConfigNoFound return diff --git a/modules/moonfantasy/api_buy.go b/modules/moonfantasy/api_buy.go index a930c09d8..d53cd5020 100644 --- a/modules/moonfantasy/api_buy.go +++ b/modules/moonfantasy/api_buy.go @@ -20,7 +20,7 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.MoonfantasyBuyR ///询问怪物是否可以挑战 func (this *apiComp) Buy(session comm.IUserSession, req *pb.MoonfantasyBuyReq) (code pb.ErrorCode, data proto.Message) { var ( - umfantasy *pb.DBUserMFantasy + info *pb.DBUserMFantasy challengeD *cfg.GameDreamlandChallengeData need []*cfg.Gameatn err error @@ -28,13 +28,14 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.MoonfantasyBuyReq) ( if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success { return } - if umfantasy, err = this.module.modelUserMF.queryUsermfantasy(session.GetUserId()); err != nil && err != mgo.MongodbNil { + if info, err = this.module.modelUserMF.queryUsermfantasy(session.GetUserId()); err != nil && err != mgo.MongodbNil { code = pb.ErrorCode_CacheReadError return } + this.module.modelUserMF.recoverTicket(info) need = make([]*cfg.Gameatn, 0) for i := int32(0); i < req.BuyNum; i++ { - if challengeD, err = this.module.configure.GetchallengeData(umfantasy.BuyNum + i + 1); err != nil { + if challengeD, err = this.module.configure.GetchallengeData(info.BuyNum + i + 1); err != nil { code = pb.ErrorCode_ConfigNoFound return } @@ -48,12 +49,12 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.MoonfantasyBuyReq) ( if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success { return } - umfantasy.BuyNum += req.BuyNum - umfantasy.BattleNum += req.BuyNum + info.BuyNum += req.BuyNum + info.Ticket += req.BuyNum this.module.modelUserMF.Change(session.GetUserId(), map[string]interface{}{ - "buyNum": umfantasy.BuyNum, - "battleNum": umfantasy.BattleNum, + "buyNum": info.BuyNum, + "ticket": info.Ticket, }) - session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: umfantasy.BattleNum}) + session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Ticket}) return } diff --git a/modules/moonfantasy/api_getlist.go b/modules/moonfantasy/api_getlist.go index fe94aa871..718201e88 100644 --- a/modules/moonfantasy/api_getlist.go +++ b/modules/moonfantasy/api_getlist.go @@ -4,9 +4,6 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - cfg "go_dreamfactory/sys/configure/structs" - "time" "google.golang.org/protobuf/proto" ) @@ -20,34 +17,23 @@ func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.Moonfantasy ///获取用户秘境列表 func (this *apiComp) Getlist(session comm.IUserSession, req *pb.MoonfantasyGetListReq) (code pb.ErrorCode, data proto.Message) { var ( - err error - globalconf *cfg.GameGlobalData - umfantasy *pb.DBUserMFantasy - mfantasys []*pb.DBMoonFantasy = make([]*pb.DBMoonFantasy, 0) + err error + info *pb.DBUserMFantasy + mfantasys []*pb.DBMoonFantasy = make([]*pb.DBMoonFantasy, 0) ) - if umfantasy, err = this.module.modelUserMF.queryUsermfantasy(session.GetUserId()); err != nil && err != mgo.MongodbNil { + if info, err = this.module.modelUserMF.queryUsermfantasy(session.GetUserId()); err != nil && err != mgo.MongodbNil { code = pb.ErrorCode_CacheReadError return } - globalconf = this.module.configure.GetGlobalConf() - if time.Unix(umfantasy.LastTrigger, 0).Day() != configure.Now().Day() { - umfantasy.TriggerNum = 0 - umfantasy.LastTrigger = configure.Now().Unix() - umfantasy.BuyNum = 0 - if umfantasy.BattleNum < globalconf.DreamlandFightnum { - umfantasy.BattleNum = globalconf.DreamlandFightnum - } - this.module.modelUserMF.Change(session.GetUserId(), map[string]interface{}{ - "triggerNum": umfantasy.TriggerNum, - "lastTrigger": umfantasy.LastTrigger, - "buyNum": umfantasy.BuyNum, - "battleNum": umfantasy.BattleNum, - }) + this.module.modelUserMF.recoverTicket(info) + if err = this.module.modelUserMF.updateUserInfo(info); err != nil { + code = pb.ErrorCode_DBError + return } mfantasys, err = this.module.modelDream.querymfantasys(session.GetUserId()) session.SendMsg(string(this.module.GetType()), "getlist", &pb.MoonfantasyGetListResp{ - BattleNum: umfantasy.BattleNum, - BuyNum: umfantasy.BuyNum, + BattleNum: info.Ticket, + BuyNum: info.BuyNum, Dfantasys: mfantasys, }) return diff --git a/modules/moonfantasy/modelDream.go b/modules/moonfantasy/modelDream.go index 85c1cf02f..cad3c3822 100644 --- a/modules/moonfantasy/modelDream.go +++ b/modules/moonfantasy/modelDream.go @@ -100,15 +100,7 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) { if umfantasy, err = this.module.modelUserMF.queryUsermfantasy(session.GetUserId()); err != nil { return } - - if time.Unix(umfantasy.LastTrigger, 0).Day() != configure.Now().Day() { - umfantasy.TriggerNum = 0 - umfantasy.LastTrigger = configure.Now().Unix() - umfantasy.BuyNum = 0 - if umfantasy.BattleNum < globalconf.DreamlandFightnum { - umfantasy.BattleNum = globalconf.DreamlandFightnum - } - } + this.module.modelUserMF.recoverTicket(umfantasy) if umfantasy.TriggerNum >= globalconf.DreamlandTriggernum { return } @@ -127,13 +119,7 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) { } // umfantasy.Mfantasys = append(umfantasy.Mfantasys, mdata.Id) umfantasy.TriggerNum++ - this.module.modelUserMF.Change(session.GetUserId(), map[string]interface{}{ - // "mfantasys": umfantasy.Mfantasys, - "triggerNum": umfantasy.TriggerNum, - "lastTrigger": umfantasy.LastTrigger, - "buyNum": umfantasy.BuyNum, - "battleNum": umfantasy.BattleNum, - }) + this.module.modelUserMF.updateUserInfo(umfantasy) chat = &pb.DBChat{ Ctype: pb.ChatType_Moonfantasy, Suid: session.GetUserId(), diff --git a/modules/moonfantasy/modelUserMF.go b/modules/moonfantasy/modelUserMF.go index 5063e94b6..70d70dc14 100644 --- a/modules/moonfantasy/modelUserMF.go +++ b/modules/moonfantasy/modelUserMF.go @@ -6,6 +6,9 @@ import ( "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + "math" + "time" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" @@ -47,3 +50,41 @@ func (this *modelUserMF) queryUsermfantasy(uId string) (fantasy *pb.DBUserMFanta } return } + +///保存用户竞技场信息 +func (this *modelUserMF) updateUserInfo(info *pb.DBUserMFantasy) (err error) { + this.Change(info.Uid, map[string]interface{}{ + "triggerNum": info.TriggerNum, + "ticket": info.Ticket, + "buyNum": info.BuyNum, + "lastTrigger": info.LastTrigger, + "lastrtickettime": info.Lastrtickettime, + }) + return +} + +func (this *modelUserMF) recoverTicket(info *pb.DBUserMFantasy) { + var ( + duration time.Duration + ticketNum int32 + ) + if time.Unix(info.LastTrigger, 0).Day() < configure.Now().Day() { + info.TriggerNum = 0 + info.LastTrigger = configure.Now().Unix() + info.BuyNum = 0 + } + global := this.module.configure.GetGlobalConf() + if info.Ticket < global.DreamlandFightnum && info.Lastrtickettime > 0 { + duration = configure.Now().Sub(time.Unix(info.Lastrtickettime, 0)) + ticketNum = int32(math.Floor(duration.Minutes() / float64(global.ArenaTicketRecoveryTime))) + if ticketNum > 0 { + info.Ticket += ticketNum + if info.Ticket > global.ArenaTicketMax { + info.Ticket = global.ArenaTicketMax + info.Lastrtickettime = 0 + } else { + info.Lastrtickettime = time.Unix(info.Lastrtickettime, 0).Add(time.Duration(ticketNum) * time.Minute).Unix() + } + } + } +} diff --git a/pb/moonfantasy_db.pb.go b/pb/moonfantasy_db.pb.go index 35e0859e4..10e732ac5 100644 --- a/pb/moonfantasy_db.pb.go +++ b/pb/moonfantasy_db.pb.go @@ -209,12 +209,13 @@ type DBUserMFantasy struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id - TriggerNum int32 `protobuf:"varint,3,opt,name=triggerNum,proto3" json:"triggerNum" bson:"triggerNum"` // 月之秘境触发次数 - BattleNum int32 `protobuf:"varint,4,opt,name=battleNum,proto3" json:"battleNum" bson:"battleNum"` // 月之秘境挑战次数 - BuyNum int32 `protobuf:"varint,5,opt,name=buyNum,proto3" json:"buyNum" bson:"buyNum"` // 月之秘境挑战次数 - LastTrigger int64 `protobuf:"varint,6,opt,name=lastTrigger,proto3" json:"lastTrigger" bson:"lastTrigger"` // 月之秘境最后触发时间 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id + TriggerNum int32 `protobuf:"varint,3,opt,name=triggerNum,proto3" json:"triggerNum" bson:"triggerNum"` // 月之秘境触发次数 + Ticket int32 `protobuf:"varint,4,opt,name=ticket,proto3" json:"ticket"` //@go_tags(`bson:"ticket"`)挑战券 + BuyNum int32 `protobuf:"varint,5,opt,name=buyNum,proto3" json:"buyNum" bson:"buyNum"` // 月之秘境挑战次数 + LastTrigger int64 `protobuf:"varint,6,opt,name=lastTrigger,proto3" json:"lastTrigger" bson:"lastTrigger"` // 月之秘境最后触发时间 + Lastrtickettime int64 `protobuf:"varint,7,opt,name=lastrtickettime,proto3" json:"lastrtickettime" bson:"lastrtickettime"` // 最后回复劵时间 } func (x *DBUserMFantasy) Reset() { @@ -270,9 +271,9 @@ func (x *DBUserMFantasy) GetTriggerNum() int32 { return 0 } -func (x *DBUserMFantasy) GetBattleNum() int32 { +func (x *DBUserMFantasy) GetTicket() int32 { if x != nil { - return x.BattleNum + return x.Ticket } return 0 } @@ -291,6 +292,13 @@ func (x *DBUserMFantasy) GetLastTrigger() int64 { return 0 } +func (x *DBUserMFantasy) GetLastrtickettime() int64 { + if x != nil { + return x.Lastrtickettime + } + return 0 +} + var File_moonfantasy_moonfantasy_db_proto protoreflect.FileDescriptor var file_moonfantasy_moonfantasy_db_proto_rawDesc = []byte{ @@ -321,19 +329,21 @@ var file_moonfantasy_moonfantasy_db_proto_rawDesc = []byte{ 0x6f, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x4d, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xce, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x46, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75, - 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, - 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, + 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0f, 0x6c, + 0x61, 0x73, 0x74, 0x72, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x74, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index b82e4b2f7..c98bea8e5 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -77,11 +77,15 @@ type GameGlobalData struct { VikingReset int32 KungfuTime int32 DreamlandFightnum int32 + DreamlandRecovery int32 + DreamlandCos int32 DreamlandResettime int32 DreamlandLimitTime int32 DreamlandShareTime int32 DreamlandTriggernum int32 HuntingNum int32 + HuntingRecovery int32 + HuntingCos int32 HuntingReset int32 HuntingCap []int32 GameTime []int32 @@ -107,7 +111,9 @@ type GameGlobalData struct { GuildBuildCd int32 ArenaTicketMax int32 ArenaTicketRecoveryTime int32 + ArenaTicketCos int32 VikingExpeditionRecoveryTime int32 + VikingExpeditionCos int32 ArenaTicketPurchaseRrestrictions int32 ArenaInitiaIntegral int32 ArenaRecordMax int32 @@ -127,6 +133,11 @@ type GameGlobalData struct { BoyHeadPortrait string GirlHeadPortrait string Namecolor string + SkillGetLocation []int32 + DrawCardRechargeReward []int32 + DrawCardRegressionReward []int32 + DrawCardContinuousRestrictionStar5 int32 + DrawCardContinuousRestrictionCamp int32 } const TypeId_GameGlobalData = 477542761 @@ -267,11 +278,15 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["viking_reset"].(float64); !_ok_ { err = errors.New("viking_reset error"); return }; _v.VikingReset = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["kungfu_time"].(float64); !_ok_ { err = errors.New("kungfu_time error"); return }; _v.KungfuTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_fightnum"].(float64); !_ok_ { err = errors.New("dreamland_fightnum error"); return }; _v.DreamlandFightnum = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_recovery"].(float64); !_ok_ { err = errors.New("dreamland_recovery error"); return }; _v.DreamlandRecovery = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_cos"].(float64); !_ok_ { err = errors.New("dreamland_cos error"); return }; _v.DreamlandCos = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_resettime"].(float64); !_ok_ { err = errors.New("dreamland_resettime error"); return }; _v.DreamlandResettime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_limit_time"].(float64); !_ok_ { err = errors.New("dreamland_limit_time error"); return }; _v.DreamlandLimitTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_share_time"].(float64); !_ok_ { err = errors.New("dreamland_share_time error"); return }; _v.DreamlandShareTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_triggernum"].(float64); !_ok_ { err = errors.New("dreamland_triggernum error"); return }; _v.DreamlandTriggernum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hunting_num"].(float64); !_ok_ { err = errors.New("hunting_num error"); return }; _v.HuntingNum = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hunting_recovery"].(float64); !_ok_ { err = errors.New("hunting_recovery error"); return }; _v.HuntingRecovery = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hunting_cos"].(float64); !_ok_ { err = errors.New("hunting_cos error"); return }; _v.HuntingCos = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hunting_reset"].(float64); !_ok_ { err = errors.New("hunting_reset error"); return }; _v.HuntingReset = int32(_tempNum_) } { var _arr_ []interface{} @@ -375,7 +390,9 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { 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_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_max"].(float64); !_ok_ { err = errors.New("ArenaTicket_max error"); return }; _v.ArenaTicketMax = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_RecoveryTime"].(float64); !_ok_ { err = errors.New("ArenaTicket_RecoveryTime error"); return }; _v.ArenaTicketRecoveryTime = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_cos"].(float64); !_ok_ { err = errors.New("ArenaTicket_cos error"); return }; _v.ArenaTicketCos = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["VikingExpedition_RecoveryTime"].(float64); !_ok_ { err = errors.New("VikingExpedition_RecoveryTime error"); return }; _v.VikingExpeditionRecoveryTime = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["VikingExpedition_cos"].(float64); !_ok_ { err = errors.New("VikingExpedition_cos error"); return }; _v.VikingExpeditionCos = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_PurchaseRrestrictions"].(float64); !_ok_ { err = errors.New("ArenaTicket_PurchaseRrestrictions error"); return }; _v.ArenaTicketPurchaseRrestrictions = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["arena_InitiaIntegral"].(float64); !_ok_ { err = errors.New("arena_InitiaIntegral error"); return }; _v.ArenaInitiaIntegral = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["arena_RecordMax"].(float64); !_ok_ { err = errors.New("arena_RecordMax error"); return }; _v.ArenaRecordMax = int32(_tempNum_) } @@ -499,6 +516,50 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; if _v.BoyHeadPortrait, _ok_ = _buf["boy_headPortrait"].(string); !_ok_ { err = errors.New("boy_headPortrait error"); return } } { var _ok_ bool; if _v.GirlHeadPortrait, _ok_ = _buf["girl_headPortrait"].(string); !_ok_ { err = errors.New("girl_headPortrait error"); return } } { var _ok_ bool; if _v.Namecolor, _ok_ = _buf["namecolor"].(string); !_ok_ { err = errors.New("namecolor error"); return } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["skillGetLocation"].([]interface{}); !_ok_ { err = errors.New("skillGetLocation error"); return } + + _v.SkillGetLocation = 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.SkillGetLocation = append(_v.SkillGetLocation, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["DrawCard_RechargeReward"].([]interface{}); !_ok_ { err = errors.New("DrawCard_RechargeReward error"); return } + + _v.DrawCardRechargeReward = 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.DrawCardRechargeReward = append(_v.DrawCardRechargeReward, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["DrawCard_RegressionReward"].([]interface{}); !_ok_ { err = errors.New("DrawCard_RegressionReward error"); return } + + _v.DrawCardRegressionReward = 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.DrawCardRegressionReward = append(_v.DrawCardRegressionReward, _list_v_) + } + } + + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["DrawCard_ContinuousRestriction_Star5"].(float64); !_ok_ { err = errors.New("DrawCard_ContinuousRestriction_Star5 error"); return }; _v.DrawCardContinuousRestrictionStar5 = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["DrawCard_ContinuousRestriction_Camp"].(float64); !_ok_ { err = errors.New("DrawCard_ContinuousRestriction_Camp error"); return }; _v.DrawCardContinuousRestrictionCamp = int32(_tempNum_) } return }