From 981d1bc1daa9d2fda50453d4fa4c92ceb07d9311 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 14 Nov 2022 11:14:32 +0800 Subject: [PATCH 1/2] update --- modules/pagoda/model_rank.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/modules/pagoda/model_rank.go b/modules/pagoda/model_rank.go index b91d952a3..e3d9424eb 100644 --- a/modules/pagoda/model_rank.go +++ b/modules/pagoda/model_rank.go @@ -36,31 +36,6 @@ func (this *ModelRank) Init(service core.IService, module core.IModule, comp cor return } -func (this *ModelRank) AddRank(uId string, data *pb.DBPagodaRecord) (err error) { - if err = this.Add(uId, data); err != nil { - //this.Errorf("err:%v", err) - return - } - return nil -} - -//获取用户通过扩展表 -// func (this *ModelRank) GetUserRandData(uid string) (result *pb.DBPagodaRecord, err error) { -// result = &pb.DBPagodaRecord{} -// if err = this.Get(uid, result); err != nil && redis.RedisNil != err { -// return -// } -// err = nil -// return result, err -// } - -func (this *ModelRank) ChangeUserRank(uid string, value map[string]interface{}) (err error) { - if len(value) == 0 { - return nil - } - return this.Change(uid, value) -} - func (this *ModelRank) GetRankData() (data []*pb.DBPagodaRecord, err error) { data = make([]*pb.DBPagodaRecord, 0) if conn, err := db.Cross(); err == nil { @@ -243,12 +218,6 @@ func (this *ModelRank) SetNormalPagodaRankList(tableName string, score int32, ui } func (this *ModelRank) seasonSettlement() { - - list := this.modulePagoda.configure.GetPagodaSeasonReward() - if list == nil { - return - } - rankReward := this.modulePagoda.configure.GetPagodaSeasonReward() if rankReward == nil { return From 05c1cbf323d36d37842c290d748cf86c3e3ae914 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 14 Nov 2022 11:14:42 +0800 Subject: [PATCH 2/2] update --- modules/gm/api_cmd.go | 4 +++- modules/timer/season.go | 15 +++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/modules/gm/api_cmd.go b/modules/gm/api_cmd.go index 2c351ca53..8ab578dcf 100644 --- a/modules/gm/api_cmd.go +++ b/modules/gm/api_cmd.go @@ -10,14 +10,16 @@ import ( /* GM 在控制台输入的字符串类型 //bingo:item,10001,1 //bingo:attr,gold,1000000 +//bingo:equi,xxx,1 // xxx 装备id 2、修改主线关卡进度:bingo:mapid,102(102代表关卡位置) 3、修改心魔塔进度:bingo:pataid,10(10代表层数) -4、修改玩家经验值:bingo:exp,1000(1000代表新增的经验值 // +4、修改玩家经验值:bingo:attr,exp,1000(1000代表新增的经验值 // 5、跳过随机任务 bingo:rtask,1,1001 6、bingo:Iamyoudad +7、bingo:vip,yueka_1,1 // 月卡类型 */ //参数校验 func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) { diff --git a/modules/timer/season.go b/modules/timer/season.go index 21613d2a3..bbad5be11 100644 --- a/modules/timer/season.go +++ b/modules/timer/season.go @@ -59,7 +59,9 @@ func (this *SeasonPagoda) Start() (err error) { configure.RegisterConfigure(game_seasonreward, cfg.NewGamePagodaSeasonReward, nil) cron.AddFunc("0 0 23 L * ?", this.TimerSeasonOver) //每月最后一天23点执行一次 cron.AddFunc("0 0 5 /* * ?", this.TimerSeasonStar) //每月第一天5点执行一次 - + if db.IsCross() { + return + } conn, err := db.Cross() if err == nil { model := db.NewDBModel(comm.TableServerData, 0, conn) @@ -86,18 +88,7 @@ func (this *SeasonPagoda) Start() (err error) { return } -func (this *SeasonPagoda) CreatTestData(index int) { - seasonPagoda := &pb.DBPagoda{} - seasonPagoda.Id = primitive.NewObjectID().Hex() - seasonPagoda.Uid = "dfmxf_634f8f28609d489230fb40fa" - seasonPagoda.PagodaId = int32(index) // 初始数据0层 - seasonPagoda.Type = 201 // TODO 新的塔数据根据配置文件获取 - if err := this.Add(seasonPagoda.Uid, seasonPagoda); err != nil { - this.module.Errorf("err:%v", err) - return - } -} func (this *SeasonPagoda) GetSeasonReward() []int32 { sz := make([]int32, 0) if v, err := this.GetConfigure(game_seasonreward); err != nil {