Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java Mon Jan 19 23:26:36 1970
- +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java Mon Jan 19 23:26:36 1970
- @@ -14143,11 +14143,11 @@
- {
- idlist.add(tpbookmark.get(count)._id);
- count++;
- }
- - for(int i=1; i<10; i++)
- + for(int i=1; i<(isGM() ? Config.ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS_GM : Config.ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS); i++)
- {
- if(!idlist.contains(i))
- {
- id = i;
- break;
- --- java/com/l2jserver/gameserver/scripting/L2ScriptEngineManager.java Mon Jan 19 23:26:36 1970
- +++ java/com/l2jserver/gameserver/scripting/L2ScriptEngineManager.java Mon Jan 19 23:26:36 1970
- @@ -72,35 +72,35 @@
- // TODO move to config file
- /**
- * Informs(logs) the scripts being loaded.<BR>
- * Apply only when executing script from files.<BR>
- */
- - private final boolean VERBOSE_LOADING = false;
- + //private final boolean VERBOSE_LOADING = false;
- /**
- * If the script engine supports compilation the script is compiled before execution.<BR>
- */
- - private final boolean ATTEMPT_COMPILATION = true;
- + //private final boolean ATTEMPT_COMPILATION = true;
- /**
- * Use Compiled Scripts Cache.<BR>
- * Only works if ATTEMPT_COMPILATION is true.<BR>
- * DISABLED DUE ISSUES (if a superclass file changes subclasses are not recompiled where they should)
- */
- - private final boolean USE_COMPILED_CACHE = false;
- + //private final boolean USE_COMPILED_CACHE = false;
- /**
- * Clean an previous error log(if such exists) for the script being loaded before trying to load.<BR>
- * Apply only when executing script from files.<BR>
- */
- - private final boolean PURGE_ERROR_LOG = true;
- + //private final boolean PURGE_ERROR_LOG = true;
- private L2ScriptEngineManager()
- {
- ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
- List<ScriptEngineFactory> factories = scriptEngineManager.getEngineFactories();
- - if (USE_COMPILED_CACHE)
- + if (Config.USE_COMPILED_CACHE)
- {
- _cache = this.loadCompiledScriptCache();
- }
- else
- {
- @@ -281,11 +281,11 @@
- {
- for (File file : dir.listFiles())
- {
- if (file.isDirectory() && recurseDown && maxDepth > currentDepth)
- {
- - if (VERBOSE_LOADING)
- + if (Config.VERBOSE_LOADING)
- {
- _log.info("Entering folder: " + file.getName());
- }
- this.executeAllScriptsInDirectory(file, recurseDown, maxDepth, currentDepth + 1);
- }
- @@ -330,11 +330,11 @@
- return _cache;
- }
- public CompiledScriptCache loadCompiledScriptCache()
- {
- - if (USE_COMPILED_CACHE)
- + if (Config.USE_COMPILED_CACHE)
- {
- File file = new File(SCRIPT_FOLDER, "CompiledScripts.cache");
- if (file.isFile())
- {
- ObjectInputStream ois = null;
- @@ -406,26 +406,26 @@
- public void executeScript(ScriptEngine engine, File file) throws FileNotFoundException, ScriptException
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
- - if (VERBOSE_LOADING)
- + if (Config.VERBOSE_LOADING)
- {
- _log.info("Loading Script: " + file.getAbsolutePath());
- }
- - if (PURGE_ERROR_LOG)
- + if (Config.PURGE_ERROR_LOG)
- {
- String name = file.getAbsolutePath() + ".error.log";
- File errorLog = new File(name);
- if (errorLog.isFile())
- {
- errorLog.delete();
- }
- }
- - if (engine instanceof Compilable && ATTEMPT_COMPILATION)
- + if (engine instanceof Compilable && Config.ATTEMPT_COMPILATION)
- {
- ScriptContext context = new SimpleScriptContext();
- context.setAttribute("mainClass", getClassForFile(file).replace('/', '.').replace('\\', '.'), ScriptContext.ENGINE_SCOPE);
- context.setAttribute(ScriptEngine.FILENAME, file.getName(), ScriptContext.ENGINE_SCOPE);
- context.setAttribute("classpath", SCRIPT_FOLDER.getAbsolutePath(), ScriptContext.ENGINE_SCOPE);
- @@ -435,11 +435,11 @@
- this.setCurrentLoadingScript(file);
- ScriptContext ctx = engine.getContext();
- try
- {
- engine.setContext(context);
- - if (USE_COMPILED_CACHE)
- + if (Config.USE_COMPILED_CACHE)
- {
- CompiledScript cs = _cache.loadCompiledScript(engine, file);
- cs.eval(context);
- }
- else
- @@ -506,11 +506,11 @@
- return getScriptContext(engine);
- }
- public Object eval(ScriptEngine engine, String script, ScriptContext context) throws ScriptException
- {
- - if (engine instanceof Compilable && ATTEMPT_COMPILATION)
- + if (engine instanceof Compilable && Config.ATTEMPT_COMPILATION)
- {
- Compilable eng = (Compilable) engine;
- CompiledScript cs = eng.compile(script);
- return context != null ? cs.eval(context) : cs.eval();
- }
- --- java/com/l2jserver/gameserver/templates/skills/L2EffectType.java Mon Jan 19 23:26:36 1970
- +++ java/com/l2jserver/gameserver/templates/skills/L2EffectType.java Mon Jan 19 23:26:36 1970
- @@ -51,10 +51,11 @@
- STUN_SELF,
- PHYSICAL_MUTE,
- PHYSICAL_ATTACK_MUTE,
- REMOVE_TARGET,
- TARGET_ME,
- + SILENCE_MAGIC_PHYSICAL,
- BETRAY,
- NOBLESSE_BLESSING,
- PHOENIX_BLESSING,
- PETRIFICATION,
- BLUFF,
- --- java/com/l2jserver/Config.java Mon Jan 19 23:26:36 1970
- +++ java/com/l2jserver/Config.java Mon Jan 19 23:26:36 1970
- @@ -434,10 +434,14 @@
- public static boolean DEVELOPER;
- public static boolean ACCEPT_GEOEDITOR_CONN;
- public static boolean ALT_DEV_NO_HANDLERS;
- public static boolean ALT_DEV_NO_QUESTS;
- public static boolean ALT_DEV_NO_SPAWNS;
- + public static boolean VERBOSE_LOADING;
- + public static boolean ATTEMPT_COMPILATION;
- + public static boolean USE_COMPILED_CACHE;
- + public static boolean PURGE_ERROR_LOG;
- public static int THREAD_P_EFFECTS;
- public static int THREAD_P_GENERAL;
- public static int GENERAL_PACKET_THREAD_CORE_SIZE;
- public static int IO_PACKET_THREAD_CORE_SIZE;
- public static int GENERAL_THREAD_CORE_SIZE;
- @@ -887,10 +891,12 @@
- public static double ALT_SIEGE_DUSK_GATES_PDEF_MULT;
- public static double ALT_SIEGE_DAWN_GATES_MDEF_MULT;
- public static double ALT_SIEGE_DUSK_GATES_MDEF_MULT;
- public static boolean ALT_STRICT_SEVENSIGNS;
- public static boolean ALT_SEVENSIGNS_LAZY_UPDATE;
- + public static int ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS;
- + public static int ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS_GM;
- //--------------------------------------------------
- // Server Settings
- //--------------------------------------------------
- @@ -971,10 +977,11 @@
- public static String SERVER_VERSION;
- public static String SERVER_BUILD_DATE;
- public static String DATAPACK_VERSION;
- public static int PVP_NORMAL_TIME;
- public static int PVP_PVP_TIME;
- +
- public static enum IdFactoryType
- {
- Compaction,
- BitSet,
- Stack
- @@ -1436,10 +1443,12 @@
- ALT_SIEGE_DUSK_GATES_PDEF_MULT = Double.parseDouble(Feature.getProperty("AltDuskGatesPdefMult", "0.8"));
- ALT_SIEGE_DAWN_GATES_MDEF_MULT = Double.parseDouble(Feature.getProperty("AltDawnGatesMdefMult", "1.1"));
- ALT_SIEGE_DUSK_GATES_MDEF_MULT = Double.parseDouble(Feature.getProperty("AltDuskGatesMdefMult", "0.8"));
- ALT_STRICT_SEVENSIGNS = Boolean.parseBoolean(Feature.getProperty("StrictSevenSigns", "True"));
- ALT_SEVENSIGNS_LAZY_UPDATE = Boolean.parseBoolean(Feature.getProperty("AltSevenSignsLazyUpdate", "True"));
- + ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS = Integer.parseInt(Feature.getProperty("AltMyTeleportBookmarkMaxSlots", "9")) + 1;
- + ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS_GM = Integer.parseInt(Feature.getProperty("AltMyTeleportBookmarkMaxSlotsGM", "96")) + 1;
- TAKE_FORT_POINTS = Integer.parseInt(Feature.getProperty("TakeFortPoints", "200"));
- LOOSE_FORT_POINTS = Integer.parseInt(Feature.getProperty("LooseFortPoints", "0"));
- TAKE_CASTLE_POINTS = Integer.parseInt(Feature.getProperty("TakeCastlePoints", "1500"));
- LOOSE_CASTLE_POINTS = Integer.parseInt(Feature.getProperty("LooseCastlePoints", "3000"));
- @@ -1888,10 +1897,14 @@
- DEVELOPER = Boolean.parseBoolean(General.getProperty("Developer", "false"));
- ACCEPT_GEOEDITOR_CONN = Boolean.parseBoolean(General.getProperty("AcceptGeoeditorConn", "false"));
- ALT_DEV_NO_HANDLERS = Boolean.parseBoolean(General.getProperty("AltDevNoHandlers", "False"));
- ALT_DEV_NO_QUESTS = Boolean.parseBoolean(General.getProperty("AltDevNoQuests", "False"));
- ALT_DEV_NO_SPAWNS = Boolean.parseBoolean(General.getProperty("AltDevNoSpawns", "False"));
- + VERBOSE_LOADING = Boolean.parseBoolean(General.getProperty("AltVerbooseScriptLoading", "False"));
- + ATTEMPT_COMPILATION = Boolean.parseBoolean(General.getProperty("AltAttemptCompillation", "True"));
- + USE_COMPILED_CACHE = Boolean.parseBoolean(General.getProperty("AltUseCompilledCache", "False"));
- + PURGE_ERROR_LOG = Boolean.parseBoolean(General.getProperty("AltPurgeErrorLog", "True"));
- THREAD_P_EFFECTS = Integer.parseInt(General.getProperty("ThreadPoolSizeEffects", "10"));
- THREAD_P_GENERAL = Integer.parseInt(General.getProperty("ThreadPoolSizeGeneral", "13"));
- IO_PACKET_THREAD_CORE_SIZE = Integer.parseInt(General.getProperty("UrgentPacketThreadCoreSize", "2"));
- GENERAL_PACKET_THREAD_CORE_SIZE = Integer.parseInt(General.getProperty("GeneralPacketThreadCoreSize", "4"));
- GENERAL_THREAD_CORE_SIZE = Integer.parseInt(General.getProperty("GeneralThreadCoreSize", "4"));
- --- dist/game/config/Feature.properties Mon Jan 19 23:26:36 1970
- +++ dist/game/config/Feature.properties Mon Jan 19 23:26:36 1970
- @@ -355,6 +355,13 @@
- # Other
- # ---------------------------------------------------------------------------
- # Allow riding wyvern during Castle/Fort Siege
- # Default: True
- -AllowRideWyvernDuringSiege = True
- \ No newline at end of file
- +AllowRideWyvernDuringSiege = True
- +
- +# Set maximum allowed myteleport bookmark slots for players
- +# Default: 9
- +AltMyTeleportBookmarkMaxSlots = 9
- +# Set maximum allowed myteleport bookmark slots for GMs and admins
- +# Default: 96
- +AltMyTeleportBookmarkMaxSlotsGM = 96
- \ No newline at end of file
- --- dist/game/config/General.properties Mon Jan 19 23:26:36 1970
- +++ dist/game/config/General.properties Mon Jan 19 23:26:36 1970
- @@ -926,6 +926,20 @@
- # Default: False
- AltDevNoQuests = False
- # Don't load spawntable.
- # Default: False
- -AltDevNoSpawns = False
- \ No newline at end of file
- +AltDevNoSpawns = False
- +
- +# ---------------------------------------------------------------------------
- +# Scripting Engine Settings
- +# ---------------------------------------------------------------------------
- +# Do not touch these if you do not know what you are doing.
- +
- +# Default: False
- +AltVerbooseScriptLoading = False
- +# Default: True
- +AltAttemptCompillation = True
- +# Default: False
- +AltUseCompilledCache = False
- +# Default: True
- +AltPurgeErrorLog = True
- \ No newline at end of file
- --- dist/game/data/scripts/handlers/itemhandlers/TeleportBookmark.java Mon Jan 19 23:26:36 1970
- +++ dist/game/data/scripts/handlers/itemhandlers/TeleportBookmark.java Mon Jan 19 23:26:36 1970
- @@ -12,10 +12,11 @@
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
- package handlers.itemhandlers;
- +import com.l2jserver.Config;
- import com.l2jserver.gameserver.handler.IItemHandler;
- import com.l2jserver.gameserver.model.L2ItemInstance;
- import com.l2jserver.gameserver.model.actor.L2Playable;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.network.SystemMessageId;
- @@ -34,11 +35,11 @@
- if (playable == null || item == null || !(playable instanceof L2PcInstance))
- return;
- L2PcInstance player = (L2PcInstance) playable;
- - if(player.getBookMarkSlot() >= 9)
- + if(player.getBookMarkSlot() >= (player.isGM() ? Config.ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS_GM : Config.ALT_MAX_MYTELEPORT_BOOKMARK_SLOTS) - 1)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_NUMBER_OF_MY_TELEPORTS_SLOTS_HAS_REACHED_ITS_MAXIMUM_LIMIT));
- return;
- }
Add Comment
Please, Sign In to add comment