[Fix] Item Handins to Pets (#4687)

* [Fix] Item handins to pets

* Update npc.cpp
This commit is contained in:
Chris Miles
2025-02-15 17:07:40 -06:00
committed by GitHub
parent e88ea24966
commit 8201175c2c
2 changed files with 9 additions and 7 deletions
+4 -4
View File
@@ -549,10 +549,10 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
}
}
auto with = tradingWith->CastToNPC();
const EQ::ItemData *item = inst->GetItem();
if (with->IsPetOwnerClient() && with->CanPetTakeItem(inst)) {
auto with = tradingWith->CastToNPC();
const EQ::ItemData *item = inst->GetItem();
const bool is_pet = with->IsPetOwnerClient() || with->IsCharmedPet();
if (is_pet && with->CanPetTakeItem(inst)) {
// pets need to look inside bags and try to equip items found there
if (item->IsClassBag() && item->BagSlots > 0) {
// if an item inside the bag can't be given to the pet, keep the bag