Beispiel #1
0
        public static void HandleGameActionFightNoSpellCastMessage(Bot bot, GameActionFightNoSpellCastMessage message)
        {
            if (bot == null || bot.Character == null || bot.Character.Fight == null)
            {
                logger.Error("Fight is not properly initialized.");
                return; // Can't handle the message
            }
            PlayedFighter fighter = bot.Character.Fighter;

            if (fighter != null)
            {
                fighter.Update(message);
            }
        }
Beispiel #2
0
        public async Task Update(GameActionFightNoSpellCastMessage message)
        {
            _account.Logger.LogError(LanguageManager.Translate("472"), LanguageManager.Translate("54"));

            try
            {
                if (_spellIndex >= Spells.Count)
                {
                    await EndTurn();
                }
                else
                {
                    await ProcessNextSpell(Spells[_spellIndex]);
                }
            }
            catch { }
        }
Beispiel #3
0
 public static Task HandleGameActionFightNoSpellCastMessage(Account account, GameActionFightNoSpellCastMessage message)
 => Task.Run(async() =>
 {
     await account.Extensions.Fights.Update(message);
 });