From e0cdf660bb5a972441ea534eeed6bb6b4c720d47 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 19 Apr 2021 18:53:26 -0500 Subject: [PATCH] Make skin-select only for items for now --- scripts/server/client.js | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/scripts/server/client.js b/scripts/server/client.js index 2c0fd89a..e6824287 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -825,20 +825,15 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) { if(allowedSkinIndex == -1) { return false; } else { - if(isPlayerCreatingCharacter(client)) { - getPlayerData(client).creatingCharacterSkin = allowedSkinIndex; - showPlayerNewCharacterGUI(client); - } else { - getPlayerCurrentSubAccount(client).skin = getGameData().allowedSkins[getServerGame()][allowedSkinIndex][0]; - if(isPlayerWorking(client)) { - messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working."); - setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId); - } - deleteItem(getPlayerData(client).itemActionItem); - restorePlayerCamera(client); - cachePlayerHotBarItems(client); - meActionToNearbyPlayers(client, `changes their skin to ${getGameData().allowedSkins[getServerGame()][allowedSkinIndex][1]}`); + getPlayerCurrentSubAccount(client).skin = allowedSkins[getServerGame()][allowedSkinIndex][0]; + if(isPlayerWorking(client)) { + messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working."); + setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId); } + deleteItem(getPlayerData(client).itemActionItem); + restorePlayerCamera(client); + cachePlayerHotBarItems(client); + meActionToNearbyPlayers(client, `changes their skin to ${allowedSkins[getServerGame()][allowedSkinIndex][1]}`); } triggerNetworkEvent("ag.skinSelect", client, false); } @@ -849,10 +844,4 @@ function sendPlayerChatScrollLines(client, amount) { triggerNetworkEvent("ag.chatScrollLines", client, amount); } -// =========================================================================== - -function sendPlayerAllowedSkins(client) { - triggerNetworkEvent("ag.allowedSkins", client, getGameData().allowedSkins[getServerGame()]); -} - // =========================================================================== \ No newline at end of file