Exemplo n.º 1
0
        public void Update(StatedMapUpdateMessage message)
        {
            foreach (InteractiveObject interactive in m_interactives)
            {
                interactive.ResetState();
            }

            foreach (StatedElement element in message.statedElements)
            {
                Update(element);
            }
        }
Exemplo n.º 2
0
 private void HandleMapComplementaryInformationsDataMessage(StatedMapUpdateMessage message, ConnectedHost source)
 {
     foreach (StatedElement element in message.statedElements)
     {
         ElementModel value;
         if (Interactives.TryGetValue(element.elementId, out value))
         {
             value.Update(element);
         }
     }
     OnUpdated();
 }
Exemplo n.º 3
0
 private void HandleStatedMapUpdateMessage(IAccount account, StatedMapUpdateMessage message)
 {
     lock (CheckLock)
     {
         foreach (var statedElementDofus in message.StatedElements)
         {
             if (!statedElementDofus.OnCurrentMap)
             {
                 continue;
             }
             var selectedStatedElement = StatedElements.GetValue(statedElementDofus.ElementId);
             if (selectedStatedElement != null)
             {
                 StatedElements.Remove((int)selectedStatedElement.Id);
             }
             StatedElements.Add(statedElementDofus.ElementId,
                                new StatedElement(statedElementDofus.ElementCellId, (uint)statedElementDofus.ElementId,
                                                  statedElementDofus.ElementState));
         }
     }
 }
Exemplo n.º 4
0
 public static Task HandleStatedMapUpdateMessage(Account account, StatedMapUpdateMessage message)
 => Task.Run(() => account.Game.Map.Update(message));
Exemplo n.º 5
0
 public void HandleStatedMapUpdateMessage(Bot bot, StatedMapUpdateMessage message)
 {
     bot.Character.Map.Update(message);
 }