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
It's impossible to explain things to someone completely stupid like you.
You really are very dumb; I never imagined someone with such severe psychological issues could exist on a forum.
You should go to a doctor immediately, as this stupidity might be contagious to others.
You should feel ashamed. 🤣🤣🤣🤣🤣🤣🤣🤣
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/bDVQYKMUb3
https://campsite.bio/utchihaamkt
2 clients:
StyleA: Original client
test1: Unity client
Monster kills are displayed correctly on both clients. Soon it will be possible to kill mobs in a party on 2 different clients
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