Key mapping packets moved to settings package.
This commit is contained in:
		@@ -44,6 +44,7 @@ public class PlayerVariables extends AbstractVariables
 | 
			
		||||
	public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
 | 
			
		||||
	public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
 | 
			
		||||
	public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
 | 
			
		||||
	public static final String UI_KEY_MAPPING = "UI_KEY_MAPPING";
 | 
			
		||||
	public static final String CLIENT_SETTINGS = "CLIENT_SETTINGS";
 | 
			
		||||
	public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
 | 
			
		||||
	public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
 | 
			
		||||
 
 | 
			
		||||
@@ -120,6 +120,8 @@ import org.l2jmobius.gameserver.network.clientpackets.sayune.RequestFlyMove;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.sayune.RequestFlyMoveStart;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.settings.ExInteractModify;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.settings.ExSaveItemAnnounceSetting;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.settings.RequestKeyMapping;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.settings.RequestSaveKeyMapping;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.CannotMoveAnymoreInShuttle;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.MoveToLocationInShuttle;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.RequestShuttleGetOff;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,13 +14,14 @@
 | 
			
		||||
 * 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 org.l2jmobius.gameserver.network.clientpackets;
 | 
			
		||||
package org.l2jmobius.gameserver.network.clientpackets.settings;
 | 
			
		||||
 | 
			
		||||
import org.l2jmobius.Config;
 | 
			
		||||
import org.l2jmobius.commons.network.PacketReader;
 | 
			
		||||
import org.l2jmobius.gameserver.model.actor.Player;
 | 
			
		||||
import org.l2jmobius.gameserver.network.GameClient;
 | 
			
		||||
import org.l2jmobius.gameserver.network.serverpackets.ExUISetting;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
 | 
			
		||||
import org.l2jmobius.gameserver.network.serverpackets.settings.ExUISetting;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author KenM / mrTJO
 | 
			
		||||
@@ -14,13 +14,15 @@
 | 
			
		||||
 * 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 org.l2jmobius.gameserver.network.clientpackets;
 | 
			
		||||
package org.l2jmobius.gameserver.network.clientpackets.settings;
 | 
			
		||||
 | 
			
		||||
import org.l2jmobius.Config;
 | 
			
		||||
import org.l2jmobius.commons.network.PacketReader;
 | 
			
		||||
import org.l2jmobius.gameserver.model.actor.Player;
 | 
			
		||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
 | 
			
		||||
import org.l2jmobius.gameserver.network.ConnectionState;
 | 
			
		||||
import org.l2jmobius.gameserver.network.GameClient;
 | 
			
		||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Request Save Key Mapping client packet.
 | 
			
		||||
@@ -28,8 +30,8 @@ import org.l2jmobius.gameserver.network.GameClient;
 | 
			
		||||
 */
 | 
			
		||||
public class RequestSaveKeyMapping implements IClientIncomingPacket
 | 
			
		||||
{
 | 
			
		||||
	public static final String UI_KEY_MAPPING_VAR = "UI_KEY_MAPPING";
 | 
			
		||||
	public static final String SPLIT_VAR = "	";
 | 
			
		||||
	
 | 
			
		||||
	private byte[] _uiKeyMapping;
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
@@ -60,6 +62,6 @@ public class RequestSaveKeyMapping implements IClientIncomingPacket
 | 
			
		||||
		{
 | 
			
		||||
			uiKeyMapping += b + SPLIT_VAR;
 | 
			
		||||
		}
 | 
			
		||||
		player.getVariables().set(UI_KEY_MAPPING_VAR, uiKeyMapping);
 | 
			
		||||
		player.getVariables().set(PlayerVariables.UI_KEY_MAPPING, uiKeyMapping);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -14,27 +14,28 @@
 | 
			
		||||
 * 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 org.l2jmobius.gameserver.network.serverpackets;
 | 
			
		||||
package org.l2jmobius.gameserver.network.serverpackets.settings;
 | 
			
		||||
 | 
			
		||||
import org.l2jmobius.commons.network.PacketWriter;
 | 
			
		||||
import org.l2jmobius.gameserver.model.actor.Player;
 | 
			
		||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
 | 
			
		||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
 | 
			
		||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author Mobius
 | 
			
		||||
 */
 | 
			
		||||
public class ExUISetting implements IClientOutgoingPacket
 | 
			
		||||
{
 | 
			
		||||
	public static final String UI_KEY_MAPPING_VAR = "UI_KEY_MAPPING";
 | 
			
		||||
	public static final String SPLIT_VAR = "	";
 | 
			
		||||
	
 | 
			
		||||
	private final byte[] _uiKeyMapping;
 | 
			
		||||
	
 | 
			
		||||
	public ExUISetting(Player player)
 | 
			
		||||
	{
 | 
			
		||||
		if (player.getVariables().hasVariable(UI_KEY_MAPPING_VAR))
 | 
			
		||||
		if (player.getVariables().hasVariable(PlayerVariables.UI_KEY_MAPPING))
 | 
			
		||||
		{
 | 
			
		||||
			_uiKeyMapping = player.getVariables().getByteArray(UI_KEY_MAPPING_VAR, SPLIT_VAR);
 | 
			
		||||
			_uiKeyMapping = player.getVariables().getByteArray(PlayerVariables.UI_KEY_MAPPING, SPLIT_VAR);
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
		Reference in New Issue
	
	Block a user