Ejemplo n.º 1
0
 private void SetDamageEvents(List <Event> events, List <NPC> npcs)
 {
     foreach (Event e in events)
     {
         if (e.SrcInstid == Instid || e.SrcMasterInstid == Instid)
         {
             if (e.IFF == IFF.Foe && e.DstInstid != 0 &&
                 npcs.Where(i => i.Instid == e.DstInstid).Any(j => j.Name != null))
             {
                 if (e.StateChange == StateChange.None)
                 {
                     if (e.IsBuff && e.BuffDmg != 0)
                     {
                         DamageEvents.Add(new CombatEvent()
                         {
                             Time       = e.Time,
                             Damage     = e.BuffDmg,
                             SkillId    = e.SkillId,
                             IsBuff     = e.IsBuff,
                             Result     = e.Result,
                             IsNinety   = e.IsNinety,
                             IsMoving   = e.IsMoving,
                             IsFlanking = e.IsFlanking,
                             Target     = e.DstInstid
                         });
                     }
                     else if (!e.IsBuff && e.Value != 0)
                     {
                         DamageEvents.Add(new CombatEvent()
                         {
                             Time       = e.Time,
                             Damage     = e.Value,
                             SkillId    = e.SkillId,
                             IsBuff     = e.IsBuff,
                             Result     = e.Result,
                             IsNinety   = e.IsNinety,
                             IsMoving   = e.IsMoving,
                             IsFlanking = e.IsFlanking,
                             Target     = e.DstInstid
                         });
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void SetDamageEvents(List <Event> events, NPC target)
 {
     foreach (Event e in events)
     {
         if (e.SrcInstid == Instid || e.SrcMasterInstid == Instid)
         {
             if (e.DstInstid == target.Instid && e.IFF == IFF.Foe)
             {
                 if (e.StateChange == StateChange.None)
                 {
                     if (e.IsBuff && e.BuffDmg != 0)
                     {
                         DamageEvents.Add(new CombatEvent()
                         {
                             Time       = e.Time,
                             Damage     = e.BuffDmg,
                             SkillId    = e.SkillId,
                             IsBuff     = e.IsBuff,
                             Result     = e.Result,
                             IsNinety   = e.IsNinety,
                             IsMoving   = e.IsMoving,
                             IsFlanking = e.IsFlanking
                         });
                     }
                     else if (!e.IsBuff && e.Value != 0)
                     {
                         DamageEvents.Add(new CombatEvent()
                         {
                             Time       = e.Time,
                             Damage     = e.Value,
                             SkillId    = e.SkillId,
                             IsBuff     = e.IsBuff,
                             Result     = e.Result,
                             IsNinety   = e.IsNinety,
                             IsMoving   = e.IsMoving,
                             IsFlanking = e.IsFlanking
                         });
                     }
                 }
             }
         }
     }
 }