Add ground spawns to discovered items feature. (#2648)

* Add ground spawns to discovered items feature.

* Add {}
This commit is contained in:
Paul Coene 2022-12-16 16:11:58 -05:00 committed by GitHub
parent d9e5056657
commit f188c1394a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -535,6 +535,15 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
sender->PutItemInInventory(EQ::invslot::slotCursor, *m_inst, false);
sender->SendItemPacket(EQ::invslot::slotCursor, m_inst, ItemPacketTrade);
// Could be an undiscovered ground_spawn
if (m_ground_spawn && (RuleB(Character, EnableDiscoveredItems)))
{
if (!sender->GetGM() && !sender->IsDiscovered(item->ID))
{
sender->DiscoverItem(item->ID);
}
}
if(cursordelete) // delete the item if it's a duplicate lore. We have to do this because the client expects the item packet
sender->DeleteItemInInventory(EQ::invslot::slotCursor);