From 1d99e5f794ec2ca5fdfeee3c0f4f0e325b62cd25 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Thu, 4 Jul 2024 16:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A0=E7=89=A9=E6=8A=80=E8=83=BD=E7=BA=A2?= =?UTF-8?q?=E7=82=B9=20=E8=A1=A5=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/constant.go | 1 + worldsrv/bagmgr.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/common/constant.go b/common/constant.go index b228c6f..ba42396 100644 --- a/common/constant.go +++ b/common/constant.go @@ -597,6 +597,7 @@ const ( ItemIDSlippers = 100010 // 拖鞋 ItemIDPermit = 100011 // 赛季通行证积分 ItemIDLong = 50013 // 龙币 + ItemIDPetSkill = 11001 //宠物技能升级道具 ) func ToItemId(id int32) int32 { diff --git a/worldsrv/bagmgr.go b/worldsrv/bagmgr.go index 10620a1..9624bf8 100644 --- a/worldsrv/bagmgr.go +++ b/worldsrv/bagmgr.go @@ -290,6 +290,10 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int Num: v.ItemNum, }) } + + if v.ItemId == common.ItemIDPetSkill && v.ItemNum > 0 { + PetMgrSington.CheckShowRed(p) + } } if len(changeItems) > 0 {