From e096c1b5e406cd8abe0a949b7b234dbc9b4dfd12 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 27 Apr 2018 13:02:22 +0000 Subject: [PATCH] Addition of config for disabling player keyboard movement. --- .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ L2J_Mobius_3.0_Helios/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ .../dist/game/config/main/other.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 12 ++++++++---- .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../network/clientpackets/FinishRotating.java | 6 ++++++ .../clientpackets/MoveBackwardToLocation.java | 4 ++++ .../network/clientpackets/StartRotating.java | 6 ++++++ 40 files changed, 182 insertions(+), 4 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini index 953db43818..0a9c17d342 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini @@ -704,6 +704,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java index aa243cddd1..44eda3078d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -263,6 +263,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1714,6 +1715,7 @@ public final class Config AUTO_LOOT_ITEM_IDS.add(itm); } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 9840c999e8..ceb9f603c2 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 1f32183b83..e53ed2b89f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -116,6 +116,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index f8f85742e7..43dc5ad39a 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini index 596d5eaed6..90ecbd24ad 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini @@ -704,6 +704,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java index bf69f046f0..c113f13be0 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -269,6 +269,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1729,6 +1730,7 @@ public final class Config AUTO_LOOT_ITEM_IDS.add(itm); } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 9840c999e8..ceb9f603c2 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 1f32183b83..e53ed2b89f 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -116,6 +116,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index f8f85742e7..43dc5ad39a 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini index 596d5eaed6..90ecbd24ad 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini @@ -704,6 +704,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java index 5015f236b5..3daaa0b01b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -269,6 +269,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1737,6 +1738,7 @@ public final class Config AUTO_LOOT_ITEM_IDS.add(itm); } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 9840c999e8..ceb9f603c2 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 1f32183b83..e53ed2b89f 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -116,6 +116,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index f8f85742e7..43dc5ad39a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini index daab30e78a..01021f4ab4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini @@ -704,6 +704,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java index 9dd229df76..138b3d4f37 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -269,6 +269,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1736,6 +1737,7 @@ public final class Config AUTO_LOOT_ITEM_IDS.add(itm); } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 9840c999e8..ceb9f603c2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 1f32183b83..e53ed2b89f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -116,6 +116,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index f8f85742e7..43dc5ad39a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_C6_Interlude/dist/game/config/main/other.ini b/L2J_Mobius_C6_Interlude/dist/game/config/main/other.ini index 9b2e405873..e687c6e41e 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/config/main/other.ini +++ b/L2J_Mobius_C6_Interlude/dist/game/config/main/other.ini @@ -74,6 +74,10 @@ RaidMaxRespawnMultiplier = 1.0 # Minions respawn timer 300000 = 5 mins RaidMinionRespawnTime = 300000 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # Unstuck interval, seconds, default is 300 sec. UnstuckInterval = 300 diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java index 381fc17640..94c9549efa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java @@ -273,6 +273,7 @@ public final class Config public static List STARTING_CUSTOM_ITEMS_F = new ArrayList<>(); public static List STARTING_CUSTOM_ITEMS_M = new ArrayList<>(); public static boolean DEEPBLUE_DROP_RULES; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int DEATH_PENALTY_CHANCE; public static int PLAYER_SPAWN_PROTECTION; @@ -1607,6 +1608,7 @@ public final class Config } } + ENABLE_KEYBOARD_MOVEMENT = Boolean.parseBoolean(otherSettings.getProperty("KeyboardMovement", "true")); UNSTUCK_INTERVAL = Integer.parseInt(otherSettings.getProperty("UnstuckInterval", "300")); /* Player protection after teleport or login */ diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 2fc1c24c0f..10d06791b7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.serverpackets.StopRotation; @@ -34,6 +35,11 @@ public final class FinishRotating extends L2GameClientPacket @Override protected void runImpl() { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance player = getClient().getActiveChar(); if (player == null) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 03ab05d7ae..3aaba9f52f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -125,6 +125,10 @@ public class MoveBackwardToLocation extends L2GameClientPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index 6e2087ca48..43b7ff09c0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.network.serverpackets.BeginRotation; public final class StartRotating extends L2GameClientPacket @@ -33,6 +34,11 @@ public final class StartRotating extends L2GameClientPacket @Override protected void runImpl() { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + if (getClient().getActiveChar() == null) { return; diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Character.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Character.ini index 28e43d942d..632aaaf15f 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Character.ini +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Character.ini @@ -742,6 +742,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java index f8e228ab7c..f021d0ad21 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java @@ -263,6 +263,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1874,19 +1875,22 @@ public final class Config AUTO_LOOT_ITEM_IDS = new ArrayList<>(autoLootItemIds.length); for (String item : autoLootItemIds) { + Integer itm = 0; try { - if (!item.isEmpty()) - { - AUTO_LOOT_ITEM_IDS.add(Integer.parseInt(item)); - } + itm = Integer.parseInt(item); } catch (NumberFormatException nfe) { LOGGER.warning("Auto loot item ids: Wrong ItemId passed: " + item); LOGGER.warning(nfe.getMessage()); } + if (itm != 0) + { + AUTO_LOOT_ITEM_IDS.add(itm); + } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 77a68f7edc..681bdaeb00 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 89b0fbf8f3..7e8d7ed2b2 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -118,6 +118,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index ca60508c8c..3d6555a578 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini index e86aac5fe6..5433f1a393 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini @@ -653,6 +653,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java index 12db6d3e10..ce0e026a94 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java @@ -267,6 +267,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1658,6 +1659,7 @@ public final class Config AUTO_LOOT_ITEM_IDS.add(itm); } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 9840c999e8..ceb9f603c2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 1f32183b83..e53ed2b89f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -116,6 +116,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index f8f85742e7..43dc5ad39a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/Character.ini index e86aac5fe6..5433f1a393 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.0_Zaken/dist/game/config/Character.ini @@ -653,6 +653,10 @@ RaidLootRightsCCSize = 45 # Default: 0 AutoLootItemIds = 0 +# Enable keyboard movement. +# Retail: True +KeyboardMovement = True + # This is the time in seconds that it will take for the player command "/unstuck" to activate. # Default: 300 UnstuckInterval = 300 diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java index e67197017c..bad877ff32 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/Config.java @@ -267,6 +267,7 @@ public final class Config public static int LOOT_RAIDS_PRIVILEGE_INTERVAL; public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE; public static List AUTO_LOOT_ITEM_IDS; + public static boolean ENABLE_KEYBOARD_MOVEMENT; public static int UNSTUCK_INTERVAL; public static int TELEPORT_WATCHDOG_TIMEOUT; public static int PLAYER_SPAWN_PROTECTION; @@ -1662,6 +1663,7 @@ public final class Config AUTO_LOOT_ITEM_IDS.add(itm); } } + ENABLE_KEYBOARD_MOVEMENT = Character.getBoolean("KeyboardMovement", true); UNSTUCK_INTERVAL = Character.getInt("UnstuckInterval", 300); TELEPORT_WATCHDOG_TIMEOUT = Character.getInt("TeleportWatchdogTimeout", 0); PLAYER_SPAWN_PROTECTION = Character.getInt("PlayerSpawnProtection", 0); diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java index 9840c999e8..ceb9f603c2 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/FinishRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -42,6 +43,11 @@ public final class FinishRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) { diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java index 1f32183b83..e53ed2b89f 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/MoveBackwardToLocation.java @@ -116,6 +116,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket } else // 0 { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } activeChar.setCursorKeyMovement(true); } diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java index f8f85742e7..43dc5ad39a 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/network/clientpackets/StartRotating.java @@ -16,6 +16,7 @@ */ package com.l2jmobius.gameserver.network.clientpackets; +import com.l2jmobius.Config; import com.l2jmobius.commons.network.PacketReader; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.L2GameClient; @@ -41,6 +42,11 @@ public final class StartRotating implements IClientIncomingPacket @Override public void run(L2GameClient client) { + if (!Config.ENABLE_KEYBOARD_MOVEMENT) + { + return; + } + final L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) {