• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Same Item ID drop for 1 Mob

Junior Spellweaver
Joined
Dec 21, 2013
Messages
140
Reaction score
3
Hello ~

I've been trying to get 1 mob to drop multiple items with the same ID.

Example:
Mob = Snail
Drops = Snail Shell x4

In the SQL Table:
id | mobid | itemid | chance
1 | 100100 | 4000019 | 1
2 | 100100 | 4000019 | 1
3 | 100100 | 4000019 | 1
4 | 100100 | 4000019 | 1

The only problem is it always only drops 1 Snail Shell instead of the intended 4.
I'm assuming it's not the "chance" column problem since a Snail Shell drops after every kill.
It seems to drop one of every item, but never a repeated ID.

EDIT: I have tried different items, but it only drops the first item on the list and ignores the other ones

Anyone have any ideas on how to make it drop multiple items with the same ID?

Thanks in advance!
 
Last edited:
Junior Spellweaver
Joined
Dec 21, 2013
Messages
140
Reaction score
3
I'm going to respect this suggestion and just go for it, and as expected, nothing appears from drops now :D

Thank you for the suggestion though.


EDIT: Fixed! Just used a alternative mob that supports multiple drops. Thank you!
 
Last edited:
Upvote 0
Skilled Illusionist
Joined
Jul 17, 2010
Messages
333
Reaction score
165
Perhaps, there's a check that prevents from dropping the same item.
something like
Code:
List<Integer> drops = new ArrayList<>();
//bla bla
if (!drops.contains(itemId)) {
    drops.add(itemId);
}

or
Set<Integer> drops = new HashSet<>();
//bla bla
drops.add(itemId);

or
Map<Integer, Object> drops = new HashMap<>();
//bla bla
drops.put(itemId, XXXXX);
 
Upvote 0
Back
Top