Jump to content
  • 0

Where toChange Pdef, Mdef, Crit.Rate?


Question

Posted

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

  • 0
Posted (edited)

Override the methods on PlayerStat, or edit them directly here if override version already exists.

 

Regarding the "per classe", either store everything on a map (fast but performance hungry) or store it on each PlayerTemplate (slow to edit but best performance)

Edited by Tryskell

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock