Addition of config for disabling player keyboard movement.
This commit is contained in:
@@ -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<Integer> 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);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -118,6 +118,10 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
||||
}
|
||||
else // 0
|
||||
{
|
||||
if (!Config.ENABLE_KEYBOARD_MOVEMENT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
activeChar.setCursorKeyMovement(true);
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user