EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   Fix for Loot 'getting stuck' on LootErrorPackets (https://www.eqemulator.org/forums/showthread.php?t=19377)

Dakaar 09-16-2005 01:10 PM

Fix for Loot 'getting stuck' on LootErrorPackets
 
Hey all. So After trying to loot multiple items off a pvp corpse, I got a "error: you cannot loot anymore items from this corpse" then the client would get bugged.

The client stays connected but cannot target or manipulate his UI such as inventory etc.

The problem is that the packet does not get queue'd because these error cases return before the packet is sent at the end of the function. Simply Queue the packet to the client before returning and your looting should be bug-free

ie: in playercorpse.cpp around line 836

if(IsPlayerCorpse() && (charid != client->CharacterID()) && CanMobLoot(client->CharacterID()) && GetPKItem()==0){
client->Message(13, "Error: You cannot loot any more items from this corpse.");
SendEndLootErrorPacket(client);
BeingLootedBy = 0xFFFFFFFF;
+ client->QueuePacket(app);
return;
}


Add the client->QueuePacket(app); before the return, and the client wont get stuck any longer.

A better way to do this would be to have SendEndLootErrorPacket take app as a argument and have it queue the packet somewhere in the function.


All times are GMT -4. The time now is 12:24 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.