Issues in Manor

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
Zdenekhb
Posts: 18
Joined: Thu Jul 12, 2007 4:44 pm
Location: Czech Rep.

Issues in Manor

Post by Zdenekhb »

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

Problem consist in next period approve. When is next period approved, next seed and crop setting is set to 0.
Between 6am and 8pm can not use SET NEXT DAY Button, its ok, but after 8pm is every setting cleared by server.

What is Trouble Cause?

THX for help.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Issues in Manor

Post by _DS_ »

1. Castle vault may does not have sufficient adena.
2. Clan warehouse may does not have sufficient free slots for crops and seeds.

In both cases adena still taken from vault. Use //manor for debugging.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Zdenekhb
Posts: 18
Joined: Thu Jul 12, 2007 4:44 pm
Location: Czech Rep.

Re: Issues in Manor

Post by Zdenekhb »

ok but:

1. when i look into //manor manage panel after 6am, current setting is ok, next is cleared.
Castles have sufficient adena and clan have free CWH slots (btw i have caste for testing as admin, in Castle vault have 2B adena and manor cost 1,4B adena)

So. when i Shutdown gameserver console without saving into DB (click on close button on console window) and start server again, manor under //manor manage panel is set properly... is set current and next.

2. when looks into manor manager in town, current status is ok, but in next period is nothing :(
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Issues in Manor

Post by Gnacik »

Zdenekhb wrote:2. when looks into manor manager in town, current status is ok, but in next period is nothing :
Same problem here. 'Next' is always empty. Even if NextPeriod is Approved. Code for that is in L2ManorManagerInstance.java

Code: Select all

 case 3: // Current seeds (Manor info)  if (time == 1 && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())    player.sendPacket(new ExShowSeedInfo(castleId, null));  else    player.sendPacket(new ExShowSeedInfo(castleId, CastleManager.getInstance().getCastleById(castleId).getSeedProduction(time)));  break; 
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Issues in Manor

Post by Gnacik »

knock knock.. maybe someone with some java skill can fix that please ?

players can't check prices for next day and selling crops after maintenance is like a roulette.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Issues in Manor

Post by janiii »

does the problem persists with the instance manager fix from fordfrog?
http://www.l2jserver.com/old-forum/thre ... post204182
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Issues in Manor

Post by Gnacik »

yes. i must use that patch because ppls wanna kill me for non getting adena from taxes. :P

now they wanna kill me for not working 'next day' in manor :lol:

i try to found reason but without success. with //manor command use different combinations and change periods even if current prices and amounts are different from values for next day that list is empty ;<
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Issues in Manor

Post by Gnacik »

kk, i found it ! maybe now some dev can fix that ;)

i wake up today earlier and go to live to test because on test server its hard to test without data ;)

On 5:50 i change crop & seed prices for next day in Giran castle for tests.

6AM log file :
Manor System: Next period approved
Manor System: Manor period approve updated
Manor System: Next period approved
Manor System: Manor period approve updated
Manor System: New Schedule for period approve @ Sun May 10 06:00:51 CEST 2009
idk why two times but all working FINE !
Manor list for current & next are showing correct information. I talk with castle chamberlain and cannot manage manor (prices cannot be changed from 6AM to 8PM)

And now funny part. at 06:30 i have sheduled automatic DB Backup from cron & server restart. After restart "next" is not working again :? and I CAN change prices in castle chamberlain :shock:

Problem is with loading manor state on server start.
Zdenekhb
Posts: 18
Joined: Thu Jul 12, 2007 4:44 pm
Location: Czech Rep.

Re: Issues in Manor

Post by Zdenekhb »

maybye i have located problem with manor.

Problem is not in Manor system but in Clan Warehouse. If is increased CWH slots in config over 200 slots and look into CWH, CWH Shows constantly only retail 200 slots. Only show bad slot count. Using is limited to setting.

Example:

CWH slots is increased in config to 500
CWH ingame shows only 200 slots
If used slots overruns 200 slots (e.g. 250) CWH shows 250/200 (used/total)
In 6am manor system doing check for free slots in CWH and get bad data about free cwh slots and clear next period with reason "no free CWH slot, cwh is full)

Is needed fix CWH Bug with slot count.
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Issues in Manor

Post by Gnacik »

Problem is here:

Code: Select all

boolean isApproved = (_periodApprove.getTimeInMillis() < Calendar.getInstance().getTimeInMillis() &&_manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis());
If server start is after 6AM Period Approve is scheduled for next day and _periodApprove points to next day 6AM
Thats reason why isApproved is always false after 6am
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Issues in Manor

Post by _DS_ »

Code: Select all

if (_periodApprove.getTimeInMillis() > _manorRefresh.getTimeInMillis() ){ //approve already scheduled to the next day return _manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis();}else{  return (_periodApprove.getTimeInMillis() < Calendar.getInstance().getTimeInMillis() && _manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis())} 
Maybe something like this ?
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
piche666
Posts: 38
Joined: Sun Dec 21, 2008 8:27 pm

Re: Issues in Manor

Post by piche666 »

_DS_ wrote:

Code: Select all

if (_periodApprove.getTimeInMillis() > _manorRefresh.getTimeInMillis() ){ //approve already scheduled to the next day return _manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis();}else{  return (_periodApprove.getTimeInMillis() < Calendar.getInstance().getTimeInMillis() && _manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis())} 
Maybe something like this ?
I tried to put that code in all ways i could do in CastleManorManager.java where gnat told where was the problem but Eclipse always said:
Void methods cannot return a value
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Issues in Manor

Post by _DS_ »

This is just an idea for testing, not "plug and play" solution.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Issues in Manor

Post by _DS_ »

Here patch for testing:

Code: Select all

Index: java/net/sf/l2j/gameserver/instancemanager/CastleManorManager.java===================================================================--- java/net/sf/l2j/gameserver/instancemanager/CastleManorManager.java  (revision 2976)+++ java/net/sf/l2j/gameserver/instancemanager/CastleManorManager.java  (working copy)@@ -145,8 +145,15 @@        init(); // schedule all manor related events        _underMaintenance = false;        _disabled = !Config.ALLOW_MANOR;-       boolean isApproved = (_periodApprove.getTimeInMillis() < Calendar.getInstance().getTimeInMillis() &&-                              _manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis());++       boolean isApproved;+       if (_periodApprove.getTimeInMillis() > _manorRefresh.getTimeInMillis())+           // Next approve period already scheduled+           isApproved = (_manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis());+       else+           isApproved = (_periodApprove.getTimeInMillis() < Calendar.getInstance().getTimeInMillis() &&+                   _manorRefresh.getTimeInMillis() > Calendar.getInstance().getTimeInMillis());+        for (Castle c: CastleManager.getInstance().getCastles()) {            c.setNextPeriodApproved(isApproved);        } 
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
piche666
Posts: 38
Joined: Sun Dec 21, 2008 8:27 pm

Re: Issues in Manor

Post by piche666 »

I tested on live 3 days , and the 3 days the prices of the seeds appeared and no 0 adena price again.
Thxs DS =)
Post Reply