Dear Guru's: Global drop with Params

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Dear Guru's: Global drop with Params

Post by jurchiks »

@mattjanes - you could optimise those IFs to this:

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)));    }}
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)?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
mattjanes
Posts: 30
Joined: Sun Jan 07, 2007 2:26 am

Re: Dear Guru's: Global drop with Params

Post by mattjanes »

Thanks Jurchiks,

So I guess spoils will probably be a no-go then I'll have to try and think up another way of doing something similar for all the spoils for mobs 1-10,11-20 etc to be the same without manually adding to all mobs.
Post Reply