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; } } }
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); }
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); } }
private void GameFightTurnListMessageHandler(DofusClient client, GameFightTurnListMessage message) { // }