예제 #1
0
 public void Update(GameFightUpdateTeamMessage message)
 {
     if (_account.State == AccountStates.FIGHTING && message.Team.LeaderId == _account.Game.Character.Id && FightId == 0)
     {
         FightId = message.FightId;
         FightIdReceived?.Invoke();
     }
 }
예제 #2
0
        public void Update(GameFightUpdateTeamMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            Id = msg.fightId;

            GetTeam(msg.team.teamId).Update(msg.team);
        }
예제 #3
0
        public void Update()
        {
            var msg = new GameFightUpdateTeamMessage((short)Fight.Id, GetFightTeamInformations());

            Fight.Send(msg);

            if (Fight.ShowBlades && !Fight.Started)
            {
                Fight.Map.Instance.Send(msg);
            }
        }
예제 #4
0
 public static void HandleGameFightUpdateTeamMessage(Bot bot, GameFightUpdateTeamMessage message)
 {
     if (!bot.Character.IsFighting())
     {
         logger.Error("Received GameFightUpdateTeamMessage but character is not in fight !");
     }
     else
     {
         bot.Character.Fight.Update(message);
     }
 }
예제 #5
0
 public void HandleGameFightUpdateTeamMessage(Bot bot, GameFightUpdateTeamMessage message)
 {
     if (bot == null || bot.Character == null || bot.Character.Fight == null)
     {
         logger.Error("Fight is not properly initialized.");
         return; // Can't handle the message
     }
     if (bot.Character.Fight.Id == message.fightId)
     {
         bot.Character.Fight.Update(message);
     }
 }
예제 #6
0
 public static Task HandleGameFightUpdateTeamMessage(Account account, GameFightUpdateTeamMessage message)
 => Task.Run(() => account.Game.Fight.Update(message));
예제 #7
0
 private void GameFightUpdateTeamMessageHandler(DofusClient client, GameFightUpdateTeamMessage message)
 {
     //
 }