Hello everyone. I am making my own balance system on Acis, and i got stuck on changing Pdef, Mdef, CritRate. I need to multiply calculated Pdef, Mdef or CritRate on activeChar based on his class. I found getPdef() function in CreatureStat.java.
public int getPDef(Creature target)
{
return (int) calcStat(Stats.POWER_DEFENCE, _activeChar.getTemplate().getBasePDef() * ((_activeChar.isRaid()) ? Config.RAID_DEFENCE_MULTIPLIER : 1), target, null);
}
But then i multiply this return, it also applies on targets. So how do i make it apply only on players based on class?
Https://lineage2dex.com
Discord link : https://discord.com/channels/786506979493281794/814778540893536307/1424434670690504874
## Dexters!
**Our x25 server is celebrating its first week!**
🔥 Online stays strong at peak levels! New players are joining every day, with 200+ new master accounts registered daily — amazing results!
✨ Tomorrow we launch a new episode along with the first event. Full details will be shared in the morning(October 6).
🎁 And for this little celebration, here’s a bonus code with a small gift for you!
## O05-IIW
**Contains: **
* x3 - Training Potion 200% (20 min)
* x200 - Mana Potions Loyatly (no weight)
*The code will remain active until October 6, 7 AM(server time). And be sure, you have at less 20 slots free on inv before using a code.*
**👉 How to redeem:**
1. Log in to your Master Account on site.
2. Click the Redeem Bonus Code button at the top of the panel, type code click redeem.
3. Select the account and character you want to receive the gift.
**Codes work only 1 time for 1 Master Account!**
### Enjoy your adventure, Dexters!
Question
dobriux
Hello everyone. I am making my own balance system on Acis, and i got stuck on changing Pdef, Mdef, CritRate. I need to multiply calculated Pdef, Mdef or CritRate on activeChar based on his class. I found getPdef() function in CreatureStat.java.
public int getPDef(Creature target) { return (int) calcStat(Stats.POWER_DEFENCE, _activeChar.getTemplate().getBasePDef() * ((_activeChar.isRaid()) ? Config.RAID_DEFENCE_MULTIPLIER : 1), target, null); }
But then i multiply this return, it also applies on targets. So how do i make it apply only on players based on class?
Sorry for very bad english.
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now