Custom starting location.

This commit is contained in:
mobius
2015-01-02 08:26:23 +00:00
parent 083c98bca6
commit bb13c3a3c5
3 changed files with 39 additions and 3 deletions

View File

@@ -681,6 +681,7 @@ public final class Config
public static FloodProtectorConfig FLOOD_PROTECTOR_SENDMAIL;
public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT;
public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_AUCTION;
// --------------------------------------------------
// Custom Settings
// --------------------------------------------------
@@ -789,6 +790,11 @@ public final class Config
public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST;
public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
public static boolean L2JMOD_OLD_DROP_BEHAVIOR;
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;
// --------------------------------------------------
// NPC Settings
// --------------------------------------------------
@@ -2537,6 +2543,11 @@ public final class Config
}
L2JMOD_ALLOW_CHANGE_PASSWORD = CustomSettings.getBoolean("AllowChangePassword", false);
CUSTOM_STARTING_LOC = CustomSettings.getBoolean("CustomStartingLocation", false);
CUSTOM_STARTING_LOC_X = CustomSettings.getInt("CustomStartingLocX", 50821);
CUSTOM_STARTING_LOC_Y = CustomSettings.getInt("CustomStartingLocY", 186527);
CUSTOM_STARTING_LOC_Z = CustomSettings.getInt("CustomStartingLocZ", -3625);
// Load PvP L2Properties file (if exists)
final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE);

View File

@@ -233,8 +233,17 @@ public final class CharacterCreate extends L2GameClientPacket
}
final L2PcTemplate template = newChar.getTemplate();
Location createLoc = template.getCreationPoint();
newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ());
if (Config.CUSTOM_STARTING_LOC)
{
Location createLoc = new Location(Config.CUSTOM_STARTING_LOC_X, Config.CUSTOM_STARTING_LOC_Y, Config.CUSTOM_STARTING_LOC_Z);
newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ());
}
else
{
Location createLoc = template.getCreationPoint();
newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ());
}
newChar.setTitle("");
if (Config.ENABLE_VITALITY)