- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
rallisf1
I used to be a dev 4 years ago but haven't used Java since then and i am facing some difficulties.
I am working on a fresh project based on Coyote's Faction engine (with many modifications and additions). My problem must be really unique coz i didn't find anything about it on any forum or by googling. As i was applying some patches i noticed than parts of the patch were completely ignored. No errors showed .even after i manually corrupt the code to mismatch original revision.
Example:
is completely ignored no matter what modifications i do, if i apply the patch manually (go to config.java and paste the + lines) the code works and server compiles but i really need to keep my additions in patches so i can keep track of them.
for the same file this code works:
Index: java/com/l2jserver/Config.java =================================================================== --- java/com/l2jserver/Config.java (revision 4014) +++ java/com/l2jserver/Config.java (working copy) @@ -2193,7 +2220,43 @@ e.printStackTrace(); throw new Error("Failed to Load "+L2JMOD_CONFIG_FILE+" File."); } + + // Load The FactionRelated Config File + try + { + L2Properties FactionRelated = new L2Properties(); + is = new FileInputStream(new File(FACTION_ENGINE_CONFIG_FILE)); + FactionRelated.load(is); + ENABLE_FACTION_ENGINE = Boolean.parseBoolean(FactionRelated.getProperty("FactionEngineEnabled", "False")); + FACTION_TEAM1_NAME = FactionRelated.getProperty("Team1Name", "koofs"); + FACTION_TEAM2_NAME = FactionRelated.getProperty("Team2Name", "noobs"); + FACTION_TEAM1_NAME_COLOR = Integer.decode("0x" + FactionRelated.getProperty("Team1ColorName", "00FFFF")); + FACTION_TEAM2_NAME_COLOR = Integer.decode("0x" + FactionRelated.getProperty("Team2ColorName", "00FF00")); + FACTION_ALLOW_ITEM_REWARD = Boolean.parseBoolean(FactionRelated.getProperty("FactionPlayerGetItemByPvP", "False")); + FACTION_ITEM_NUMBER_REWARD_ON_PVP = Integer.parseInt(FactionRelated.getProperty("FactionEngineAmmountItemReward", "1")); + FACTION_ITEM_REWARD_ID = Integer.parseInt(FactionRelated.getProperty("FactionPvPItemRewardID", "6392")); + FACTION_TEAM1_BASE_X = Integer.parseInt(FactionRelated.getProperty("FactionTeam1BaseX", "0")); + FACTION_TEAM1_BASE_Y = Integer.parseInt(FactionRelated.getProperty("FactionTeam1BaseY", "0")); + FACTION_TEAM1_BASE_Z = Integer.parseInt(FactionRelated.getProperty("FactionTeam1BaseZ", "0")); + FACTION_TEAM2_BASE_X = Integer.parseInt(FactionRelated.getProperty("FactionTeam2BaseX", "0")); + FACTION_TEAM2_BASE_Y = Integer.parseInt(FactionRelated.getProperty("FactionTeam2BaseY", "0")); + FACTION_TEAM2_BASE_Z = Integer.parseInt(FactionRelated.getProperty("FactionTeam2BaseZ", "0")); + FACTION_CUSTOM_SPAWN_LOC_X = Integer.parseInt(FactionRelated.getProperty("FactionCustomSpawnLocX", "0")); + FACTION_CUSTOM_SPAWN_LOC_Y = Integer.parseInt(FactionRelated.getProperty("FactionCustomSpawnLocY", "0")); + FACTION_CUSTOM_SPAWN_LOC_Z = Integer.parseInt(FactionRelated.getProperty("FactionCustomSpawnLocZ", "0")); + NULL_FACTION_STARTING_TITLE = Boolean.parseBoolean(FactionRelated.getProperty("NullFactionStartingTitle", "False")); + AUTO_NOBLESSE = Boolean.parseBoolean(FactionRelated.getProperty("EnableTheAutoNoblesseMod", "False")); + ENABLE_ONLINE_VC = Boolean.parseBoolean(FactionRelated.getProperty("EnableOnlinePlayersVC", "False")); + ENABLE_ONLINE_PLAYERS_ON_ENTERWORLD = Boolean.parseBoolean(FactionRelated.getProperty("EnableOnlinePlayersEnterworld", "False")); + ENABLE_FINFO_VC = Boolean.parseBoolean(FactionRelated.getProperty("EnableFactionInfoVC", "False")); + } + catch (Exception e) + { + e.printStackTrace(); + throw new Error("Failed to Load "+FACTION_ENGINE_CONFIG_FILE+" File."); + } + // Load PvP L2Properties file (if exists) try {but only when i load it from a different file, when both patches are in the same file (i know i don't use index for every section of the same file) eclipse ignores both of them. It's like there is some sort of conflict happening on the first type of code but as i said i took config.java as an example this happens to me in 4 more files.
I use latest versions of Eclipse SDK, Subversion, JDK all 64bit on win 2003 standard x64. I don't think there is something wrong with my setup because if i apply the patches manually i can compile fine and also patches i used on the datapack had no such issues or errors.
Any help would be very much appreciated.
4 answers to this question
Recommended Posts