Exemplo n.º 1
0
        public virtual void RaisePCItemsUpdated(ConcurrentDictionary <uint, ActorItem> actorItems)
        {
            var raised = new ActorItemsEvent(this, actorItems);
            EventHandler <ActorItemsEvent> handler = this.PCItemsUpdated;

            handler?.Invoke(this, raised);
        }
        // private static void OnNewChatLogEntry(object sender, ChatLogEntryEvent chatLogEntryEvent)
        // {
        // // delegate event from chat log, not required to subsribe
        // // this updates 100 times a second and only sends a line when it gets a new one
        // if (sender == null)
        // {
        // return;
        // }
        // var chatLogEntry = chatLogEntryEvent.ChatLogEntry;
        // }
        private static void OnMonsterItemsUpdated(object sender, ActorItemsEvent actorItemsEvent)
        {
            // delegate event from monster entities from ram, not required to subsribe
            // this updates 10x a second and only sends data if the items are found in ram
            // currently there no change/new/removed event handling (looking into it)
            if (sender == null)
            {
                return;
            }

            ConcurrentDictionary <uint, ActorItem> monsterEntities = actorItemsEvent.ActorItems;

            XIVInfoViewModel.Instance.CurrentMonsters = monsterEntities;
        }
        private static void OnNewNPCItemsUpdated(object sender, ActorItemsEvent actorItemsEvent)
        {
            // delegate event from npc entities from ram, not required to subsribe
            // this list includes anything that is not a player or monster
            // this updates 10x a second and only sends data if the items are found in ram
            // currently there no change/new/removed event handling (looking into it)
            if (sender == null)
            {
                return;
            }

            ConcurrentDictionary <uint, ActorItem> npcEntities = actorItemsEvent.ActorItems;

            XIVInfoViewModel.Instance.CurrentNPCs = npcEntities;
        }