Make skin-select only for items for now
This commit is contained in:
@@ -825,20 +825,15 @@ 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;
|
if(isPlayerWorking(client)) {
|
||||||
showPlayerNewCharacterGUI(client);
|
messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working.");
|
||||||
} else {
|
setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId);
|
||||||
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]}`);
|
|
||||||
}
|
}
|
||||||
|
deleteItem(getPlayerData(client).itemActionItem);
|
||||||
|
restorePlayerCamera(client);
|
||||||
|
cachePlayerHotBarItems(client);
|
||||||
|
meActionToNearbyPlayers(client, `changes their skin to ${allowedSkins[getServerGame()][allowedSkinIndex][1]}`);
|
||||||
}
|
}
|
||||||
triggerNetworkEvent("ag.skinSelect", client, false);
|
triggerNetworkEvent("ag.skinSelect", client, false);
|
||||||
}
|
}
|
||||||
@@ -849,10 +844,4 @@ function sendPlayerChatScrollLines(client, amount) {
|
|||||||
triggerNetworkEvent("ag.chatScrollLines", client, amount);
|
triggerNetworkEvent("ag.chatScrollLines", client, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
function sendPlayerAllowedSkins(client) {
|
|
||||||
triggerNetworkEvent("ag.allowedSkins", client, getGameData().allowedSkins[getServerGame()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user