okay so the problems lies when you die, lets say you have 20 dragon bones in your inventory. un noted ones. and you die.
you go back to where you died to loot back your dragon bones and theres only one dragon bone there. if you spam click it you can pick up probably 5-6 of them.
when you teleport away and teleport back there is one there again, rinse and repeat until you have looted all 20 (weather its one at a time or 5-6 at a time you still only get the original 20)
so i know its in my reloaditems method, but i cant seem to figure out whats going on, any idea? compairsons of working ones?
heres mine:
[SPOIL]
Code:
public void reloadItems(Client c) {
for(GroundItem i : items) {
if(c != null){
if (c.getItems().tradeable(i.getItemId()) || i.getName().equalsIgnoreCase(c.playerName)) {
if (c.distanceToPoint(i.getItemX(), i.getItemY()) <= 60) {
if(i.hideTicks > 0 && i.getName().equalsIgnoreCase(c.playerName)) {
c.getItems().removeGroundItem(i.getItemId(), i.getItemX(), i.getItemY(), i.getItemAmount());
c.getItems().createGroundItem(i.getItemId(), i.getItemX(), i.getItemY(), i.getItemAmount());
}
if(i.hideTicks == 0) {
c.getItems().removeGroundItem(i.getItemId(), i.getItemX(), i.getItemY(), i.getItemAmount());
c.getItems().createGroundItem(i.getItemId(), i.getItemX(), i.getItemY(), i.getItemAmount());
}
}
}
}
}
}
[/SPOIL]