diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/Other.ini b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/Other.ini index 000b204f2d..f428a9f297 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/Other.ini +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/Other.ini @@ -148,12 +148,6 @@ CharAddTitle = Newbie CustomStartingLvl = False CharLvl = 80 -# Custom spawn location for new players. -CustomSpawn = False -SpawnX = 149999 -SpawnY = 46728 -SpawnZ = -3414 - # Enable raid Petrification when raid is more than 8 levels lower. # Default: True AllowRaidBossPetrified = True diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/StartingLocation.ini b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/StartingLocation.ini new file mode 100644 index 0000000000..74c91a1934 --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/config/custom/StartingLocation.ini @@ -0,0 +1,13 @@ +# --------------------------------------------------------------------------- +# Custom Starting Location +# --------------------------------------------------------------------------- + +# Enable custom starting location. +# Default: False +CustomStartingLocation = False + +# Coords for custom starting location +# Default: 83020, 147880, -3469 (Giran) +CustomStartingLocX = 83020 +CustomStartingLocY = 147880 +CustomStartingLocZ = -3469 diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java index 88f21d65cc..18d2228869 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/Config.java @@ -96,6 +96,7 @@ public class Config private static final String PC_BANG_POINT_CONFIG_FILE = "./config/custom/PcBang.ini"; private static final String PHYSICS_BALANCE_CONFIG_FILE = "./config/custom/PhysicsBalance.ini"; private static final String SCHEME_BUFFER_CONFIG_FILE = "./config/custom/SchemeBuffer.ini"; + private static final String STARTING_LOCATION_CONFIG_FILE = "./config/custom/StartingLocation.ini"; private static final String EVENT_REBIRTH_CONFIG_FILE = "./config/custom/Rebirth.ini"; private static final String EVENT_WEDDING_CONFIG_FILE = "./config/custom/Wedding.ini"; // login @@ -559,6 +560,11 @@ public class Config public static int BUFFER_MAX_SCHEMES; public static int BUFFER_STATIC_BUFF_COST; + public static boolean CUSTOM_STARTING_LOC; + public static int CUSTOM_STARTING_LOC_X; + public static int CUSTOM_STARTING_LOC_Y; + public static int CUSTOM_STARTING_LOC_Z; + public static boolean OFFLINE_TRADE_ENABLE; public static boolean OFFLINE_CRAFT_ENABLE; public static boolean OFFLINE_SET_NAME_COLOR; @@ -618,10 +624,6 @@ public class Config public static boolean HERO_CUSTOM_ITEMS; public static boolean ALLOW_CREATE_LEVEL; public static int CHAR_CREATE_LEVEL; - public static boolean SPAWN_CHAR; - public static int SPAWN_X; - public static int SPAWN_Y; - public static int SPAWN_Z; public static boolean ALLOW_HERO_SUBSKILL; public static int HERO_COUNT; public static int CRUMA_TOWER_LEVEL_RESTRICT; @@ -1789,6 +1791,15 @@ public class Config BUFFER_STATIC_BUFF_COST = shemeBufferConfig.getInt("BufferStaticCostPerBuff", -1); } + public static void loadStartingLocationConfig() + { + final PropertiesParser startingLocationConfig = new PropertiesParser(STARTING_LOCATION_CONFIG_FILE); + CUSTOM_STARTING_LOC = startingLocationConfig.getBoolean("CustomStartingLocation", false); + CUSTOM_STARTING_LOC_X = startingLocationConfig.getInt("CustomStartingLocX", 50821); + CUSTOM_STARTING_LOC_Y = startingLocationConfig.getInt("CustomStartingLocY", 186527); + CUSTOM_STARTING_LOC_Z = startingLocationConfig.getInt("CustomStartingLocZ", -3625); + } + public static void loadOfflineConfig() { final PropertiesParser offlineConfig = new PropertiesParser(OFFLINE_CONFIG_FILE); @@ -1859,10 +1870,6 @@ public class Config HERO_CUSTOM_DAY = customServerConfig.getLong("HeroCustomDay", 0); ALLOW_CREATE_LEVEL = customServerConfig.getBoolean("CustomStartingLvl", false); CHAR_CREATE_LEVEL = customServerConfig.getInt("CharLvl", 80); - SPAWN_CHAR = customServerConfig.getBoolean("CustomSpawn", false); - SPAWN_X = customServerConfig.getInt("SpawnX", 50821); - SPAWN_Y = customServerConfig.getInt("SpawnY", 186527); - SPAWN_Z = customServerConfig.getInt("SpawnZ", -3625); ALLOW_LOW_LEVEL_TRADE = customServerConfig.getBoolean("AllowLowLevelTrade", true); ALLOW_HERO_SUBSKILL = customServerConfig.getBoolean("CustomHeroSubSkill", false); HERO_COUNT = customServerConfig.getInt("HeroCount", 1); @@ -2923,6 +2930,7 @@ public class Config loadBankingConfig(); loadBossAnnouncementsConfig(); loadBufferConfig(); + loadStartingLocationConfig(); loadPCBPointConfig(); loadOfflineConfig(); diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java index e462cd0e58..f6ab87bcaf 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java @@ -227,9 +227,9 @@ public class CharacterCreate implements IClientIncomingPacket } } - if (Config.SPAWN_CHAR) + if (Config.CUSTOM_STARTING_LOC) { - newChar.setXYZInvisible(Config.SPAWN_X, Config.SPAWN_Y, Config.SPAWN_Z); + newChar.setXYZInvisible(Config.CUSTOM_STARTING_LOC_X, Config.CUSTOM_STARTING_LOC_Y, Config.CUSTOM_STARTING_LOC_Z); } else if (Config.FACTION_SYSTEM_ENABLED) { diff --git a/L2J_Mobius_C6_Interlude/dist/game/config/custom/Other.ini b/L2J_Mobius_C6_Interlude/dist/game/config/custom/Other.ini index 000b204f2d..f428a9f297 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/config/custom/Other.ini +++ b/L2J_Mobius_C6_Interlude/dist/game/config/custom/Other.ini @@ -148,12 +148,6 @@ CharAddTitle = Newbie CustomStartingLvl = False CharLvl = 80 -# Custom spawn location for new players. -CustomSpawn = False -SpawnX = 149999 -SpawnY = 46728 -SpawnZ = -3414 - # Enable raid Petrification when raid is more than 8 levels lower. # Default: True AllowRaidBossPetrified = True diff --git a/L2J_Mobius_C6_Interlude/dist/game/config/custom/StartingLocation.ini b/L2J_Mobius_C6_Interlude/dist/game/config/custom/StartingLocation.ini new file mode 100644 index 0000000000..74c91a1934 --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/game/config/custom/StartingLocation.ini @@ -0,0 +1,13 @@ +# --------------------------------------------------------------------------- +# Custom Starting Location +# --------------------------------------------------------------------------- + +# Enable custom starting location. +# Default: False +CustomStartingLocation = False + +# Coords for custom starting location +# Default: 83020, 147880, -3469 (Giran) +CustomStartingLocX = 83020 +CustomStartingLocY = 147880 +CustomStartingLocZ = -3469 diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java index 237bcea611..65c68b44f8 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/Config.java @@ -111,6 +111,7 @@ public class Config private static final String PC_BANG_POINT_CONFIG_FILE = "./config/custom/PcBang.ini"; private static final String PHYSICS_BALANCE_CONFIG_FILE = "./config/custom/PhysicsBalance.ini"; private static final String SCHEME_BUFFER_CONFIG_FILE = "./config/custom/SchemeBuffer.ini"; + private static final String STARTING_LOCATION_CONFIG_FILE = "./config/custom/StartingLocation.ini"; private static final String EVENT_REBIRTH_CONFIG_FILE = "./config/custom/Rebirth.ini"; private static final String EVENT_WEDDING_CONFIG_FILE = "./config/custom/Wedding.ini"; // login @@ -587,6 +588,11 @@ public class Config public static int BUFFER_MAX_SCHEMES; public static int BUFFER_STATIC_BUFF_COST; + public static boolean CUSTOM_STARTING_LOC; + public static int CUSTOM_STARTING_LOC_X; + public static int CUSTOM_STARTING_LOC_Y; + public static int CUSTOM_STARTING_LOC_Z; + public static boolean OFFLINE_TRADE_ENABLE; public static boolean OFFLINE_CRAFT_ENABLE; public static boolean OFFLINE_SET_NAME_COLOR; @@ -646,10 +652,6 @@ public class Config public static boolean HERO_CUSTOM_ITEMS; public static boolean ALLOW_CREATE_LEVEL; public static int CHAR_CREATE_LEVEL; - public static boolean SPAWN_CHAR; - public static int SPAWN_X; - public static int SPAWN_Y; - public static int SPAWN_Z; public static boolean ALLOW_HERO_SUBSKILL; public static int HERO_COUNT; public static int CRUMA_TOWER_LEVEL_RESTRICT; @@ -1842,6 +1844,15 @@ public class Config BUFFER_STATIC_BUFF_COST = shemeBufferConfig.getInt("BufferStaticCostPerBuff", -1); } + public static void loadStartingLocationConfig() + { + final PropertiesParser startingLocationConfig = new PropertiesParser(STARTING_LOCATION_CONFIG_FILE); + CUSTOM_STARTING_LOC = startingLocationConfig.getBoolean("CustomStartingLocation", false); + CUSTOM_STARTING_LOC_X = startingLocationConfig.getInt("CustomStartingLocX", 50821); + CUSTOM_STARTING_LOC_Y = startingLocationConfig.getInt("CustomStartingLocY", 186527); + CUSTOM_STARTING_LOC_Z = startingLocationConfig.getInt("CustomStartingLocZ", -3625); + } + public static void loadOfflineConfig() { final PropertiesParser offlineConfig = new PropertiesParser(OFFLINE_CONFIG_FILE); @@ -1912,10 +1923,6 @@ public class Config HERO_CUSTOM_DAY = customServerConfig.getLong("HeroCustomDay", 0); ALLOW_CREATE_LEVEL = customServerConfig.getBoolean("CustomStartingLvl", false); CHAR_CREATE_LEVEL = customServerConfig.getInt("CharLvl", 80); - SPAWN_CHAR = customServerConfig.getBoolean("CustomSpawn", false); - SPAWN_X = customServerConfig.getInt("SpawnX", 50821); - SPAWN_Y = customServerConfig.getInt("SpawnY", 186527); - SPAWN_Z = customServerConfig.getInt("SpawnZ", -3625); ALLOW_LOW_LEVEL_TRADE = customServerConfig.getBoolean("AllowLowLevelTrade", true); ALLOW_HERO_SUBSKILL = customServerConfig.getBoolean("CustomHeroSubSkill", false); HERO_COUNT = customServerConfig.getInt("HeroCount", 1); @@ -2993,6 +3000,7 @@ public class Config loadBankingConfig(); loadBossAnnouncementsConfig(); loadBufferConfig(); + loadStartingLocationConfig(); loadPCBPointConfig(); loadOfflineConfig(); diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java index e462cd0e58..f6ab87bcaf 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java @@ -227,9 +227,9 @@ public class CharacterCreate implements IClientIncomingPacket } } - if (Config.SPAWN_CHAR) + if (Config.CUSTOM_STARTING_LOC) { - newChar.setXYZInvisible(Config.SPAWN_X, Config.SPAWN_Y, Config.SPAWN_Z); + newChar.setXYZInvisible(Config.CUSTOM_STARTING_LOC_X, Config.CUSTOM_STARTING_LOC_Y, Config.CUSTOM_STARTING_LOC_Z); } else if (Config.FACTION_SYSTEM_ENABLED) {