Hello ragezone.
I am trying to use LeaderMS source and I found out that if I try to drop a item with a quantity of more then 1 then it will just drop one instead of showing me the window of 'How many would you like to drop'.
Example:
I was thinking that it has to do with my ItemMoveHandler but I am not sure.
Please help.
I am trying to use LeaderMS source and I found out that if I try to drop a item with a quantity of more then 1 then it will just drop one instead of showing me the window of 'How many would you like to drop'.
Example:
You must be registered to see links
I was thinking that it has to do with my ItemMoveHandler but I am not sure.
Code:
[COLOR=#CC7832]package [/COLOR][COLOR=#A9B7C6]handling.channel.handler[/COLOR][COLOR=#CC7832];[/COLOR][COLOR=#cc7832]
[/COLOR][COLOR=#cc7832]import [/COLOR]client.MapleClient[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832]import [/COLOR]client.inventory.MapleInventoryType[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832]import [/COLOR]handling.AbstractMaplePacketHandler[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832]import [/COLOR]server.AutobanManager[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832]import [/COLOR]server.MapleInventoryManipulator[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832]import [/COLOR]tools.data.input.SeekableLittleEndianAccessor[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832]
[/COLOR][COLOR=#cc7832]public class [/COLOR]ItemMoveHandler [COLOR=#cc7832]extends [/COLOR]AbstractMaplePacketHandler {
[COLOR=#629755][I]/**
[/I][/COLOR][COLOR=#629755][I] * Creates a new instance of ItemMoveHandler
[/I][/COLOR][COLOR=#629755][I] */
[/I][/COLOR][COLOR=#629755][I] [/I][/COLOR][COLOR=#cc7832]public [/COLOR][COLOR=#ffc66d]ItemMoveHandler[/COLOR]() {
}
[COLOR=#cc7832]public void [/COLOR][COLOR=#ffc66d]handlePacket[/COLOR](SeekableLittleEndianAccessor slea[COLOR=#cc7832], [/COLOR]MapleClient c) {
slea.readInt()[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] [/COLOR]MapleInventoryType type = MapleInventoryType.[I]getByType[/I](slea.readByte())[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] byte [/COLOR]src = ([COLOR=#cc7832]byte[/COLOR]) slea.readShort()[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] byte [/COLOR]dst = ([COLOR=#cc7832]byte[/COLOR]) slea.readShort()[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] long [/COLOR]checkq = slea.readShort()[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] short [/COLOR]quantity = ([COLOR=#cc7832]short[/COLOR])([COLOR=#cc7832]int[/COLOR])checkq[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] if [/COLOR](src < [COLOR=#6897bb]0 [/COLOR]&& dst > [COLOR=#6897bb]0[/COLOR]) {
MapleInventoryManipulator.[I]unequip[/I](c[COLOR=#cc7832], [/COLOR]src[COLOR=#cc7832], [/COLOR]dst)[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] [/COLOR]} [COLOR=#cc7832]else if [/COLOR](dst < [COLOR=#6897bb]0[/COLOR]) {
MapleInventoryManipulator.[I]equip[/I](c[COLOR=#cc7832], [/COLOR]src[COLOR=#cc7832], [/COLOR]dst)[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] [/COLOR]} [COLOR=#cc7832]else if [/COLOR](dst == [COLOR=#6897bb]0[/COLOR]) {
[COLOR=#cc7832]if [/COLOR](c.getPlayer().getInventory(type).getItem(src) == [COLOR=#cc7832]null[/COLOR]) [COLOR=#cc7832]return;
[/COLOR][COLOR=#cc7832] if [/COLOR](checkq > [COLOR=#6897bb]4000 [/COLOR]|| checkq < [COLOR=#6897bb]1[/COLOR]) {
AutobanManager.[I]getInstance[/I]().autoban(c[COLOR=#cc7832], [/COLOR][COLOR=#6a8759]"Drop-dupe ("[/COLOR]+c.getPlayer().getInventory(type).getItem(src).getItemId()+[COLOR=#6a8759]")."[/COLOR])[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] return;
[/COLOR][COLOR=#cc7832] [/COLOR]}
MapleInventoryManipulator.[I]drop[/I](c[COLOR=#cc7832], [/COLOR]type[COLOR=#cc7832], [/COLOR]src[COLOR=#cc7832], [/COLOR]quantity)[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] [/COLOR]} [COLOR=#cc7832]else [/COLOR]{
MapleInventoryManipulator.[I]move[/I](c[COLOR=#cc7832], [/COLOR]type[COLOR=#cc7832], [/COLOR]src[COLOR=#cc7832], [/COLOR]dst)[COLOR=#cc7832];
[/COLOR][COLOR=#cc7832] [/COLOR]}
}
[COLOR=#A9B7C6]}[/COLOR]
Please help.