Page 1 of 1

Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 1:51 pm
by Topicus
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number: 5662 (trunk)
L2JDP Revision Number: 9216 (trunk)

I tried increasing buff duration in a custom skill to 30 days (Abnormaltime ==> 2592000 seconds), but on receive buff, the effect simply show-up and finish. Then i tried to reduce to 10 days (Abnormaltime ==> 864000 seconds). Effect works, but in buff bar the effect show only 24 hour remaining time and decreasing.

My question is:
1st: the 30 days dont working is related to int lenght limit?
2nd: Why remaining time only show 24 hours and decreasing even if abnormaltime is greater than 86400? How to change?
3rd: how can i solve this? I wish to give 30 days buffs in these custom skills.

Thanks.

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 3:36 pm
by Maylorian
you can set the buffs not to an int but to a long variable. if you will use long keep in mind that you will have to add an "L" at the end of the number. otherwise you will get an error

in l2Effect.java find this:

Code: Select all

private final int _abnormalTime;
and try this:

Code: Select all

private final long _abnormalTime;
but you will have to change all of your buff times and a L to the end

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 3:49 pm
by Topicus
will try, thanks!

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 7:09 pm
by Topicus
Maylorian wrote:you can set the buffs not to an int but to a long variable. if you will use long keep in mind that you will have to add an "L" at the end of the number. otherwise you will get an error

in l2Effect.java find this:

Code: Select all

private final int _abnormalTime;
and try this:

Code: Select all

private final long _abnormalTime;
but you will have to change all of your buff times and a L to the end
What about remaining time issue? Any other suggestion pp?

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 7:47 pm
by MELERIX
I remeber client have a limit to show duration, and you can't change that.

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 7:51 pm
by Topicus
I figured that, just wanted to make sure. Thanks MELERIX.

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 9:00 pm
by UnAfraid
MELERIX wrote:I remeber client have a limit to show duration, and you can't change that.
864000000 = 24h in milliseconds
2147483647 = Integer.MAX_VALUE (Even signed, but network protocol supports unsigned so twice long ^^)
So theoretically it should be possible to get 24h buffs time.

Re: Buff duration > 24 hours?

Posted: Fri Sep 28, 2012 9:10 pm
by MELERIX
ofc you can, I'm just talking about "time limitation" for the icon in client :P