Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2014, 09:56 PM
Mortow's Avatar
Mortow
Hill Giant
 
Join Date: Apr 2013
Posts: 215
Default 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
Reply With Quote
  #2  
Old 08-22-2014, 10:34 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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'.
Reply With Quote
  #3  
Old 08-22-2014, 10:46 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

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


Hopefully, the new system will be a little more intuitive
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #4  
Old 08-22-2014, 10:49 PM
Mortow's Avatar
Mortow
Hill Giant
 
Join Date: Apr 2013
Posts: 215
Default

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?
Reply With Quote
  #5  
Old 08-22-2014, 11:41 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

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);
- or however perl does it.


I just dunno
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #6  
Old 01-29-2015, 01:53 AM
Noren
Fire Beetle
 
Join Date: Nov 2014
Posts: 1
Default

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!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:00 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3