Buff duration > 24 hours?

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
Topicus
Posts: 17
Joined: Wed Nov 10, 2010 7:31 pm

Buff duration > 24 hours?

Post 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.
Maylorian
Posts: 23
Joined: Sun Sep 09, 2012 11:01 am

Re: Buff duration > 24 hours?

Post 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
Last edited by Maylorian on Fri Sep 28, 2012 6:42 pm, edited 1 time in total.
Topicus
Posts: 17
Joined: Wed Nov 10, 2010 7:31 pm

Re: Buff duration > 24 hours?

Post by Topicus »

will try, thanks!
Topicus
Posts: 17
Joined: Wed Nov 10, 2010 7:31 pm

Re: Buff duration > 24 hours?

Post 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?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Buff duration > 24 hours?

Post by MELERIX »

I remeber client have a limit to show duration, and you can't change that.
Topicus
Posts: 17
Joined: Wed Nov 10, 2010 7:31 pm

Re: Buff duration > 24 hours?

Post by Topicus »

I figured that, just wanted to make sure. Thanks MELERIX.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Buff duration > 24 hours?

Post 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.
Image
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Buff duration > 24 hours?

Post by MELERIX »

ofc you can, I'm just talking about "time limitation" for the icon in client :P
Post Reply