Exemple #1
0
 public static void HandleCharacterCreationResultMessage(FakeClient client, CharacterCreationResultMessage message)
 {
     if ((CharacterCreationResultEnum)message.result != CharacterCreationResultEnum.OK)
     {
         client.Log("Cannot create character : " + (CharacterCreationResultEnum)message.result);
     }
 }
        public void HandleCharacterCreationResultMessage(Bot bot, CharacterCreationResultMessage message)
        {
            var result = (CharacterCreationResultEnum)message.result;

            if (result != CharacterCreationResultEnum.OK)
            {
                MessageService.ShowError(View, "Cannot create the character : " + result);
            }
            else
            {
                m_characterCreationData = null;
            }
        }
        public async Task Update(CharacterCreationResultMessage message)
        {
            var result = (CharacterCreationResultEnum)message.Result;

            if (result == CharacterCreationResultEnum.OK)
            {
                _account.Logger.LogInfo(LanguageManager.Translate("516"), LanguageManager.Translate("525"));
                _created = true;
            }
            else if (result == CharacterCreationResultEnum.ERR_NAME_ALREADY_EXISTS)
            {
                _account.Logger.LogWarning(LanguageManager.Translate("516"), LanguageManager.Translate("526", result));
                await Task.Delay(1000);
                await Update(new CharactersListMessage());
            }
            else
            {
                _account.Logger.LogError(LanguageManager.Translate("516"), LanguageManager.Translate("526", result));
            }
        }
Exemple #4
0
        private void CharacterCreationResultMessageHandler(DofusClient client, CharacterCreationResultMessage message)
        {
            switch ((CharacterCreationResultEnum)message.Result)
            {
            case CharacterCreationResultEnum.OK:
                client.Account.Character.IsFirstConnection = true;
                break;

            case CharacterCreationResultEnum.ERR_NO_REASON:
                break;

            case CharacterCreationResultEnum.ERR_INVALID_NAME:
                client.Logger.Log($"Ce nom de personnage est invalide.", LogMessageType.Public);
                client.Dispose();
                break;

            case CharacterCreationResultEnum.ERR_NAME_ALREADY_EXISTS:
                client.Logger.Log($"Ce nom de personnage est déjà pris.", LogMessageType.Public);
                client.Dispose();
                break;

            case CharacterCreationResultEnum.ERR_TOO_MANY_CHARACTERS:
                client.Logger.Log($"Vous avez déjà atteint la limite de personnages disponible.", LogMessageType.Public);
                client.Dispose();
                break;

            case CharacterCreationResultEnum.ERR_NOT_ALLOWED:
                break;

            case CharacterCreationResultEnum.ERR_NEW_PLAYER_NOT_ALLOWED:
                break;

            case CharacterCreationResultEnum.ERR_RESTRICED_ZONE:
                break;

            case CharacterCreationResultEnum.ERR_INCONSISTENT_COMMUNITY:
                break;
            }
        }
Exemple #5
0
 public static Task HandleCharacterCreationResultMessage(Account account, CharacterCreationResultMessage message)
 => Task.Run(async() => await account.Extensions.CharacterCreation.Update(message));