From 4d2a136eca0e650ce43c95cf5497813bb471608f Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Wed, 31 Jul 2024 10:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=A5=96=E8=AE=B0=E5=BD=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/bagmgr.go | 6 ++---- worldsrv/shopmgr.go | 10 ---------- worldsrv/tournament.go | 1 + 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/worldsrv/bagmgr.go b/worldsrv/bagmgr.go index 02d0f00..db7f97b 100644 --- a/worldsrv/bagmgr.go +++ b/worldsrv/bagmgr.go @@ -329,8 +329,6 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int } //获奖记录log if logType == ItemObtain && v.ItemNum > 0 { - AwardLogMgr.UpdateAwardLog(p.Platform, item.Id, v.ItemNum) - awardLogType := 0 if item.Type == common.ItemTypeChange { //话费 @@ -338,6 +336,7 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int } else if item.Type == common.ItemTypeObjective { //实物 awardLogType = 2 + AwardLogMgr.UpdateAwardLog(p.Platform, item.Id, v.ItemNum) } if awardLogType != 0 { data := model.AnnouncerLog{ @@ -501,8 +500,6 @@ func (this *BagMgr) AddItemsOffline(platform string, snid int32, addItems []*Ite //获奖记录log if logType == ItemObtain && v.ItemNum > 0 { - AwardLogMgr.UpdateAwardLog(findPlayer.Platform, itemData.Id, v.ItemNum) - awardLogType := 0 if itemData.Type == common.ItemTypeChange { //话费 @@ -510,6 +507,7 @@ func (this *BagMgr) AddItemsOffline(platform string, snid int32, addItems []*Ite } else if itemData.Type == common.ItemTypeObjective { //实物 awardLogType = 2 + AwardLogMgr.UpdateAwardLog(findPlayer.Platform, itemData.Id, v.ItemNum) } if awardLogType > 0 { logData := model.AnnouncerLog{ diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index 65c80a1..88142c4 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -912,16 +912,6 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen pack.RetCode = shop.OpResultCode_OPRC_Sucess //兑换话费成功记录一下 if cdata.TelCharge > 0 { - /* itemId := int32(0) - if cdata.TelCharge == 1 { - itemId = 30008 - } else if cdata.TelCharge == 2 { - itemId = 30009 - } else if cdata.TelCharge == 5 { - itemId = 30010 - } else if cdata.TelCharge == 10 { - itemId = 30011 - }*/ item := srvdata.GameItemMgr.Get(p.Platform, cdata.ItemId) //已兑换记录 AwardLogMgr.UpdateAwardLog(p.Platform, item.Id, int64(1)) diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index f5e8ea5..c668c14 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -1290,6 +1290,7 @@ func (this *Tournament) sendPromotionInfo(mc *PlayerMatchContext, sortId int64, TypeId: int32(1), } AwardLogMgr.UpdateAnnouncerLog(awardLog) + AwardLogMgr.UpdateAwardLog(p.Platform, item.ItemId, 1) } }), fmt.Sprintf("RankAward%d", mc.p.SnId)).Start() }