コード例 #1
0
 private void GameFightShowFighterMessageHandler(DofusClient client, GameFightShowFighterMessage message)
 {
     if (message.Informations.ContextualId == client.Account.Character.Id)
     {
         client.Logger.Log("Vous êtes entré dans un combat !", LogMessageType.Info);
     }
 }
コード例 #2
0
ファイル: FightData.cs プロジェクト: snakeddp/cookiebot
 private void HandleGameFightShowFighterMessage(IAccount account, GameFightShowFighterMessage message)
 {
     lock (CheckLock)
     {
         AddFighter(message.Informations);
     }
 }
コード例 #3
0
 private void HandleCharacterSelectedSuccessMessages(GameFightShowFighterMessage message, ConnectedHost source)
 {
     if (source.Bot.Game.Player.PlayerBaseInformations.Id == message.informations.contextualId)
     {
         Stats = message.informations.stats;
     }
     OnUpdated();
 }
コード例 #4
0
 public void HandleGameFightShowFighterMessage(Bot bot, GameFightShowFighterMessage 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.AddActor(message.informations);
 }
コード例 #5
0
        public static void GameFightShowFighterMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightShowFighterMessage msg = (GameFightShowFighterMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.FightData.AddFighter(msg.informations);
        }
コード例 #6
0
 public static void HandleGameFightShowFighterMessage(Bot bot, GameFightShowFighterMessage message)
 {
     if (!bot.Character.IsFighting())
     {
         logger.Error("Received GameFightShowFighterMessage but character is not in fight !");
     }
     else
     {
         bot.Character.Fight.AddFighter(message.informations);
     }
 }
コード例 #7
0
ファイル: FightGame.cs プロジェクト: Kuh4ku/Mercybot
        public void Update(GameFightShowFighterMessage message)
        {
            if (message.Informations.ContextualId == _account.Game.Character.Id)
            {
                PlayedFighter = new FightPlayerEntry(message.Informations);
            }
            else
            {
                AddFighter(message.Informations);
            }

            SortFighters();
            FightersUpdated?.Invoke();
        }
コード例 #8
0
        public static void GameFightShowFighterMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightShowFighterMessage msg = (GameFightShowFighterMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Fight == null)
            {
                return;
            }
            if (msg.informations is GameFightMonsterInformations)
            {
                GameFightMonsterInformations infos = (GameFightMonsterInformations)msg.informations;
                account.Fight.Fighters.Add(new BFighter(msg.informations.contextualId, msg.informations.disposition.cellId, msg.informations.stats.actionPoints, msg.informations.stats, msg.informations.alive, msg.informations.stats.lifePoints, msg.informations.stats.maxLifePoints, msg.informations.stats.movementPoints, (uint)msg.informations.teamId, infos.creatureGenericId));
            }
            else
            {
                account.Fight.Fighters.Add(new BFighter(msg.informations.contextualId, msg.informations.disposition.cellId, msg.informations.stats.actionPoints, msg.informations.stats, msg.informations.alive, msg.informations.stats.lifePoints, msg.informations.stats.maxLifePoints, msg.informations.stats.movementPoints, (uint)msg.informations.teamId, 0));
            }
        }
コード例 #9
0
        public async Task Update(GameFightShowFighterMessage message)
        {
            // Avoid kicking monsters or ourselves..
            if (_account.Game.Fight.Allies.FirstOrDefault(a => a.ContextualId == message.Informations.ContextualId) == null)
            {
                return;
            }

            // If this account is a group chief and a non-member joins the fight
            if (_account.HasGroup && _account.IsGroupChief)
            {
                if (!_account.Group.IsGroupMember(message.Informations.ContextualId))
                {
                    await Task.Delay(800);

                    await _account.Network.SendMessageAsync(new GameContextKickMessage(message.Informations.ContextualId));

                    _account.Logger.LogWarning(LanguageManager.Translate("472"), LanguageManager.Translate("393"));

                    // If this person took a member's place, send a group signal so that the member joins again
                    _account.Group.SignalMembersToJoinFight();
                }
            }
        }
コード例 #10
0
ファイル: FightFrame.cs プロジェクト: Kuh4ku/Mercybot
 public static Task HandleGameFightShowFighterMessage(Account account, GameFightShowFighterMessage message)
 => Task.Run(async() =>
 {
     account.Game.Fight.Update(message);
     await account.Extensions.Fights.Update(message);
 });
コード例 #11
0
ファイル: FightingFrame.cs プロジェクト: tuita520/RaidBot
 private void HandleMapComplementaryInformationsDataMessage(GameFightShowFighterMessage message, ConnectedHost source)
 {
     fight.AddFighter(message.informations);
 }