/** * Asking from CharSelect to create a character, moving to CharCreate window * * @param {number} index - slot where to create character */ function onCreateRequest( index ) { _creationSlot = index; CharSelect.remove(); CharCreate.setAccountSex( Session.Sex ); CharCreate.onCharCreationRequest = onCharCreationRequest; CharCreate.onExitRequest = function(){ CharCreate.remove(); CharSelect.append(); }; CharCreate.append(); }
/** * User ask to connect with its player * * @param {object} entity to connect with */ function onConnectRequest( entity ) { // Play sound Sound.play('\xB9\xF6\xC6\xB0\xBC\xD2\xB8\xAE.wav'); CharSelect.remove(); UIManager.getComponent('WinLoading').append(); Session.Character = entity; var pkt = new PACKET.CH.SELECT_CHAR(); pkt.CharNum = entity.CharNum; Network.sendPacket(pkt); }