Просмотр исходного кода

BETA: Adding a config for maximum adena. Better throw all those gold bars to the trash because now you can set values as big as this: '''9 223 372 036 854 775 807 - nine quintillion two hundred twenty three quadrillion three hundred seventy two trillion thirty six billion eight hundred fifty four million seven hundred seventy five thousand eight hundred seven'''.
If your server reach this value, you really have to lower the rates :)

Nik 13 лет назад
Родитель
Сommit
532e35194f

+ 8 - 0
L2J_Server_BETA/dist/game/config/Character.properties

@@ -603,6 +603,14 @@ AltLeavePartyLeader = False
 # ---------------------------------------------------------------------------
 # ---------------------------------------------------------------------------
 # Random
 # Random
 # ---------------------------------------------------------------------------
 # ---------------------------------------------------------------------------
+# This is the maximum amount of adena that character can have in his inventory or warehouse.
+# The maximum input amount is 9,223,372,036,854,775,807. (nine quintillion 
+# two hundred twenty three quadrillion three hundred seventy two trillion thirty six billion 
+# eight hundred fifty four million seven hundred seventy five thousand eight hundred seven)
+# Setting negative values (-1 or others) will result in maximum amount available.
+# Default: 99900000000 (99 bilion and 900 milion)
+MaxAdena = 99900000000
+
 # This is the amount of adena that a new character starts their character with.
 # This is the amount of adena that a new character starts their character with.
 # Default: 0
 # Default: 0
 StartingAdena = 0
 StartingAdena = 0

+ 4 - 0
L2J_Server_BETA/java/com/l2jserver/Config.java

@@ -202,6 +202,7 @@ public final class Config
 	public static int ALT_PARTY_RANGE;
 	public static int ALT_PARTY_RANGE;
 	public static int ALT_PARTY_RANGE2;
 	public static int ALT_PARTY_RANGE2;
 	public static boolean ALT_LEAVE_PARTY_LEADER;
 	public static boolean ALT_LEAVE_PARTY_LEADER;
+	public static long MAX_ADENA;
 	public static long STARTING_ADENA;
 	public static long STARTING_ADENA;
 	public static byte STARTING_LEVEL;
 	public static byte STARTING_LEVEL;
 	public static int STARTING_SP;
 	public static int STARTING_SP;
@@ -1704,6 +1705,9 @@ public final class Config
 					ALT_PARTY_RANGE = Integer.parseInt(Character.getProperty("AltPartyRange", "1600"));
 					ALT_PARTY_RANGE = Integer.parseInt(Character.getProperty("AltPartyRange", "1600"));
 					ALT_PARTY_RANGE2 = Integer.parseInt(Character.getProperty("AltPartyRange2", "1400"));
 					ALT_PARTY_RANGE2 = Integer.parseInt(Character.getProperty("AltPartyRange2", "1400"));
 					ALT_LEAVE_PARTY_LEADER = Boolean.parseBoolean(Character.getProperty("AltLeavePartyLeader", "False"));
 					ALT_LEAVE_PARTY_LEADER = Boolean.parseBoolean(Character.getProperty("AltLeavePartyLeader", "False"));
+					MAX_ADENA = Long.parseLong(Character.getProperty("MaxAdena", "99900000000"));
+					if (MAX_ADENA < 0)
+						MAX_ADENA = Long.MAX_VALUE;
 					STARTING_ADENA = Long.parseLong(Character.getProperty("StartingAdena", "0"));
 					STARTING_ADENA = Long.parseLong(Character.getProperty("StartingAdena", "0"));
 					STARTING_LEVEL = Byte.parseByte(Character.getProperty("StartingLevel", "1"));
 					STARTING_LEVEL = Byte.parseByte(Character.getProperty("StartingLevel", "1"));
 					STARTING_SP = Integer.parseInt(Character.getProperty("StartingSP", "0"));
 					STARTING_SP = Integer.parseInt(Character.getProperty("StartingSP", "0"));

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java

@@ -45,7 +45,7 @@ public class PcInventory extends Inventory
 	
 	
 	public static final int ADENA_ID = 57;
 	public static final int ADENA_ID = 57;
 	public static final int ANCIENT_ADENA_ID = 5575;
 	public static final int ANCIENT_ADENA_ID = 5575;
-	public static final long MAX_ADENA = 99900000000L;
+	public static final long MAX_ADENA = Config.MAX_ADENA;
 	
 	
 	private final L2PcInstance _owner;
 	private final L2PcInstance _owner;
 	private L2ItemInstance _adena;
 	private L2ItemInstance _adena;