diff --git a/server/gameserver/pbutils.cc b/server/gameserver/pbutils.cc index fcb53f1b..07dff54a 100644 --- a/server/gameserver/pbutils.cc +++ b/server/gameserver/pbutils.cc @@ -3020,5 +3020,14 @@ void Bag::InternalPushBagInfo() void Bag::UpdateItemNum(int item_id, int item_num) { - + auto p = GetItemById(item_id); + if (p) { + p->equip_num = item_num; + cs::SMUpdateBag notify_msg; + auto pb_item = notify_msg.add_items(); + pb_item->set_equip_id(p->equip_id); + pb_item->set_equip_num(p->equip_num); + pb_item->set_use_cd(p->GetCdTime(owner_)); + owner_->SendNotifyMsg(notify_msg); + } }