Beispiel #1
0
        public void Update(GameActionFightSummonMessage message)
        {
            AddFighter(message.Summon);
            SortFighters();

            FightersUpdated?.Invoke();
        }
 public void HandleGameActionFightSummonMessage(Bot bot, GameActionFightSummonMessage 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.summon);
 }
Beispiel #3
0
 private void HandleGameActionFightSummonMessage(IAccount account, GameActionFightSummonMessage message)
 {
     lock (CheckLock)
     {
         foreach (var summon in message.Summons)
         {
             AddFighter(summon);
         }
     }
 }
Beispiel #4
0
        public static void GameActionFightSummonMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameActionFightSummonMessage msg = (GameActionFightSummonMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.FightData.AddSummon(msg.sourceId, new BFighter(msg.summon.contextualId, msg.summon.disposition.cellId, msg.summon.stats.actionPoints, msg.summon.stats, msg.summon.alive, msg.summon.stats.lifePoints, msg.summon.stats.maxLifePoints, msg.summon.stats.movementPoints, (uint)msg.summon.teamId, 0));
        }
Beispiel #5
0
        public static void GameActionFightSummonMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameActionFightSummonMessage msg = (GameActionFightSummonMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            msg.Summons.ForEach(summon =>
                                account.FightData.AddSummon(
                                    (long)msg.SourceId, new BFighter(
                                        summon.ContextualId, summon.Disposition.CellId,
                                        summon.Stats.ActionPoints, summon.Stats, summon.Alive,
                                        (int)summon.Stats.LifePoints, (int)summon.Stats.MaxLifePoints,
                                        summon.Stats.MovementPoints, (uint)summon.TeamId, 0))
                                );
        }
Beispiel #6
0
 public static Task HandleGameActionFightSummonMessage(Account account, GameActionFightSummonMessage message)
 => Task.Run(() => account.Game.Fight.Update(message));