Page 1 of 1

MP Regen Tick

Posted: Wed Mar 10, 2010 10:51 pm
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?

Re: MP Regen Tick

Posted: Sun Mar 14, 2010 6:30 am
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. ).