protected AbstractDamageEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem.Time) { From = agentData.GetAgent(evtcItem.SrcAgent); To = agentData.GetAgent(evtcItem.DstAgent); Skill = skillData.Get(evtcItem.SkillID); IsOverNinety = evtcItem.IsNinety > 0; AgainstUnderFifty = evtcItem.IsFifty > 0; IsMoving = evtcItem.IsMoving > 0; IsFlanking = evtcItem.IsFlanking > 0; IFF = evtcItem.IFF; }
internal AbstractDamageEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem.Time) { From = agentData.GetAgent(evtcItem.SrcAgent, evtcItem.Time); To = agentData.GetAgent(evtcItem.DstAgent, evtcItem.Time); Skill = skillData.Get(evtcItem.SkillID); IsOverNinety = evtcItem.IsNinety > 0; AgainstUnderFifty = evtcItem.IsFifty > 0; IsMoving = (evtcItem.IsMoving & 1) > 0; AgainstMoving = (evtcItem.IsMoving & 2) > 0; IsFlanking = evtcItem.IsFlanking > 0; _iff = evtcItem.IFF; }
internal GuildEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem) { Src = agentData.GetAgent(evtcItem.SrcAgent, evtcItem.Time); Guid = new byte[16]; byte[] first8 = BitConverter.GetBytes(evtcItem.DstAgent); byte[] mid4 = BitConverter.GetBytes(evtcItem.Value); byte[] last4 = BitConverter.GetBytes(evtcItem.BuffDmg); Guid = new byte[first8.Length + mid4.Length + last4.Length]; first8.CopyTo(Guid, 0); mid4.CopyTo(Guid, first8.Length); last4.CopyTo(Guid, first8.Length + mid4.Length); }
public static List <AnimatedCastEvent> CreateCastEvents(Dictionary <ulong, List <CombatItem> > castEventsBySrcAgent, AgentData agentData, SkillData skillData) { var res = new List <AnimatedCastEvent>(); foreach (KeyValuePair <ulong, List <CombatItem> > pair in castEventsBySrcAgent) { #if DEBUG AgentItem a = agentData.GetAgent(pair.Key); #endif CombatItem startItem = null; foreach (CombatItem c in pair.Value) { if (c.IsActivation.StartCasting()) { // missing end if (startItem != null) { res.Add(new AnimatedCastEvent(startItem, agentData, skillData, c.Time)); } startItem = c; } else if (c.IsActivation.EndCasting()) { if (startItem != null && startItem.SkillID == c.SkillID) { res.Add(new AnimatedCastEvent(startItem, agentData, skillData, c)); startItem = null; } // missing start else { var toCheck = new AnimatedCastEvent(agentData, skillData, c); // only keep if list is empty as we are only interested in animations started before log starts if (!res.Any()) { res.Add(toCheck); } } } } // missing end if (startItem != null) { res.Add(new AnimatedCastEvent(startItem, agentData, skillData, long.MaxValue)); } } res.Sort((x, y) => x.Time.CompareTo(y.Time)); return(res); }
internal EffectEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem, agentData) { if (evtcItem.DstAgent != 0) { Dst = agentData.GetAgent(evtcItem.DstAgent, evtcItem.Time); } else { Position = new Point3D( BitConverter.ToSingle(BitConverter.GetBytes(evtcItem.Value), 0), BitConverter.ToSingle(BitConverter.GetBytes(evtcItem.BuffDmg), 0), BitConverter.ToSingle(BitConverter.GetBytes(evtcItem.OverstackValue), 0) ); } { byte[] orientationBytes = new byte[2 * sizeof(float)]; int offset = 0; orientationBytes[offset++] = evtcItem.IFFByte; orientationBytes[offset++] = evtcItem.IsBuff; orientationBytes[offset++] = evtcItem.Result; orientationBytes[offset++] = evtcItem.IsActivationByte; orientationBytes[offset++] = evtcItem.IsBuffRemoveByte; orientationBytes[offset++] = evtcItem.IsNinety; orientationBytes[offset++] = evtcItem.IsFifty; orientationBytes[offset++] = evtcItem.IsMoving; float[] orientationFloats = new float[2]; Buffer.BlockCopy(orientationBytes, 0, orientationFloats, 0, orientationBytes.Length); Orientation = new Point3D(orientationFloats[0], orientationFloats[1], BitConverter.ToSingle(BitConverter.GetBytes(evtcItem.Pad), 0)); } EffectID = evtcItem.SkillID; { byte[] durationBytes = new byte[sizeof(ushort)]; int offset = 0; durationBytes[offset++] = evtcItem.IsShields; durationBytes[offset++] = evtcItem.IsOffcycle; ushort[] durationUShort = new ushort[1]; Buffer.BlockCopy(durationBytes, 0, durationUShort, 0, durationBytes.Length); Duration = durationUShort[0]; } }
internal GuildEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem) { Src = agentData.GetAgent(evtcItem.SrcAgent, evtcItem.Time); Guid = new byte[16]; byte[] first8 = BitConverter.GetBytes(evtcItem.DstAgent); byte[] mid4 = BitConverter.GetBytes(evtcItem.Value); byte[] last4 = BitConverter.GetBytes(evtcItem.BuffDmg); // The 4 bytes at the beginning has to be flipped Guid[0] = first8[3]; Guid[1] = first8[2]; Guid[2] = first8[1]; Guid[3] = first8[0]; Guid[4] = first8[5]; Guid[5] = first8[4]; Guid[6] = first8[7]; Guid[7] = first8[6]; // mid4.CopyTo(Guid, first8.Length); last4.CopyTo(Guid, first8.Length + mid4.Length); }
internal GuildEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem) { Src = agentData.GetAgent(evtcItem.SrcAgent, evtcItem.Time); var guid = new byte[16]; byte[] first8 = BitConverter.GetBytes(evtcItem.DstAgent); byte[] mid4 = BitConverter.GetBytes(evtcItem.Value); byte[] last4 = BitConverter.GetBytes(evtcItem.BuffDmg); // The 4 bytes at the beginning has to be flipped guid[0] = first8[3]; guid[1] = first8[2]; guid[2] = first8[1]; guid[3] = first8[0]; guid[4] = first8[5]; guid[5] = first8[4]; guid[6] = first8[7]; guid[7] = first8[6]; // mid4.CopyTo(guid, first8.Length); last4.CopyTo(guid, first8.Length + mid4.Length); // _guildKey = ParserHelper.ToHexString(guid, 0, 4) + "-" + ParserHelper.ToHexString(guid, 4, 6) + "-" + ParserHelper.ToHexString(guid, 6, 8) + "-" + ParserHelper.ToHexString(guid, 8, 10) + "-" + ParserHelper.ToHexString(guid, 10, 16); }
internal AbstractBuffApplyEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, skillData) { By = agentData.GetAgent(evtcItem.SrcAgent, evtcItem.Time); To = agentData.GetAgent(evtcItem.DstAgent, evtcItem.Time); BuffInstance = evtcItem.Pad; }
internal AbstractBuffStackEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, skillData) { To = agentData.GetAgent(evtcItem.SrcAgent); }
protected AbstractMovementEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem.Time) { AgentItem = agentData.GetAgent(evtcItem.SrcAgent); _dstAgent = evtcItem.DstAgent; _value = evtcItem.Value; }