MP Regen Tick

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
Post Reply
razzly
Posts: 16
Joined: Sat Jul 11, 2009 5:34 pm

MP Regen Tick

Post by razzly »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:

As I noticed in core Ticks are defined in Formulas
private static final int HP_REGENERATE_PERIOD = 3000; // 3 secs
My goal is to make tick 1 sec and it is only applicable when player is not on the olympiad. But when I change
HP_REGENERATE_PERIOD to 1000 it will be added even on olympiad.

How to make it normal at oly?
KuchikiKouga
Posts: 5
Joined: Thu Mar 11, 2010 1:12 am

Re: MP Regen Tick

Post by KuchikiKouga »

Make it tick every 1000 ms as you did, and add a line inside calcMpRegen fuctnion:

if(activeChar.isInOlympiadMode())
mpreg *= 0.33;

You basically counter the 3x frequency with a 1/3 effect.

Other way:

If you want the period to change, you gotta stop the task that regenerates and then start it again with the new period. ( havent tested it, not sure about it. But i think its inside charStatus. ).
Post Reply