[Bug Fix] Fix Item Discovery (#4663)

* [Bug Fix] Fix Item Discovery for Pickups, Evolving, Fishing, and Forage

* Push

* Caching

* Update tradeskills.cpp

* Update task_client_state.cpp
This commit is contained in:
Alex King
2025-02-09 22:25:43 -05:00
committed by GitHub
parent 9e07d90664
commit f3a2f97155
10 changed files with 66 additions and 81 deletions
+2 -15
View File
@@ -1623,21 +1623,8 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
// safe to ACK now
c->QueuePacket(app);
if (!IsPlayerCorpse()) {
if (RuleB(Character, EnableDiscoveredItems) && c && !c->IsDiscovered(inst->GetItem()->ID)) {
if (!c->GetGM()) {
c->DiscoverItem(inst->GetItem()->ID);
} else {
const std::string& item_link = database.CreateItemLink(inst->GetItem()->ID);
c->Message(
Chat::White,
fmt::format(
"Your GM flag prevents {} from being added to discovered items.",
item_link
).c_str()
);
}
}
if (!IsPlayerCorpse() && c) {
c->CheckItemDiscoverability(inst->GetID());
}
if (zone->adv_data) {