public void Update(StatedMapUpdateMessage message) { foreach (InteractiveObject interactive in m_interactives) { interactive.ResetState(); } foreach (StatedElement element in message.statedElements) { Update(element); } }
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(); }
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)); } } }
public static Task HandleStatedMapUpdateMessage(Account account, StatedMapUpdateMessage message) => Task.Run(() => account.Game.Map.Update(message));
public void HandleStatedMapUpdateMessage(Bot bot, StatedMapUpdateMessage message) { bot.Character.Map.Update(message); }