浏览代码

configurable max mercenaries, thx Sleek

janiii 14 年之前
父节点
当前提交
f272173e39

+ 18 - 0
L2_GameServer/java/com/l2jserver/Config.java

@@ -299,6 +299,15 @@ public final class Config
 	public static int CS_SUPPORT2_FEE;
 	public static int CS_SUPPORT3_FEE;
 	public static int CS_SUPPORT4_FEE;
+	public static int GLUDIO_MAX_MERCENARIES;
+	public static int DION_MAX_MERCENARIES;
+	public static int GIRAN_MAX_MERCENARIES;
+	public static int OREN_MAX_MERCENARIES;
+	public static int ADEN_MAX_MERCENARIES;
+	public static int INNADRIL_MAX_MERCENARIES;
+	public static int GODDARD_MAX_MERCENARIES;
+	public static int RUNE_MAX_MERCENARIES;
+	public static int SCHUTTGART_MAX_MERCENARIES;
 	public static List<String> CL_SET_SIEGE_TIME_LIST;
 	public static List<Integer> SIEGE_HOUR_LIST_MORNING;
 	public static List<Integer> SIEGE_HOUR_LIST_AFTERNOON;
@@ -1248,6 +1257,15 @@ public final class Config
 					CH_FRONT1_FEE = Integer.parseInt(Feature.getProperty("ClanHallFrontPlatformFunctionFeeLvl1", "1300"));
 					CH_FRONT2_FEE = Integer.parseInt(Feature.getProperty("ClanHallFrontPlatformFunctionFeeLvl2", "4000"));
 					
+					GLUDIO_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("GludioMaxMercenaries", "100"));
+					DION_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("DionMaxMercenaries", "150"));
+					GIRAN_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("GiranMaxMercenaries", "200"));
+					OREN_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("OrenMaxMercenaries", "300"));
+					ADEN_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("AdenMaxMercenaries", "400"));
+					INNADRIL_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("InnadrilMaxMercenaries", "400"));
+					GODDARD_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("GoddardMaxMercenaries", "400"));
+					RUNE_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("RuneMaxMercenaries", "400"));
+					SCHUTTGART_MAX_MERCENARIES = Integer.parseInt(Feature.getProperty("SchuttgartMaxMercenaries", "400"));
 					
 					CL_SET_SIEGE_TIME_LIST = new ArrayList<String>();
 					SIEGE_HOUR_LIST_MORNING = new ArrayList<Integer>();

+ 10 - 9
L2_GameServer/java/com/l2jserver/gameserver/instancemanager/MercTicketManager.java

@@ -24,6 +24,7 @@ import java.util.logging.Logger;
 
 import javolution.util.FastList;
 
+import com.l2jserver.Config;
 import com.l2jserver.L2DatabaseFactory;
 import com.l2jserver.gameserver.datatables.NpcTable;
 import com.l2jserver.gameserver.idfactory.IdFactory;
@@ -81,15 +82,15 @@ public class MercTicketManager
 	
 	//TODO: not retail like: clan lvl 5 - 30 ticks max, lvl 7+ - 50 max
 	private static final int[] MERCS_MAX_PER_CASTLE = {
-		100, // Gludio
-		150, // Dion
-		200, // Giran
-		300, // Oren
-		400, // Aden
-		400, // Innadril
-		400, // Goddard
-		400, // Rune
-		400 // Schuttgart
+		Config.GLUDIO_MAX_MERCENARIES, //default 100
+		Config.DION_MAX_MERCENARIES,   //default 150
+		Config.GIRAN_MAX_MERCENARIES,  //default 200
+		Config.OREN_MAX_MERCENARIES,   //default 300
+		Config.ADEN_MAX_MERCENARIES,   //default 400
+		Config.INNADRIL_MAX_MERCENARIES, //default 400
+		Config.GODDARD_MAX_MERCENARIES,  //default 400
+		Config.RUNE_MAX_MERCENARIES,     //default 400
+		Config.SCHUTTGART_MAX_MERCENARIES //default 400
 	};
 	
 	private static final int[] ITEM_IDS = {

+ 10 - 1
L2_GameServer/java/config/siege.properties

@@ -69,6 +69,7 @@ GludioFlameTower2=-19329,108154,-2384,13004,10000
 GludioControlTower1=-18325,112811,-2377,13002,10000
 GludioControlTower2=-18048,107098,-2378,13002,10000
 GludioControlTower3=-18113,108597,-2343,13002,10000
+GludioMaxMercenaries = 100
 
 # Giran
 GiranArtefact1=117950,145096,-2547,32768,35147
@@ -77,6 +78,7 @@ GiranFlameTower2=117768,143880,-2451,13004,10000
 GiranControlTower1=113115,144829,-2446,13002,10000
 GiranControlTower2=118828,145106,-2447,13002,10000
 GiranControlTower3=117329,145041,-2412,13002,10000
+GiranMaxMercenaries = 200
 
 # Dion
 DionArtefact1=22073,161778,-2674,49152,35105
@@ -85,6 +87,7 @@ DionFlameTower2=23289,161596,-2578,13004,10000
 DionControlTower1=22285,156939,-2571,13002,10000
 DionControlTower2=22008,162652,-2572,13002,10000
 DionControlTower3=22073,161153,-2537,13002,10000
+DionMaxMercenaries = 150
 
 # Oren
 OrenArtefact1=8402,37191,-2274,32768,35189
@@ -93,6 +96,7 @@ OrenFlameTower2=83844,35975,-2178,13004,10000
 OrenControlTower1=79193,36977,-2167,13002,10000
 OrenControlTower2=84906,37254,-2168,13002,10000
 OrenControlTower3=83407,37189,-2133,13002,10000
+OrenMaxMercenaries = 300
 
 # Aden
 AdenArtefact1=147463,1529,-373,16384,35233
@@ -101,6 +105,7 @@ AdenFlameTower2=144955,1603,-450,13004,10000
 AdenControlTower1=148774,2351,-389,13002,10000
 AdenControlTower2=147456,5724,158,13002,10000
 AdenControlTower3=146137,2352,-389,13002,10000
+AdenMaxMercenaries = 400
 
 # Innadril
 InnadrilArtefact1=116024,250557,-770,-16384,35279
@@ -109,6 +114,7 @@ InnadrilFlameTower2=117240,250375,-674,13004,10000
 InnadrilControlTower1=116236,245718,-667,13002,10000
 InnadrilControlTower2=115959,251431,-667,13002,10000
 InnadrilControlTower3=116024,249932,-633,13002,10000
+InnadrilMaxMercenaries = 400
 
 # Goddard
 GoddardArtefact1=146601,-50441,-1505,32768,35322
@@ -118,6 +124,7 @@ GoddardFlameTower2=146784,-46992,-1609,13004,10000
 GoddardControlTower1=144672,-48832,-1742,13002,10000
 GoddardControlTower2=150240,-48832,-1742,13002,10000
 GoddardControlTower3=147456,-49200,-1619,13002,10000
+GoddardMaxMercenaries = 400 
 
 # Rune
 RuneArtefact1=9132,-49151,1095,0,35469
@@ -126,6 +133,7 @@ RuneFlameTower2=12225,-50767,1248,13004,10000
 RuneControlTower1=16565,-50318,-641,13002,10000
 RuneControlTower2=16559,-48000,-641,13002,10000
 RuneControlTower3=10775,-48481,83,13002,10000
+RuneMaxMercenaries = 400
 
 # Schuttgart
 SchuttgartArtefact1=76674,-154521,228,32768,35515
@@ -134,4 +142,5 @@ SchuttgartFlameTower1=78233,-151037,120,13004,10000
 SchuttgartFlameTower2=76872,-151043,120,13004,10000
 SchuttgartControlTower1=80334,-152898,-8,13002,10000
 SchuttgartControlTower2=74775,-152928,-8,13002,10000
-SchuttgartControlTower3=77547,-153246,112,13002,10000
+SchuttgartControlTower3=77547,-153246,112,13002,10000
+SchuttgartMaxMercenaries = 400