Make skin-select only for items for now

This commit is contained in:
Vortrex
2021-04-19 18:53:26 -05:00
parent 0da8c07fc0
commit e0cdf660bb

View File

@@ -825,11 +825,7 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) {
if(allowedSkinIndex == -1) { if(allowedSkinIndex == -1) {
return false; return false;
} else { } else {
if(isPlayerCreatingCharacter(client)) { getPlayerCurrentSubAccount(client).skin = allowedSkins[getServerGame()][allowedSkinIndex][0];
getPlayerData(client).creatingCharacterSkin = allowedSkinIndex;
showPlayerNewCharacterGUI(client);
} else {
getPlayerCurrentSubAccount(client).skin = getGameData().allowedSkins[getServerGame()][allowedSkinIndex][0];
if(isPlayerWorking(client)) { if(isPlayerWorking(client)) {
messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working."); 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); setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId);
@@ -837,8 +833,7 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) {
deleteItem(getPlayerData(client).itemActionItem); deleteItem(getPlayerData(client).itemActionItem);
restorePlayerCamera(client); restorePlayerCamera(client);
cachePlayerHotBarItems(client); cachePlayerHotBarItems(client);
meActionToNearbyPlayers(client, `changes their skin to ${getGameData().allowedSkins[getServerGame()][allowedSkinIndex][1]}`); meActionToNearbyPlayers(client, `changes their skin to ${allowedSkins[getServerGame()][allowedSkinIndex][1]}`);
}
} }
triggerNetworkEvent("ag.skinSelect", client, false); triggerNetworkEvent("ag.skinSelect", client, false);
} }
@@ -850,9 +845,3 @@ function sendPlayerChatScrollLines(client, amount) {
} }
// =========================================================================== // ===========================================================================
function sendPlayerAllowedSkins(client) {
triggerNetworkEvent("ag.allowedSkins", client, getGameData().allowedSkins[getServerGame()]);
}
// ===========================================================================