public void HandleGameEntitiesDispositionMessage(Bot bot, GameEntitiesDispositionMessage 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 HandleGameEntitiesDispositionMessage(Bot bot, GameEntitiesDispositionMessage message) { if (!bot.Character.IsFighting()) { logger.Error("Received GameEntitiesDispositionMessage but character is not in fight !"); } else { bot.Character.Fight.Update(message); } }
private void HandleGameEntitiesDispositionMessage(IAccount account, GameEntitiesDispositionMessage message) { message.Dispositions.ToList().ForEach(d => { var fighter = (Fighter)GetFighter(d.ObjectId); if (fighter != null) { fighter.CellId = d.CellId; } }); Account.Character.Status = CharacterStatus.Fighting; }
private void GameEntitiesDispositionMessageHandler(DofusClient client, GameEntitiesDispositionMessage message) { var _ListDispositions = message.Dispositions; foreach (var player in _ListDispositions) { if (player.ObjectId == client.Account.Character.Id) { client.Logger.Log("Actualisation des joueurs: Vous êtes sur la cellID: " + player.CellId); } } }
private void HandleMapComplementaryInformationsDataMessage(GameEntitiesDispositionMessage message, ConnectedHost source) { foreach (IdentifiedEntityDispositionInformations infos in message.dispositions) { if (infos.id == this.Id) { CellId = infos.cellId; break; } } OnUpdated(); }
public async Task Update(GameEntitiesDispositionMessage message) { if (!IsDoingTutorial) { return; } if (_currentStepNumber == 6) { ValidateCurrentStep(); await Task.Delay(1000); _account.Network.SendMessage(new GameFightReadyMessage(true)); } }
public static void GameEntitiesDispositionMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameEntitiesDispositionMessage msg = (GameEntitiesDispositionMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } if (account.Fight != null) { msg.dispositions.ToList().ForEach(d => { account.FightData.UpdateFighterCell(d.id, d.cellId); }); } account.SetStatus(Status.Fighting); }
public void Update(GameEntitiesDispositionMessage msg) { if (msg == null) { throw new ArgumentNullException("msg"); } foreach (IdentifiedEntityDispositionInformations disposition in msg.dispositions) { Fighter fighter = GetFighter(disposition.id); // seems like the client don't cares if (fighter != null) { fighter.Update(disposition); } } }
public static void GameEntitiesDispositionMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameEntitiesDispositionMessage msg = (GameEntitiesDispositionMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } if (account.Fight != null) { msg.dispositions.ToList().ForEach(d => { var fighter = account.Fight.GetFighter(d.id); if (fighter != null) { ((BFighter)fighter).CellId = d.cellId; } }); } account.SetStatus(Status.Fighting); }
public void Update(GameEntitiesDispositionMessage msg) { if (msg == null) { throw new ArgumentNullException("msg"); } foreach (IdentifiedEntityDispositionInformations disposition in msg.dispositions) { Fighter fighter = GetFighter(disposition.id); // seems like the client don't cares if (fighter == null) { logger.Error(string.Format("(GameEntitiesDispositionMessage) Fight {0} not found", disposition.id)); } else { fighter.Update(disposition); } } }
public void Update(GameEntitiesDispositionMessage message) { foreach (IdentifiedEntityDispositionInformations infos in message.dispositions) { foreach (FighterModel fighter in Defenders) { if (fighter.ContextualId == infos.id) { fighter.CellId = infos.cellId; break; } } foreach (FighterModel fighter in Challengers) { if (fighter.ContextualId == infos.id) { fighter.CellId = infos.cellId; break; } } } }
public static Task HandleGameEntitiesDispositionMessage(Account account, GameEntitiesDispositionMessage message) => Task.Run(async() => { account.Game.Fight.Update(message); await account.Extensions.CharacterCreation.Update(message); });
public void Update(GameEntitiesDispositionMessage message) { message.Dispositions.ForEach(d => GetFighter(d.Id)?.Update(d)); FightersUpdated?.Invoke(); }
private void HandleMapComplementaryInformationsDataMessage(GameEntitiesDispositionMessage message, ConnectedHost source) { fight.Update(message); }