From fc05bd3ee55f703cb592fc28316cb1ffb0be450a Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 15 Oct 2024 08:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=B5=A0=E9=80=81=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/player.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worldsrv/player.go b/worldsrv/player.go index 52282dc..422de51 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -1122,15 +1122,17 @@ func (this *Player) GetMessageAttach(id string) { } if tp != -1 { - giveType := gainWay + giveType := int32(-1) switch gainWay { case common.GainWayItemPermitRank: giveType = model.SystemFreeGive_GiveType_TaskPermitRank case common.GainWayClientUpgrade: giveType = model.SystemFreeGive_ClientUpgrade } - mq.Write(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel, - giveType, tp, msg.Params[i+1])) + if giveType != -1 && msg.Oper == 0 && !this.IsRob { + mq.Write(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel, + giveType, tp, msg.Params[i+1])) + } } } BagMgrSingleton.AddItems(&model.AddItemParam{