private void EnterWorldBtn_OnClicked(Button btn)
        {
            CharactersListWindow characterListWindow = (CharactersListWindow)windowService.Get("CharacterList");

            int index     = characterListWindow.CharacterElements.IndexOf(characterListWindow.CharacterElementSelected);
            var character = characters[index];

            var selectCharacterMessageData = new SelectCharacterMessageData();

            selectCharacterMessageData.CharacterId = character.Id;
            outgoingMessageService.Send(selectCharacterMessageData);
        }
        public SNMessageData GetMessageData(short type)
        {
            ZoneMessageTypes header  = (ZoneMessageTypes)type;
            SNMessageData    message = null;

            switch (header)
            {
                #region Authentification
            case ZoneMessageTypes.PlayerLogin:
                message = new PlayerLoginMessageData();
                break;

            case ZoneMessageTypes.RequestCharacters:
                message = new RequestCharactersMessageData();
                break;

            case ZoneMessageTypes.SelectCharacter:
                message = new SelectCharacterMessageData();
                break;

            case ZoneMessageTypes.CharacterLoaded:
                message = new CharacterLoadedMessageData();
                break;
                #endregion

                #region Players
            case ZoneMessageTypes.PlayerDirection:
                message = new PlayerDirectionMessageData();
                break;
                #endregion

            default:
                loggingService.Log($"Cannot build zone message {header.ToString()}", LogMessageType.WARNING);
                break;
            }

            return(message);
        }