Package lineage2.commons.configuration

Examples of lineage2.commons.configuration.ExProperties


  /**
   * Method loadServerConfig.
   */
  public static void loadServerConfig()
  {
    ExProperties serverSettings = load(CONFIGURATION_FILE);
    GAME_SERVER_LOGIN_HOST = serverSettings.getProperty("LoginHost", "127.0.0.1");
    GAME_SERVER_LOGIN_PORT = serverSettings.getProperty("LoginPort", 9013);
    GAME_SERVER_LOGIN_CRYPT = serverSettings.getProperty("LoginUseCrypt", true);
    LOGIN_SERVER_AGE_LIMIT = serverSettings.getProperty("ServerAgeLimit", 0);
    LOGIN_SERVER_GM_ONLY = serverSettings.getProperty("ServerGMOnly", false);
    LOGIN_SERVER_BRACKETS = serverSettings.getProperty("ServerBrackets", false);
    LOGIN_SERVER_IS_PVP = serverSettings.getProperty("PvPServer", false);
    for (String a : serverSettings.getProperty("ServerType", ArrayUtils.EMPTY_STRING_ARRAY))
    {
      if (a.trim().isEmpty())
      {
        continue;
      }
      ServerType t = ServerType.valueOf(a.toUpperCase());
      LOGIN_SERVER_SERVER_TYPE |= t.getMask();
    }
    INTERNAL_HOSTNAME = serverSettings.getProperty("InternalHostname", "*");
    EXTERNAL_HOSTNAME = serverSettings.getProperty("ExternalHostname", "*");
    REQUEST_ID = serverSettings.getProperty("RequestServerID", 0);
    ACCEPT_ALTERNATE_ID = serverSettings.getProperty("AcceptAlternateID", true);
    GAMESERVER_HOSTNAME = serverSettings.getProperty("GameserverHostname");
    PORTS_GAME = serverSettings.getProperty("GameserverPort", new int[]
    {
      7777
    });
    EVERYBODY_HAS_ADMIN_RIGHTS = serverSettings.getProperty("EverybodyHasAdminRights", false);
    SECOND_AUTH_ENABLED = serverSettings.getProperty("SecondAuth", false);
    SECOND_AUTH_MAX_ATTEMPTS = serverSettings.getProperty("SecondAuthMaxEnter", 5);
    SECOND_AUTH_BAN_TIME = serverSettings.getProperty("SecondAuthBanTime", 480);
    HIDE_GM_STATUS = serverSettings.getProperty("HideGMStatus", false);
    SHOW_GM_LOGIN = serverSettings.getProperty("ShowGMLogin", true);
    SAVE_GM_EFFECTS = serverSettings.getProperty("SaveGMEffects", false);
    CNAME_TEMPLATE = serverSettings.getProperty("CnameTemplate", "[A-Za-z0-9\u0410-\u042f\u0430-\u044f]{2,16}");
    CLAN_NAME_TEMPLATE = serverSettings.getProperty("ClanNameTemplate", "[A-Za-z0-9\u0410-\u042f\u0430-\u044f]{3,16}");
    CLAN_TITLE_TEMPLATE = serverSettings.getProperty("ClanTitleTemplate", "[A-Za-z0-9\u0410-\u042f\u0430-\u044f \\p{Punct}]{1,16}");
    ALLY_NAME_TEMPLATE = serverSettings.getProperty("AllyNameTemplate", "[A-Za-z0-9\u0410-\u042f\u0430-\u044f]{3,16}");
    GLOBAL_SHOUT = serverSettings.getProperty("GlobalShout", false);
    GLOBAL_TRADE_CHAT = serverSettings.getProperty("GlobalTradeChat", false);
    CHAT_RANGE = serverSettings.getProperty("ChatRange", 1250);
    SHOUT_OFFSET = serverSettings.getProperty("ShoutOffset", 0);
    PREMIUM_HEROCHAT = serverSettings.getProperty("PremiumHeroChat", true);
    LOG_CHAT = serverSettings.getProperty("LogChat", false);
    RATE_XP = serverSettings.getProperty("RateXp", 1.);
    RATE_SP = serverSettings.getProperty("RateSp", 1.);
    RATE_QUESTS_REWARD = serverSettings.getProperty("RateQuestsReward", 1.);
    RATE_QUESTS_DROP = serverSettings.getProperty("RateQuestsDrop", 1.);
    RATE_CLAN_REP_SCORE = serverSettings.getProperty("RateClanRepScore", 1.);
    RATE_CLAN_REP_SCORE_MAX_AFFECTED = serverSettings.getProperty("RateClanRepScoreMaxAffected", 2);
    RATE_DROP_ADENA = serverSettings.getProperty("RateDropAdena", 1.);
    RATE_DROP_ITEMS = serverSettings.getProperty("RateDropItems", 1.);
    RATE_DROP_COMMON_ITEMS = serverSettings.getProperty("RateDropCommonItems", 1.);
    RATE_DROP_RAIDBOSS = serverSettings.getProperty("RateRaidBoss", 1.);
    RATE_DROP_SPOIL = serverSettings.getProperty("RateDropSpoil", 1.);
    NO_RATE_ITEMS = serverSettings.getProperty("NoRateItemIds", new int[]
    {
      6660,
      6662,
      6661,
      6659,
      6656,
      6658,
      8191,
      6657,
      10170,
      10314,
      16025,
      16026
    });
    NO_RATE_EQUIPMENT = serverSettings.getProperty("NoRateEquipment", true);
    NO_RATE_KEY_MATERIAL = serverSettings.getProperty("NoRateKeyMaterial", true);
    NO_RATE_RECIPES = serverSettings.getProperty("NoRateRecipes", true);
    RATE_DROP_SIEGE_GUARD = serverSettings.getProperty("RateSiegeGuard", 1.);
    RATE_MANOR = serverSettings.getProperty("RateManor", 1.);
    RATE_FISH_DROP_COUNT = serverSettings.getProperty("RateFishDropCount", 1.);
    RATE_PARTY_MIN = serverSettings.getProperty("RatePartyMin", false);
    RATE_HELLBOUND_CONFIDENCE = serverSettings.getProperty("RateHellboundConfidence", 1.);
    RATE_MOB_SPAWN = serverSettings.getProperty("RateMobSpawn", 1);
    RATE_MOB_SPAWN_MIN_LEVEL = serverSettings.getProperty("RateMobMinLevel", 1);
    RATE_MOB_SPAWN_MAX_LEVEL = serverSettings.getProperty("RateMobMaxLevel", 100);
    RATE_RAID_REGEN = serverSettings.getProperty("RateRaidRegen", 1.);
    RATE_RAID_DEFENSE = serverSettings.getProperty("RateRaidDefense", 1.);
    RATE_RAID_ATTACK = serverSettings.getProperty("RateRaidAttack", 1.);
    RATE_EPIC_DEFENSE = serverSettings.getProperty("RateEpicDefense", RATE_RAID_DEFENSE);
    RATE_EPIC_ATTACK = serverSettings.getProperty("RateEpicAttack", RATE_RAID_ATTACK);
    RAID_MAX_LEVEL_DIFF = serverSettings.getProperty("RaidMaxLevelDiff", 8);
    PARALIZE_ON_RAID_DIFF = serverSettings.getProperty("ParalizeOnRaidLevelDiff", true);
    AUTODESTROY_ITEM_AFTER = serverSettings.getProperty("AutoDestroyDroppedItemAfter", 0);
    AUTODESTROY_PLAYER_ITEM_AFTER = serverSettings.getProperty("AutoDestroyPlayerDroppedItemAfter", 0);
    DELETE_DAYS = serverSettings.getProperty("DeleteCharAfterDays", 7);
    PURGE_BYPASS_TASK_FREQUENCY = serverSettings.getProperty("PurgeTaskFrequency", 60);
    try
    {
      DATAPACK_ROOT = new File(serverSettings.getProperty("DatapackRoot", ".")).getCanonicalFile();
    }
    catch (IOException e)
    {
      _log.error("", e);
    }
    ALLOW_DISCARDITEM = serverSettings.getProperty("AllowDiscardItem", true);
    ALLOW_MAIL = serverSettings.getProperty("AllowMail", true);
    ALLOW_WAREHOUSE = serverSettings.getProperty("AllowWarehouse", true);
    ALLOW_WATER = serverSettings.getProperty("AllowWater", true);
    ALLOW_CURSED_WEAPONS = serverSettings.getProperty("AllowCursedWeapons", false);
    DROP_CURSED_WEAPONS_ON_KICK = serverSettings.getProperty("DropCursedWeaponsOnKick", false);
    MIN_PROTOCOL_REVISION = serverSettings.getProperty("MinProtocolRevision", 415);
    MAX_PROTOCOL_REVISION = serverSettings.getProperty("MaxProtocolRevision", 448);
    MIN_NPC_ANIMATION = serverSettings.getProperty("MinNPCAnimation", 5);
    MAX_NPC_ANIMATION = serverSettings.getProperty("MaxNPCAnimation", 90);
    SERVER_SIDE_NPC_NAME = serverSettings.getProperty("ServerSideNpcName", false);
    SERVER_SIDE_NPC_TITLE = serverSettings.getProperty("ServerSideNpcTitle", false);
    AUTOSAVE = serverSettings.getProperty("Autosave", true);
    MAXIMUM_ONLINE_USERS = serverSettings.getProperty("MaximumOnlineUsers", 3000);
    DATABASE_DRIVER = serverSettings.getProperty("Driver", "com.mysql.jdbc.Driver");
    DATABASE_MAX_CONNECTIONS = serverSettings.getProperty("MaximumDbConnections", 10);
    DATABASE_MAX_IDLE_TIMEOUT = serverSettings.getProperty("MaxIdleConnectionTimeout", 600);
    DATABASE_IDLE_TEST_PERIOD = serverSettings.getProperty("IdleConnectionTestPeriod", 60);
    DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mysql://localhost/l2sdb");
    DATABASE_LOGIN = serverSettings.getProperty("Login", "root");
    DATABASE_PASSWORD = serverSettings.getProperty("Password", "");
    EFFECT_TASK_MANAGER_COUNT = serverSettings.getProperty("EffectTaskManagers", 2);
    SCHEDULED_THREAD_POOL_SIZE = serverSettings.getProperty("ScheduledThreadPoolSize", NCPUS * 4);
    EXECUTOR_THREAD_POOL_SIZE = serverSettings.getProperty("ExecutorThreadPoolSize", NCPUS * 2);
    THREAD_P_MOVE = serverSettings.getProperty("ThreadPoolSizeMove", 25);
    THREAD_P_PATHFIND = serverSettings.getProperty("ThreadPoolSizePathfind", 10);
    NPC_AI_MAX_THREAD = serverSettings.getProperty("NpcAiMaxThread", 10);
    PLAYER_AI_MAX_THREAD = serverSettings.getProperty("PlayerAiMaxThread", 20);
    ENABLE_RUNNABLE_STATS = serverSettings.getProperty("EnableRunnableStats", false);
    SELECTOR_CONFIG.SLEEP_TIME = serverSettings.getProperty("SelectorSleepTime", 10L);
    SELECTOR_CONFIG.INTEREST_DELAY = serverSettings.getProperty("InterestDelay", 30L);
    SELECTOR_CONFIG.MAX_SEND_PER_PASS = serverSettings.getProperty("MaxSendPerPass", 32);
    SELECTOR_CONFIG.READ_BUFFER_SIZE = serverSettings.getProperty("ReadBufferSize", 65536);
    SELECTOR_CONFIG.WRITE_BUFFER_SIZE = serverSettings.getProperty("WriteBufferSize", 131072);
    SELECTOR_CONFIG.HELPER_BUFFER_COUNT = serverSettings.getProperty("BufferPoolSize", 64);
    CHAT_MESSAGE_MAX_LEN = serverSettings.getProperty("ChatMessageLimit", 1000);
    ABUSEWORD_BANCHAT = serverSettings.getProperty("ABUSEWORD_BANCHAT", false);
    int counter = 0;
    for (int id : serverSettings.getProperty("ABUSEWORD_BAN_CHANNEL", new int[]
    {
      0
    }))
    {
      BAN_CHANNEL_LIST[counter] = id;
      counter++;
    }
    ABUSEWORD_REPLACE = serverSettings.getProperty("ABUSEWORD_REPLACE", false);
    ABUSEWORD_REPLACE_STRING = serverSettings.getProperty("ABUSEWORD_REPLACE_STRING", "[censored]");
    BANCHAT_ANNOUNCE = serverSettings.getProperty("BANCHAT_ANNOUNCE", true);
    BANCHAT_ANNOUNCE_FOR_ALL_WORLD = serverSettings.getProperty("BANCHAT_ANNOUNCE_FOR_ALL_WORLD", true);
    BANCHAT_ANNOUNCE_NICK = serverSettings.getProperty("BANCHAT_ANNOUNCE_NICK", true);
    ABUSEWORD_BANTIME = serverSettings.getProperty("ABUSEWORD_UNBAN_TIMER", 30);
    CHATFILTER_MIN_LEVEL = serverSettings.getProperty("ChatFilterMinLevel", 0);
    counter = 0;
    for (int id : serverSettings.getProperty("ChatFilterChannels", new int[]
    {
      1,
      8
    }))
    {
      CHATFILTER_CHANNELS[counter] = id;
      counter++;
    }
    CHATFILTER_WORK_TYPE = serverSettings.getProperty("ChatFilterWorkType", 1);
    DEFAULT_LANG = serverSettings.getProperty("DefaultLang", "ru");
    RESTART_AT_TIME = serverSettings.getProperty("AutoRestartAt", "0 5 * * *");
    SHIFT_BY = serverSettings.getProperty("HShift", 12);
    SHIFT_BY_Z = serverSettings.getProperty("VShift", 11);
    MAP_MIN_Z = serverSettings.getProperty("MapMinZ", -32768);
    MAP_MAX_Z = serverSettings.getProperty("MapMaxZ", 32767);
    MOVE_PACKET_DELAY = serverSettings.getProperty("MovePacketDelay", 100);
    ATTACK_PACKET_DELAY = serverSettings.getProperty("AttackPacketDelay", 500);
    DAMAGE_FROM_FALLING = serverSettings.getProperty("DamageFromFalling", true);
    ALLOW_WEDDING = serverSettings.getProperty("AllowWedding", false);
    WEDDING_PRICE = serverSettings.getProperty("WeddingPrice", 500000);
    WEDDING_PUNISH_INFIDELITY = serverSettings.getProperty("WeddingPunishInfidelity", true);
    WEDDING_TELEPORT = serverSettings.getProperty("WeddingTeleport", true);
    WEDDING_TELEPORT_PRICE = serverSettings.getProperty("WeddingTeleportPrice", 500000);
    WEDDING_TELEPORT_INTERVAL = serverSettings.getProperty("WeddingTeleportInterval", 120);
    WEDDING_SAMESEX = serverSettings.getProperty("WeddingAllowSameSex", true);
    WEDDING_FORMALWEAR = serverSettings.getProperty("WeddingFormalWear", true);
    WEDDING_DIVORCE_COSTS = serverSettings.getProperty("WeddingDivorceCosts", 20);
    DONTLOADSPAWN = serverSettings.getProperty("StartWithoutSpawn", false);
    DONTLOADQUEST = serverSettings.getProperty("StartWithoutQuest", false);
    MAX_REFLECTIONS_COUNT = serverSettings.getProperty("MaxReflectionsCount", 300);
    WEAR_DELAY = serverSettings.getProperty("WearDelay", 5);
    GARBAGE_COLLECTOR_INTERVAL = serverSettings.getProperty("GarbageCollectorInterval", 30) * 60000;
    HTM_CACHE_MODE = serverSettings.getProperty("HtmCacheMode", HtmCache.LAZY);
    SERVER_SIDE_NPC_TITLE_ETC = serverSettings.getProperty("ServerSideNpcTitleEtc", false);
    ALLOW_PACKET_FAIL = serverSettings.getProperty("AllowPacketFail", false);
    Random ppc = new Random();
    int z = ppc.nextInt(6);
    if (z == 0)
    {
      z += 2;
    }
    for (int x = 0; x < 8; x++)
    {
      if (x == 4)
      {
        RWHO_ARRAY[x] = 44;
      }
      else
      {
        RWHO_ARRAY[x] = 51 + ppc.nextInt(z);
      }
    }
    RWHO_ARRAY[11] = 37265 + ppc.nextInt((z * 2) + 3);
    RWHO_ARRAY[8] = 51 + ppc.nextInt(z);
    z = 36224 + ppc.nextInt(z * 2);
    RWHO_ARRAY[9] = z;
    RWHO_ARRAY[10] = z;
    RWHO_ARRAY[12] = 1;
    RWHO_LOG = Boolean.parseBoolean(serverSettings.getProperty("RemoteWhoLog", "False"));
    RWHO_SEND_TRASH = Boolean.parseBoolean(serverSettings.getProperty("RemoteWhoSendTrash", "False"));
    RWHO_MAX_ONLINE = Integer.parseInt(serverSettings.getProperty("RemoteWhoMaxOnline", "0"));
    RWHO_KEEP_STAT = Integer.parseInt(serverSettings.getProperty("RemoteOnlineKeepStat", "5"));
    RWHO_ONLINE_INCREMENT = Integer.parseInt(serverSettings.getProperty("RemoteOnlineIncrement", "0"));
    RWHO_PRIV_STORE_FACTOR = Float.parseFloat(serverSettings.getProperty("RemotePrivStoreFactor", "0"));
    RWHO_FORCE_INC = Integer.parseInt(serverSettings.getProperty("RemoteWhoForceInc", "0"));
  }
View Full Code Here


  /**
   * Method loadConfiguration.
   */
  public static void loadConfiguration()
  {
    ExProperties serverSettings = load(LOGIN_CONFIGURATION_FILE);
    LOGIN_HOST = serverSettings.getProperty("LoginserverHostname", "127.0.0.1");
    PORT_LOGIN = serverSettings.getProperty("LoginserverPort", 2106);
    GAME_SERVER_LOGIN_HOST = serverSettings.getProperty("LoginHost", "127.0.0.1");
    GAME_SERVER_LOGIN_PORT = serverSettings.getProperty("LoginPort", 9014);
    DATABASE_DRIVER = serverSettings.getProperty("Driver", "com.mysql.jdbc.Driver");
    DATABASE_MAX_CONNECTIONS = serverSettings.getProperty("MaximumDbConnections", 3);
    DATABASE_MAX_IDLE_TIMEOUT = serverSettings.getProperty("MaxIdleConnectionTimeout", 600);
    DATABASE_IDLE_TEST_PERIOD = serverSettings.getProperty("IdleConnectionTestPeriod", 60);
    DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mysql://localhost/l2sdb");
    DATABASE_LOGIN = serverSettings.getProperty("Login", "root");
    DATABASE_PASSWORD = serverSettings.getProperty("Password", "");
    LOGIN_BLOWFISH_KEYS = serverSettings.getProperty("BlowFishKeys", 20);
    LOGIN_RSA_KEYPAIRS = serverSettings.getProperty("RSAKeyPairs", 10);
    ACCEPT_NEW_GAMESERVER = serverSettings.getProperty("AcceptNewGameServer", true);
    DEFAULT_PASSWORD_HASH = serverSettings.getProperty("PasswordHash", "whirlpool2");
    LEGACY_PASSWORD_HASH = serverSettings.getProperty("LegacyPasswordHash", "sha1");
    AUTO_CREATE_ACCOUNTS = serverSettings.getProperty("AutoCreateAccounts", true);
    ANAME_TEMPLATE = serverSettings.getProperty("AccountTemplate", "[A-Za-z0-9]{4,14}");
    APASSWD_TEMPLATE = serverSettings.getProperty("PasswordTemplate", "[A-Za-z0-9]{4,16}");
    LOGIN_TRY_BEFORE_BAN = serverSettings.getProperty("LoginTryBeforeBan", 10);
    LOGIN_TRY_TIMEOUT = serverSettings.getProperty("LoginTryTimeout", 5) * 1000L;
    IP_BAN_TIME = serverSettings.getProperty("IpBanTime", 300) * 1000L;
    GAME_SERVER_PING_DELAY = serverSettings.getProperty("GameServerPingDelay", 30) * 1000L;
    GAME_SERVER_PING_RETRY = serverSettings.getProperty("GameServerPingRetry", 4);
    LOGIN_LOG = serverSettings.getProperty("LoginLog", true);
  }
View Full Code Here

   * @param file File
   * @return ExProperties
   */
  public static ExProperties load(File file)
  {
    ExProperties result = new ExProperties();
    try
    {
      result.load(file);
    }
    catch (IOException e)
    {
      _log.error("", e);
    }
View Full Code Here

  /**
   * Method loadCommunityConfig.
   */
  public static void loadCommunityConfig()
  {
    ExProperties communitySettings = load(COMMUNITY_CONFIGURATION_FILE);
    COMMUNITYBOARD_ENABLED = communitySettings.getProperty("CommunityBoardEnable", true);
    if (COMMUNITYBOARD_ENABLED)
    {
      ALLOW_COMMUNITYBOARD_IN_COMBAT = communitySettings.getProperty("AllowInCombat", false);
      COMMUNITYBOARD_ABNORMAL_ENABLED = communitySettings.getProperty("AllowAbnormalState", false);
      BBS_DEFAULT = communitySettings.getProperty("BBSStartPage", "_bbshome");
      BBS_HOME_DIR = communitySettings.getProperty("BBSHomeDir", "scripts/services/community/");
      COMMUNITYBOARD_SHOP_ENABLED = communitySettings.getProperty("CommunityShopEnable", false);
      COMMUNITYBOARD_SELL_ENABLED = communitySettings.getProperty("CommunitySellEnable", false);
      for (String name : communitySettings.getProperty("AllowMultisell", ArrayUtils.EMPTY_STRING_ARRAY))
      {
        COMMUNITYBOARD_MULTISELL_ALLOW.add(name);
      }
      COMMUNITYBOARD_BUFFER_ENABLED = communitySettings.getProperty("CommunityBufferEnable", false);
      COMMUNITYBOARD_BUFFER_PET_ENABLED = communitySettings.getProperty("CommunityBufferPetEnable", false);
      COMMUNITYBOARD_BUFFER_SAVE_ENABLED = communitySettings.getProperty("CommunityBufferSaveEnable", false);
      COMMUNITYBOARD_INSTANCE_ENABLED = communitySettings.getProperty("CommunityBufferInstancesEnable", false);
      COMMUNITYBOARD_EVENTS_ENABLED = communitySettings.getProperty("CommunityBufferEventsEnable", false);
      COMMUNITYBOARD_BUFF_TIME = communitySettings.getProperty("CommunityBuffTime", 20) * 60000;
      COMMUNITYBOARD_BUFF_PICE = communitySettings.getProperty("CommunityBuffPice", 5000);
      COMMUNITYBOARD_BUFF_SAVE_PICE = communitySettings.getProperty("CommunityBuffSavePice", 50000);
      for (int id : communitySettings.getProperty("AllowEffect", new int[]
      {
        1085,
        1048,
        1045
      }))
      {
        COMMUNITYBOARD_BUFF_ALLOW.add(Integer.valueOf(id));
      }
      for (int id : communitySettings.getProperty("MageScheme", new int[]
      {
        1085
      }))
      {
        COMMUNITI_LIST_MAGE_SUPPORT.add(Integer.valueOf(id));
      }
      for (int id : communitySettings.getProperty("FighterScheme", new int[]
      {
        1085
      }))
      {
        COMMUNITI_LIST_FIGHTER_SUPPORT.add(Integer.valueOf(id));
      }
      COMMUNITYBOARD_TELEPORT_ENABLED = communitySettings.getProperty("CommunityTeleportEnable", false);
      COMMUNITYBOARD_TELE_PICE = communitySettings.getProperty("CommunityTeleportPice", 10000);
      COMMUNITYBOARD_SAVE_TELE_PICE = communitySettings.getProperty("CommunitySaveTeleportPice", 50000);
      USE_BBS_BUFER_IS_COMBAT = communitySettings.getProperty("UseBBSBuferIsCombat", false);
      USE_BBS_BUFER_IS_EVENTS = communitySettings.getProperty("UseBBSBuferIsEvents", false);
      USE_BBS_TELEPORT_IS_COMBAT = communitySettings.getProperty("UseBBSTeleportIsCombat", false);
      USE_BBS_TELEPORT_IS_EVENTS = communitySettings.getProperty("UseBBSTeleportIsEvents", false);
      USE_BBS_PROF_IS_COMBAT = communitySettings.getProperty("UseBBSProfIsCombat", false);
      USE_BBS_PROF_IS_EVENTS = communitySettings.getProperty("UseBBSProfIsEvents", false);
      SAVE_BBS_TELEPORT_IS_EPIC = communitySettings.getProperty("SaveBBSTeleportIsEpic", false);
      SAVE_BBS_TELEPORT_IS_BZ = communitySettings.getProperty("SaveBBSTeleportIsBZ", false);
      BUFFER_SUMMON_ENABLE = communitySettings.getProperty("CommunityBufferSummon", false);
      ENCHANT_ENABLED = communitySettings.getProperty("Enchant_enabled", false);
      ENCHANTER_ITEM_ID = communitySettings.getProperty("CBEnchantItem", 4037);
      MAX_ENCHANT = communitySettings.getProperty("CBEnchantItem", 20);
      ENCHANT_LEVELS = communitySettings.getProperty("CBEnchantLvl", new int[]
      {
        1
      });
      ENCHANT_PRICE_WPN = communitySettings.getProperty("CBEnchantPriceWeapon", new int[]
      {
        1
      });
      ENCHANT_PRICE_ARM = communitySettings.getProperty("CBEnchantPriceArmor", new int[]
      {
        1
      });
      ENCHANT_ATTRIBUTE_LEVELS = communitySettings.getProperty("CBEnchantAtributeLvlWeapon", new int[]
      {
        1
      });
      ENCHANT_ATTRIBUTE_LEVELS_ARM = communitySettings.getProperty("CBEnchantAtributeLvlArmor", new int[]
      {
        1
      });
      ATTRIBUTE_PRICE_WPN = communitySettings.getProperty("CBEnchantAtributePriceWeapon", new int[]
      {
        1
      });
      ATTRIBUTE_PRICE_ARM = communitySettings.getProperty("CBEnchantAtributePriceArmor", new int[]
      {
        1
      });
      ENCHANT_ATT_PVP = communitySettings.getProperty("CBEnchantAtributePvP", false);
    }
  }
View Full Code Here

  /**
   * Method loadTelnetConfig.
   */
  public static void loadTelnetConfig()
  {
    ExProperties telnetSettings = load(TELNET_CONFIGURATION_FILE);
    IS_TELNET_ENABLED = telnetSettings.getProperty("EnableTelnet", false);
    TELNET_DEFAULT_ENCODING = telnetSettings.getProperty("TelnetEncoding", "UTF-8");
    TELNET_PORT = telnetSettings.getProperty("Port", 7000);
    TELNET_HOSTNAME = telnetSettings.getProperty("BindAddress", "127.0.0.1");
    TELNET_PASSWORD = telnetSettings.getProperty("Password", "");
  }
View Full Code Here

  /**
   * Method loadResidenceConfig.
   */
  public static void loadResidenceConfig()
  {
    ExProperties residenceSettings = load(RESIDENCE_CONFIG_FILE);
    CH_BID_GRADE1_MINCLANLEVEL = residenceSettings.getProperty("ClanHallBid_Grade1_MinClanLevel", 2);
    CH_BID_GRADE1_MINCLANMEMBERS = residenceSettings.getProperty("ClanHallBid_Grade1_MinClanMembers", 1);
    CH_BID_GRADE1_MINCLANMEMBERSLEVEL = residenceSettings.getProperty("ClanHallBid_Grade1_MinClanMembersAvgLevel", 1);
    CH_BID_GRADE2_MINCLANLEVEL = residenceSettings.getProperty("ClanHallBid_Grade2_MinClanLevel", 2);
    CH_BID_GRADE2_MINCLANMEMBERS = residenceSettings.getProperty("ClanHallBid_Grade2_MinClanMembers", 1);
    CH_BID_GRADE2_MINCLANMEMBERSLEVEL = residenceSettings.getProperty("ClanHallBid_Grade2_MinClanMembersAvgLevel", 1);
    CH_BID_GRADE3_MINCLANLEVEL = residenceSettings.getProperty("ClanHallBid_Grade3_MinClanLevel", 2);
    CH_BID_GRADE3_MINCLANMEMBERS = residenceSettings.getProperty("ClanHallBid_Grade3_MinClanMembers", 1);
    CH_BID_GRADE3_MINCLANMEMBERSLEVEL = residenceSettings.getProperty("ClanHallBid_Grade3_MinClanMembersAvgLevel", 1);
    RESIDENCE_LEASE_FUNC_MULTIPLIER = residenceSettings.getProperty("ResidenceLeaseFuncMultiplier", 1.);
    RESIDENCE_LEASE_MULTIPLIER = residenceSettings.getProperty("ResidenceLeaseMultiplier", 1.);
    CASTLE_SELECT_HOURS = residenceSettings.getProperty("CastleSelectHours", new int[]
    {
      16,
      20
    });
    int[] tempCastleValidatonTime = residenceSettings.getProperty("CastleValidationDate", new int[]
    {
      2,
      4,
      2003
    });
View Full Code Here

  /**
   * Method loadTopSettings.
   */
  public static void loadTopSettings()
  {
    ExProperties topSettings = load(TOP_FILE);
    L2_TOP_MANAGER_ENABLED = topSettings.getProperty("L2TopManagerEnabled", false);
    L2_TOP_MANAGER_INTERVAL = topSettings.getProperty("L2TopManagerInterval", 300000);
    L2_TOP_WEB_ADDRESS = topSettings.getProperty("L2TopWebAddress", "");
    L2_TOP_SMS_ADDRESS = topSettings.getProperty("L2TopSmsAddress", "");
    L2_TOP_SERVER_ADDRESS = topSettings.getProperty("L2TopServerAddress", "Lineage2GoD.com");
    L2_TOP_SAVE_DAYS = topSettings.getProperty("L2TopSaveDays", 30);
    L2_TOP_REWARD = topSettings.getProperty("L2TopReward", new int[0]);
    L2_TOP_SERVER_PREFIX = topSettings.getProperty("L2TopServerPrefix", "");
    L2_TOP_REWARD_NO_CLAN = topSettings.getProperty("L2TopRewardNoClan", new int[0]);
    MMO_TOP_MANAGER_ENABLED = topSettings.getProperty("MMOTopEnable", false);
    MMO_TOP_MANAGER_INTERVAL = topSettings.getProperty("MMOTopManagerInterval", 300000);
    MMO_TOP_WEB_ADDRESS = topSettings.getProperty("MMOTopUrl", "");
    MMO_TOP_SERVER_ADDRESS = topSettings.getProperty("MMOTopServerAddress", "Lineage2GoD.com");
    MMO_TOP_SAVE_DAYS = topSettings.getProperty("MMOTopSaveDays", 30);
    MMO_TOP_REWARD = topSettings.getProperty("MMOTopReward", new int[0]);
    MMO_TOP_REWARD_NO_CLAN = topSettings.getProperty("MMOTopRewardNoClan", new int[0]);
  }
View Full Code Here

  /**
   * Method loadPaymentConfig.
   */
  public static void loadPaymentConfig()
  {
    ExProperties paymentSetting = load(PAYMENT_CONFIG_FILE);
    SMS_PAYMENT_MANAGER_ENABLED = paymentSetting.getProperty("SMSPaymentEnabled", false);
    SMS_PAYMENT_WEB_ADDRESS = paymentSetting.getProperty("SMSPaymentWebAddress", "");
    SMS_PAYMENT_MANAGER_INTERVAL = paymentSetting.getProperty("SMSPaymentManagerInterval", 300000);
    SMS_PAYMENT_SAVE_DAYS = paymentSetting.getProperty("SMSPaymentSaveDays", 30);
    SMS_PAYMENT_SERVER_ADDRESS = paymentSetting.getProperty("SMSPaymentServerAddress", "Lineage2GoD.com");
    SMS_PAYMENT_REWARD = paymentSetting.getProperty("SMSPaymentReward", new int[0]);
    SMS_PAYMENT_REWARD_NO_CLAN = paymentSetting.getProperty("SMSPaymentRewardNoClan", new int[0]);
    SMS_PAYMENT_TYPE = paymentSetting.getProperty("SMSPaymentProfitOrSum", true);
    SMS_PAYMENT_PREFIX = paymentSetting.getProperty("SMSPaymentPrefix", "");
  }
View Full Code Here

  /**
   * Method loadOtherConfig.
   */
  public static void loadOtherConfig()
  {
    ExProperties otherSettings = load(OTHER_CONFIG_FILE);
    AWAKING_FREE = otherSettings.getProperty("AwakingFree", false);
    DEEPBLUE_DROP_RULES = otherSettings.getProperty("UseDeepBlueDropRules", true);
    DEEPBLUE_DROP_MAXDIFF = otherSettings.getProperty("DeepBlueDropMaxDiff", 8);
    DEEPBLUE_DROP_RAID_MAXDIFF = otherSettings.getProperty("DeepBlueDropRaidMaxDiff", 2);
    SWIMING_SPEED = otherSettings.getProperty("SwimingSpeedTemplate", 50);
    INVENTORY_MAXIMUM_NO_DWARF = otherSettings.getProperty("MaximumSlotsForNoDwarf", 80);
    INVENTORY_MAXIMUM_DWARF = otherSettings.getProperty("MaximumSlotsForDwarf", 100);
    INVENTORY_MAXIMUM_GM = otherSettings.getProperty("MaximumSlotsForGMPlayer", 250);
    QUEST_INVENTORY_MAXIMUM = otherSettings.getProperty("MaximumSlotsForQuests", 100);
    MULTISELL_SIZE = otherSettings.getProperty("MultisellPageSize", 10);
    WAREHOUSE_SLOTS_NO_DWARF = otherSettings.getProperty("BaseWarehouseSlotsForNoDwarf", 100);
    WAREHOUSE_SLOTS_DWARF = otherSettings.getProperty("BaseWarehouseSlotsForDwarf", 120);
    WAREHOUSE_SLOTS_CLAN = otherSettings.getProperty("MaximumWarehouseSlotsForClan", 200);
    FREIGHT_SLOTS = otherSettings.getProperty("MaximumFreightSlots", 10);
    SHOW_ENCHANT_EFFECT_RESULT = otherSettings.getProperty("ShowEnchantEffectResult", false);
    OVERENCHANT_LIMIT1 = otherSettings.getProperty("overEnchantLimit1", 3);
    OVERENCHANT_LIMIT2 = otherSettings.getProperty("overEnchantLimit2", 6);
    OVERENCHANT_LIMIT3 = otherSettings.getProperty("overEnchantLimit3", 9);
    OVERENCHANT_LIMIT4 = otherSettings.getProperty("overEnchantLimit4", 19);
    OVERENCHANT_MUL1 = otherSettings.getProperty("overEnchantMul1", 2);
    OVERENCHANT_MUL2 = otherSettings.getProperty("overEnchantMul2", 3);
    OVERENCHANT_MUL3 = otherSettings.getProperty("overEnchantMul3", 4);
    OVERENCHANT_MUL4 = otherSettings.getProperty("overEnchantMul4", 5);
    BLESSED_ARMOR_WEAPON_MUL = otherSettings.getProperty("blessedArmorWeaponMul", 1.5);
     REGEN_SIT_WAIT = otherSettings.getProperty("RegenSitWait", false);
    STARTING_ADENA = otherSettings.getProperty("StartingAdena", 0);
    STARTING_LEVEL = otherSettings.getProperty("StartingLevel", 1);
    UNSTUCK_SKILL = otherSettings.getProperty("UnstuckSkill", true);
    RESPAWN_RESTORE_CP = otherSettings.getProperty("RespawnRestoreCP", 0.) / 100;
    RESPAWN_RESTORE_HP = otherSettings.getProperty("RespawnRestoreHP", 65.) / 100;
    RESPAWN_RESTORE_MP = otherSettings.getProperty("RespawnRestoreMP", 0.) / 100;
    MAX_PVTSTORE_SLOTS_DWARF = otherSettings.getProperty("MaxPvtStoreSlotsDwarf", 5);
    MAX_PVTSTORE_SLOTS_OTHER = otherSettings.getProperty("MaxPvtStoreSlotsOther", 4);
    MAX_PVTCRAFT_SLOTS = otherSettings.getProperty("MaxPvtManufactureSlots", 20);
    SENDSTATUS_TRADE_JUST_OFFLINE = otherSettings.getProperty("SendStatusTradeJustOffline", false);
    SENDSTATUS_TRADE_MOD = otherSettings.getProperty("SendStatusTradeMod", 1.);
    ANNOUNCE_MAMMON_SPAWN = otherSettings.getProperty("AnnounceMammonSpawn", true);
    GM_NAME_COLOUR = Integer.decode("0x" + otherSettings.getProperty("GMNameColour", "FFFFFF"));
    GM_HERO_AURA = otherSettings.getProperty("GMHeroAura", false);
    NORMAL_NAME_COLOUR = Integer.decode("0x" + otherSettings.getProperty("NormalNameColour", "FFFFFF"));
    CLANLEADER_NAME_COLOUR = Integer.decode("0x" + otherSettings.getProperty("ClanleaderNameColour", "FFFFFF"));
    GAME_POINT_ITEM_ID = otherSettings.getProperty("GamePointItemId", -1);
    SAFE_ENCHANT_LVL = otherSettings.getProperty("SafeEnchant", 0);
    REMOVE_UNKNOWN_QUEST = otherSettings.getProperty("RemoveUnknownQuest", false);
    ALLOW_MENTOR_BUFFS_IN_OFFLINE_MODE = otherSettings.getProperty("AllowMentorBuffsInOfflineMode", false);
  }
View Full Code Here

    _currentCycle = ServerVariables.getInt("Olympiad_CurrentCycle", -1);
    _period = ServerVariables.getInt("Olympiad_Period", -1);
    _olympiadEnd = ServerVariables.getLong("Olympiad_End", -1);
    _validationEnd = ServerVariables.getLong("Olympiad_ValdationEnd", -1);
    _nextWeeklyChange = ServerVariables.getLong("Olympiad_NextWeeklyChange", -1);
    ExProperties olympiadProperties = Config.load(Config.OLYMPIAD_DATA_FILE);
    if (_currentCycle == -1)
    {
      _currentCycle = olympiadProperties.getProperty("CurrentCycle", 1);
    }
    if (_period == -1)
    {
      _period = olympiadProperties.getProperty("Period", 0);
    }
    if (_olympiadEnd == -1)
    {
      _olympiadEnd = olympiadProperties.getProperty("OlympiadEnd", 0L);
    }
    if (_validationEnd == -1)
    {
      _validationEnd = olympiadProperties.getProperty("ValdationEnd", 0L);
    }
    if (_nextWeeklyChange == -1)
    {
      _nextWeeklyChange = olympiadProperties.getProperty("NextWeeklyChange", 0L);
    }
    initStadiums();
    OlympiadHistoryManager.getInstance();
    OlympiadNobleDAO.getInstance().select();
    OlympiadDatabase.loadNoblesRank();
View Full Code Here

TOP

Related Classes of lineage2.commons.configuration.ExProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.