From 2e34c337686fa4e2f65e37c64a80c72bfaf5de53 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 2 Jul 2024 20:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E5=AD=A3=E9=80=9A=E8=A1=8C=E8=AF=81?= =?UTF-8?q?=E8=B4=A6=E5=8F=98=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/constant.go | 4 ++-- model/message.go | 1 + model/player.go | 3 +-- worldsrv/action_welfare.go | 4 ++-- worldsrv/permitmgr.go | 2 +- worldsrv/player.go | 4 ++++ 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/common/constant.go b/common/constant.go index 2f35173..730ae3d 100644 --- a/common/constant.go +++ b/common/constant.go @@ -287,8 +287,8 @@ const ( GainWaySign7Add = 91 // 累计签到进阶奖励获得 GainWayItemChange = 92 //背包内使用道具兑换话费 GainWayPetSkillLevelUp = 93 //宠物技能升级 - GainWayPermitAward = 94 // 赛季通行证普通奖励 - GainWayPermitAwardSupper = 95 // 赛季通行证典藏奖励 + GainWayPermitAward = 94 // 赛季通行证奖励 + GainWayItemPermitRank = 95 // 赛季通行证排行奖励 GainWayPermitExchangeCost = 96 // 赛季通行证兑换消耗 GainWayPermitExchangeGain = 97 // 赛季通行证兑换获得 GainWayItemTaskPermit = 98 // 赛季通行证任务 diff --git a/model/message.go b/model/message.go index 8894614..b8e99e4 100644 --- a/model/message.go +++ b/model/message.go @@ -38,6 +38,7 @@ const ( MSGTYPE_ITEM //获取道具 MSGTYPE_RANK_REWARD //排行榜奖励 MSGTYPE_ITEM_CHANGE //背包使用兑换 + MSGTYPE_RANK_PermitReward // 通行证排行奖励 ) const ( diff --git a/model/player.go b/model/player.go index b6cabe2..00339ae 100644 --- a/model/player.go +++ b/model/player.go @@ -110,8 +110,7 @@ const ( SystemFreeGive_GiveType_TaskAchievement // 成就任务 SystemFreeGive_GiveType_TaskEveryDay // 每日任务 SystemFreeGive_GiveType_TaskWeekActive // 周活跃奖励 - SystemFreeGive_GiveType_PermitAward // 赛季通行证普通奖励 - SystemFreeGive_GiveType_PermitAwardSupper // 赛季通行证典藏奖励 + SystemFreeGive_GiveType_PermitAward // 赛季通行证奖励 SystemFreeGive_GiveType_TaskPermit // 赛季通行证任务 ) const ( diff --git a/worldsrv/action_welfare.go b/worldsrv/action_welfare.go index 13d5533..6f950b9 100644 --- a/worldsrv/action_welfare.go +++ b/worldsrv/action_welfare.go @@ -539,8 +539,8 @@ func SendPermitReward(p *Player, m map[int64]int64, tp int32) { gain = common.GainWayPermitAward giveType = model.SystemFreeGive_GiveType_PermitAward case 2: - gain = common.GainWayPermitAwardSupper - giveType = model.SystemFreeGive_GiveType_PermitAwardSupper + gain = common.GainWayPermitAward + giveType = model.SystemFreeGive_GiveType_PermitAward } BagMgrSingleton.AddItems(p, items, 0, gain, "system", "通行证奖励", 0, 0, false) for _, v := range items { diff --git a/worldsrv/permitmgr.go b/worldsrv/permitmgr.go index 6a8d655..f7adf96 100644 --- a/worldsrv/permitmgr.go +++ b/worldsrv/permitmgr.go @@ -108,7 +108,7 @@ func (r *PermitMgr) OnDayTimer() { task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { title := i18n.Tr("languages", "PermitAwardTitle") content := i18n.Tr("languages", "PermitAward", []int{rank, rank, rank, rank}) - newMsg = model.NewMessage("", 0, "", curPlayer.SnId, model.MSGTYPE_RANK_REWARD, + newMsg = model.NewMessage("", 0, "", curPlayer.SnId, model.MSGTYPE_RANK_PermitReward, title, content, 0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", items, platform, model.HallTienlen, nil) err := model.InsertMessage(platform, newMsg) if err != nil { diff --git a/worldsrv/player.go b/worldsrv/player.go index aa9051f..2aeeb75 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -1216,6 +1216,10 @@ func (this *Player) GetMessageAttach(id string) { remark = "排位赛段位奖励" gainWay = common.GainWay_RankMatch addItem() + case model.MSGTYPE_RANK_PermitReward: + remark = "通行证排行奖励" + gainWay = common.GainWayItemPermitRank + addItem() } if msg.Coin > 0 { this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark)