mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-23 19:02:25 +00:00
[Loot] Remove unnecessary loot error messages. (#2261)
* [Loot] Remove unnecessary loot error messages. These messages are only sent when you loot a corpse that is mid-decay (i.e. no items and you go to loot it immediately) or if you try to loot a non-corpse entity. The ent != 0 shows up a lot if you're trying to loot too quickly and really isn't an error, the server just hasn't caught up to decay the corpse before you try to loot. * Use preexisting struct. * Remove newline. * Update client_packet.cpp
This commit is contained in:
parent
b2658a6cbc
commit
be00aa1b60
@ -9531,26 +9531,21 @@ void Client::Handle_OP_LootItem(const EQApplicationPacket *app)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EQApplicationPacket* outapp = nullptr;
|
auto* l = (LootingItem_Struct*) app->pBuffer;
|
||||||
Entity* entity = entity_list.GetID(*((uint16*)app->pBuffer));
|
auto entity = entity_list.GetID(static_cast<uint16>(l->lootee));
|
||||||
if (entity == 0) {
|
if (!entity) {
|
||||||
Message(Chat::Red, "Error: OP_LootItem: Corpse not found (ent = 0)");
|
auto outapp = new EQApplicationPacket(OP_LootComplete, 0);
|
||||||
outapp = new EQApplicationPacket(OP_LootComplete, 0);
|
|
||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity->IsCorpse()) {
|
if (!entity->IsCorpse()) {
|
||||||
entity->CastToCorpse()->LootItem(this, app);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Message(Chat::Red, "Error: Corpse not found! (!ent->IsCorpse())");
|
|
||||||
Corpse::SendEndLootErrorPacket(this);
|
Corpse::SendEndLootErrorPacket(this);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
entity->CastToCorpse()->LootItem(this, app);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::Handle_OP_LootRequest(const EQApplicationPacket *app)
|
void Client::Handle_OP_LootRequest(const EQApplicationPacket *app)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user