Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Loot] Remove unnecessary loot error messages. #2261

Merged
merged 4 commits into from Jun 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 7 additions & 12 deletions zone/client_packet.cpp
Expand Up @@ -9531,26 +9531,21 @@ void Client::Handle_OP_LootItem(const EQApplicationPacket *app)
return;
}

EQApplicationPacket* outapp = nullptr;
Entity* entity = entity_list.GetID(*((uint16*)app->pBuffer));
if (entity == 0) {
Message(Chat::Red, "Error: OP_LootItem: Corpse not found (ent = 0)");
outapp = new EQApplicationPacket(OP_LootComplete, 0);
auto* l = (LootingItem_Struct*) app->pBuffer;
auto entity = entity_list.GetID(static_cast<uint16>(l->lootee));
if (!entity) {
auto outapp = new EQApplicationPacket(OP_LootComplete, 0);
QueuePacket(outapp);
safe_delete(outapp);
return;
}

if (entity->IsCorpse()) {
entity->CastToCorpse()->LootItem(this, app);
return;
}
else {
Message(Chat::Red, "Error: Corpse not found! (!ent->IsCorpse())");
if (!entity->IsCorpse()) {
Corpse::SendEndLootErrorPacket(this);
return;
}

return;
entity->CastToCorpse()->LootItem(this, app);
}

void Client::Handle_OP_LootRequest(const EQApplicationPacket *app)
Expand Down