From 82534af3c022078c39f6f0846a27cc6edd9e0ade Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 15 Oct 2024 14:44:30 +0800 Subject: [PATCH] 1 --- server/gameserver/pbutils.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/gameserver/pbutils.cc b/server/gameserver/pbutils.cc index 71df24f8..eb77364a 100644 --- a/server/gameserver/pbutils.cc +++ b/server/gameserver/pbutils.cc @@ -2948,6 +2948,9 @@ void CustomBattle::NotifyState() void Bag::UseItem(int equip_id) { + if (owner_->room->GetGasData().GetGasMode() == GasInactive) { + return; + } auto p = GetItemByEquipId(equip_id); if (p && p->equip_num > 0 && p->GetCdTime(owner_) <= 0 && p->equip_meta && p->potion_meta) { --p->equip_num;