PDA

View Full Version : $client->NukeItem() crash


noudess
03-02-2015, 02:14 PM
Using $client->NukeItem() from a quest where the item being nuked resides in the client's bank crashes client every time.

I have tested only on Titanium client.

Uleat
03-02-2015, 06:10 PM
The client doesn't like its bank slots being directly manipulated..or, at least the way that we do it.

Pretty sure it's expecting a bank->cursor or cursor->bank action.


(You can see some of the hack code in resync function that I attempted to use some time ago...)

NatedogEZ
03-02-2015, 09:44 PM
You are better off checking if the item is in a valid slot before deleting it. Like Uleat said anything that is deleted from the bank.. just auto-crashes the client.

I would use... this function it is nice for removing items from valid inventory slots as long as you use it correctly :)

$client->DeleteItemInInventory(slot, count, 1);


Deleting items from cursor / cursor bag is also a bit glitchy as well fyi :) (doesnt crash though)

Uleat
03-02-2015, 10:39 PM
I changed the behavior of 'HasItem' recently to ignore buffered cursor items for that exact reason...

If an item was found beyond the ItemInstQueue::front(), MainCursor was still returned and any item on the visible cursor would be deleted :/

The client ignores the 'Limbo' range for most checks, including lore, so that update should help with cursor-related glitches.

noudess
03-03-2015, 10:06 AM
The code I am writing need to clear some items from anywhere before allowing a certain turn in. I ended up doing a Collectitems(itemid,1) for all non worn/inv slots and then if has_item turns up more, I tell the player they need to destroy those items before they are allowed to turn in.