Ejemplo n.º 1
0
 public void CombatLogChanged(BasicCombatLogEntry entry)
 {
     if (entry.Subtype == CombatLogEntrySubtype.KILL && NpcIds.Contains(WowGUID.NpcId(entry.DestinationGuid)))
     {
         ++Killed;
     }
 }
Ejemplo n.º 2
0
        public void Parse(long timestamp, List <string> args)
        {
            AmeisenLogger.I.Log("CombatLogParser", $"[{timestamp}] Parsing CombatLog: {JsonConvert.SerializeObject(args)}", LogLevel.Verbose);

            if (BasicCombatLogEntry.TryParse(args, out BasicCombatLogEntry basicCombatLogEntry))
            {
                (CombatLogEntryType, CombatLogEntrySubtype)key = (basicCombatLogEntry.Type, basicCombatLogEntry.Subtype);
                WowInterface.BotCache.CacheCombatLogEntry(key, basicCombatLogEntry);
            }
        }
Ejemplo n.º 3
0
        public void CombatLogChanged(BasicCombatLogEntry entry)
        {
            var wowUnit = WowInterface.ObjectManager.GetWowObjectByGuid <WowUnit>(entry.DestinationGuid);

            if (entry.Subtype == CombatLogEntrySubtype.KILL && NpcIds.Contains(WowGuid.ToNpcId(entry.DestinationGuid)) &&
                wowUnit != null && wowUnit.IsTaggedByMe)
            {
                ++Killed;
            }
        }
Ejemplo n.º 4
0
        public void Parse(long timestamp, List <string> args)
        {
            AmeisenLogger.I.Log("CombatLogParser", $"[{timestamp}] Parsing CombatLog: {JsonConvert.SerializeObject(args)}", LogLevel.Verbose);

            if (BasicCombatLogEntry.TryParse(args, out BasicCombatLogEntry basicCombatLogEntry))
            {
                KeyValuePair <CombatLogEntryType, CombatLogEntrySubtype> key = new KeyValuePair <CombatLogEntryType, CombatLogEntrySubtype>(basicCombatLogEntry.Type, basicCombatLogEntry.Subtype);
                WowInterface.Db.CacheCombatLogEntry(key, basicCombatLogEntry);
                WowInterface.Db.GetCombatLogSubject().Next(basicCombatLogEntry);
            }
        }
Ejemplo n.º 5
0
 public void CacheCombatLogEntry(KeyValuePair <CombatLogEntryType, CombatLogEntrySubtype> key, BasicCombatLogEntry entry)
 {
     if (!CombatLogEntries.ContainsKey(key.Key))
     {
         CombatLogEntries.TryAdd(key.Key, new Dictionary <CombatLogEntrySubtype, List <BasicCombatLogEntry> >()
         {
             { key.Value, new List <BasicCombatLogEntry>() }
         });
     }
     else if (!CombatLogEntries[key.Key].ContainsKey(key.Value))
     {
         CombatLogEntries[key.Key].Add(key.Value, new List <BasicCombatLogEntry>()
         {
             entry
         });
     }
     else
     {
         CombatLogEntries[key.Key][key.Value].Add(entry);
     }
 }