diff --git a/zone/npc.cpp b/zone/npc.cpp index b1f6a00ac..7d13a68b8 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -4272,11 +4272,13 @@ bool NPC::CanPetTakeItem(const EQ::ItemInstance *inst) return false; } - if (!IsPetOwnerClient()) { + if (!IsPetOwnerClient() && !IsCharmedPet()) { return false; } - const bool can_take_nodrop = RuleB(Pets, CanTakeNoDrop) || inst->GetItem()->NoDrop != 0; + const bool can_take_nodrop = (RuleB(Pets, CanTakeNoDrop) || inst->GetItem()->NoDrop != 0) + || inst->GetItem()->NoRent == 0; + const bool is_charmed_with_attuned = IsCharmed() && inst->IsAttuned(); auto o = GetOwner() && GetOwner()->IsClient() ? GetOwner()->CastToClient() : nullptr; @@ -4297,7 +4299,7 @@ bool NPC::CanPetTakeItem(const EQ::ItemInstance *inst) for (const auto &c : checks) { if (c.condition) { if (o) { - o->Message(Chat::PetResponse, c.message.c_str()); + o->Message(Chat::PetResponse, fmt::format("{} says '{}'", GetCleanName(), c.message).c_str()); } return false; } diff --git a/zone/trading.cpp b/zone/trading.cpp index fc3fe1ba0..94273db7f 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -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