Now there is no drop for premium users at all but still works for users w/o premium.
Am I miss something or it's impossible to make it in this way?
Best Wishes
Update: Problem solved.
I used standard DropListScope Death but i made changes in IChanceMultiplierStrategy DEFAULT_STRATEGY and IAmountMultiplierStrategy DEFAULT_STRATEGY methods.
The trick was to add public property L2PcInstance killer (initialized before call getChanceMultiplier) and read data about premium using victim.killer in DEFAULT_STRATEGY
I present to your attention two options for the Hellbound location map
details in the archive
if you have larger effect files, you do not need to replace them
download
updates can be made behind the scenes, so if you catch a crit, post on the forum or download the archive, it may have already been fixed
additionally you can download
all la2 music from the latest version of the game 2025 download
the entire La2 ambisound from the latest version of the game 2025 download
Question
sylwuu
Hello,
i'm working on premium account and i need a little help.
I created a database table with premium account data and this data is loaded on player login.
As i saw in L2Attackable.java there is a method doItemDrop and line
deathItems = npcTemplate.calculateDrops(DropListScope.DEATH, this, player);
so i added
if (player.hasPremium()) { deathItems = npcTemplate.calculateDrops(DropListScope.PREMIUMDEATH, this, player); } else{ deathItems = npcTemplate.calculateDrops(DropListScope.DEATH, this, player); }
To DropListScope i added
PREMIUMDEATH((itemId, min, max, chance) -> new GeneralDropItem(itemId, min, max, chance, IAmountMultiplierStrategy.PREMIUMDROP, IChanceMultiplierStrategy.PREMIUMDROP), GroupedGeneralDropItem::new),
To IAmountMultiplierStrategy.java i added
IAmountMultiplierStrategy PREMIUMDROP = DEFAULT_STRATEGY(rates().getDeathDropAmountMultiplier() + rates().getDeathDropAmountMultiplier()/2);
To IChanceMultiplierStrategy.java added
IChanceMultiplierStrategy PREMIUMDROP = DEFAULT_STRATEGY(rates().getCorpseDropChanceMultiplier() + rates().getCorpseDropChanceMultiplier()/2);
Now there is no drop for premium users at all but still works for users w/o premium.
Am I miss something or it's impossible to make it in this way?
Best Wishes
Update: Problem solved.
I used standard DropListScope Death but i made changes in IChanceMultiplierStrategy DEFAULT_STRATEGY and IAmountMultiplierStrategy DEFAULT_STRATEGY methods.
The trick was to add public property L2PcInstance killer (initialized before call getChanceMultiplier) and read data about premium using victim.killer in DEFAULT_STRATEGY
0 answers to this question
Recommended Posts