Re: Dear Guru's: Global drop with Params
Posted: Sun Jun 29, 2014 3:25 pm
@mattjanes - you could optimise those IFs to this:
As far as I know, there is no way to set a monster's spoil drops in real time. Besides, there's a number of problems with doing that - what if the player does not have the ability to sweep the monster, or what if the player has spoiled the monster himself (you could fuck up the actual spoil data)?
Code: Select all
if (di.dropChance > getRandom(1000000)){ if (di.isSpoil) { // ... } else { monster.dropItem(event.getAttacker().getActingPlayer(), new ItemHolder(di.itemId, getRandom(di.minCount, di.maxCount))); }}