Page 2 of 2

Re: Castle Siege

Posted: Mon May 25, 2009 6:23 pm
by Bruteforce
I got this from GodKratos in old forum, not exactly the same, but close. Maybe it could do you some good?

Will let you set siege date any day/time you want, and it will be scheduled with 2 week intervals.

Code: Select all

Index: java/net/sf/l2j/gameserver/model/entity/Siege.java===================================================================--- java/net/sf/l2j/gameserver/model/entity/Siege.java  (revision 2968)+++ java/net/sf/l2j/gameserver/model/entity/Siege.java  (working copy)@@ -27,7 +27,6 @@ import javolution.util.FastList; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.Announcements;-import net.sf.l2j.gameserver.SevenSigns; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.datatables.ClanTable; import net.sf.l2j.gameserver.datatables.MapRegionTable;@@ -1024,14 +1023,6 @@            setNextSiegeDate();        }        -       if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))-       {-           // no sieges in Quest period! reschedule it to the next SealValidationPeriod-           // This is usually caused by server being down-           corrected = true;-           setNextSiegeDate();-       }-               if (corrected)            saveSiegeDate();    }@@ -1268,12 +1259,9 @@            if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY)                getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);            // set the next siege day to the next weekend-           getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);+           getCastle().getSiegeDate().setTimeInMillis(getCastle().getSiegeDate().getTimeInMillis() + 1209600000L);        }        -       if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))-           getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);-               _isRegistrationOver = false; // Allow registration for next siege    }     

Re: Castle Siege

Posted: Thu Jul 02, 2009 8:26 pm
by Saso
Bruteforce wrote:I got this from GodKratos in old forum, not exactly the same, but close. Maybe it could do you some good?

Will let you set siege date any day/time you want, and it will be scheduled with 2 week intervals.

Code: Select all

Index: java/net/sf/l2j/gameserver/model/entity/Siege.java===================================================================--- java/net/sf/l2j/gameserver/model/entity/Siege.java  (revision 2968)+++ java/net/sf/l2j/gameserver/model/entity/Siege.java  (working copy)@@ -27,7 +27,6 @@ import javolution.util.FastList; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.Announcements;-import net.sf.l2j.gameserver.SevenSigns; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.datatables.ClanTable; import net.sf.l2j.gameserver.datatables.MapRegionTable;@@ -1024,14 +1023,6 @@            setNextSiegeDate();        }        -       if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))-       {-           // no sieges in Quest period! reschedule it to the next SealValidationPeriod-           // This is usually caused by server being down-           corrected = true;-           setNextSiegeDate();-       }-               if (corrected)            saveSiegeDate();    }@@ -1268,12 +1259,9 @@            if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY)                getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);            // set the next siege day to the next weekend-           getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);+           getCastle().getSiegeDate().setTimeInMillis(getCastle().getSiegeDate().getTimeInMillis() + 1209600000L);        }        -       if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))-           getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);-               _isRegistrationOver = false; // Allow registration for next siege    }     

Are you saying that this patch will make Castle Sieges ignore the status of the seven signs?

Re: Castle Siege

Posted: Thu Jul 09, 2009 4:05 pm
by Notorious
That patch doesn't work anylonger since they changed the sieges.

This patch works though:

Code: Select all

Index: java/net/sf/l2j/gameserver/model/entity/Siege.java===================================================================--- java/net/sf/l2j/gameserver/model/entity/Siege.java	(revision 3222)+++ java/net/sf/l2j/gameserver/model/entity/Siege.java	(working copy)@@ -25,10 +25,8 @@ import java.util.logging.Logger;  import javolution.util.FastList;-import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.Announcements;-import net.sf.l2j.gameserver.SevenSigns; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.datatables.ClanTable; import net.sf.l2j.gameserver.datatables.MapRegionTable;@@ -1025,14 +1023,6 @@ 			setNextSiegeDate(); 		} -		if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))-		{-			// no sieges in Quest period! reschedule it to the next SealValidationPeriod-			// This is usually caused by server being down-			corrected = true;-			setNextSiegeDate();-		}-		 		if (corrected) 			saveSiegeDate(); 	}@@ -1268,17 +1258,10 @@ 		{ 			if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) 				getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);-			// from CT2.3 Castle sieges are on Sunday, but if server admins allow to set day of the siege-			// than sieges can occur on Saturdays as well-			if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY && !Config.CL_SET_SIEGE_TIME_LIST.contains("day"))-				getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); 			// set the next siege day to the next weekend-			getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);+			getCastle().getSiegeDate().setTimeInMillis(getCastle().getSiegeDate().getTimeInMillis() + 1209600000L); 		} -		if (!SevenSigns.getInstance().isDateInSealValidPeriod(getCastle().getSiegeDate()))-			getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);-		 		_isRegistrationOver = false; // Allow registration for next siege 	}  
What it does is that it lets you set a time and date for the sieges, and when a new time is to be scheduled, it will only add 2 weeks to previous time.

It's still the work of GodKratos. I just added to remove the latest changes to the sieges.

Re: Castle Siege

Posted: Sun Mar 07, 2010 5:27 pm
by JustLikeMe
Does this work for gracia final too?