コード例 #1
0
ファイル: Fight.cs プロジェクト: Seth-/BehaviorIsManaged
        public void Update(GameFightTurnListMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            foreach (var deadsId in msg.deadsIds)
            {
                var fighter = GetFighter(deadsId);

                if (fighter == null)
                {
                    logger.Error("(GameFightTurnListMessage) Fighter {0} not found", deadsId);
                }
                else
                {
                    fighter.IsAlive = false;
                }
            }

            foreach (var id in msg.ids)
            {
                var fighter = GetFighter(id);

                if (fighter == null)
                {
                    logger.Error("(GameFightTurnListMessage) Fighter {0} not found", id);
                }
                else
                {
                    fighter.IsAlive = false;
                }
            }
        }
コード例 #2
0
 public void HandleGameFightTurnListMessage(Bot bot, GameFightTurnListMessage message)
 {
     if (bot == null || bot.Character == null || bot.Character.Fight == null)
     {
         logger.Error("Fight is not properly initialized.");
         return; // Can't handle the message
     }
     bot.Character.Fight.Update(message);
 }
コード例 #3
0
 public static void HandleGameFightTurnListMessage(Bot bot, GameFightTurnListMessage message)
 {
     if (!bot.Character.IsFighting())
     {
         logger.Error("Received GameFightTurnListMessage but character is not in fight !");
     }
     else
     {
         bot.Character.Fight.Update(message);
     }
 }
コード例 #4
0
 private void GameFightTurnListMessageHandler(DofusClient client, GameFightTurnListMessage message)
 {
     //
 }