DeleteItemInInventory question
The Perl command $client->DeleteItemInInventory has three qualifiers after it. Slot_id, quantity, and client_update. The first two are self explanatory but what do you use for the third one to have it remove the item from inventory immediately?
Thanks, Mortow |
client_update is a bool, so you can use 0 or 1. I've noticed weirdness with 'true' and 'false', so use 0 for 'false' and 1 for 'true'.
|
The 'client_update' signifies whether to send the client an 'update' packet.
Either way, the result is immediate server-side. In this example: https://github.com/EQEmu/Server/comp...b663c1012bR328 ..the PutItemInInventory() call is followed by a SendItemPacket() call... Had I made it 'PutItemInInventory(free_slot, *inst, true);' I could have avoided the extra command. You really have to know what you're doing when using dealing with inventory shuffling, or you could end up with major desync's :mad: Hopefully, the new system will be a little more intuitive :smile: |
Thank you both for your answers. I have tried a 1 for true in it but the item remains in inventory until you pick it up then I get a sync message and the item disappears from my cursor. Is this normal or have I hosed something somewhere?
|
I was going to post an example..but, I couldn't find one for either put or delete in the scripts...
I don't want to speculate..but, it almost looks like the usage requires something else. Kingly posted this in chat.. Code:
Perl_croak(aTHX_ "Usage: Client::DeleteItemInInventory(THIS, slot_id, quantity= 0, client_update= false)"); It almost looks like your should use Code:
quest::DeleteItemInInventory($client, slot_id, quantity, bool); I just dunno :mad: |
Bit of a thread necro, but to clarify for others:
In Perl... $client->DeleteItemInInventory(252, 0, 1); Will delete ALL of the item found in slot 252. $client->DeleteItemInInventory(252, 1, 1); Will delete 1 of the item found in slot 252. For me, the client updates immediately when I use 1 for the last argument. Hope that helps! |
All times are GMT -4. The time now is 06:13 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.