33662Fermer33664
WarptenLe 07/04/2018 à 03:20
https://hastebin.com/hebakeyuwo.cs

Et pour les curieux, ca me permet de deserialiser ce genre de structures sans ecrire de fonctions en boucle

[Packet(typeof(V15595.OpcodeServer), "SMSG_SPELL_PERIODIC_AURA_LOG"), TargetBuild(15595)] public struct UserClientSpellPeriodicLogAura { public ObjectGuid64 Target { get; set; } public ObjectGuid64 Caster { get; set; } public uint SpellID { get; set; } public uint Count { get; set; } public uint AuraType { get; set; } [TypeConverter(typeof(ExpandableObjectConverter))] public class PeriodicDamageInfo { public uint Damage { get; set; } public int Overkill { get; set; } public uint SchoolMask { get; set; } public int Absorb { get; set; } public int Resist { get; set; } public byte Critical { get; set; } public override string ToString() { var sb = new StringBuilder(); sb.Append($"Damage: {Damage}"); if (Overkill > 0) sb.Append($" (Excess {Overkill})"); if (Absorb > 0) sb.Append($" (Absorbed {Absorb})"); if (Resist > 0) sb.Append($" (Resisted {Resist})"); if (Critical != 0) sb.Append(" (Critical)"); return sb.ToString(); } } [Conditional("AuraType", ConditionType.Equal, 3u, 89u)] public PeriodicDamageInfo DamageInfo { get; set; } [TypeConverter(typeof(ExpandableObjectConverter))] public class PeriodicHealInfo { public uint HealAmount { get; set; } public int Overheal { get; set; } public int Absorb { get; set; } public byte Critical { get; set; } public override string ToString() { var sb = new StringBuilder(); sb.Append($"Heal: {HealAmount}"); if (Overheal > 0) sb.Append($" (Excess {Overheal})"); if (Absorb > 0) sb.Append($" (Absorbed {Absorb})"); if (Critical != 0) sb.Append(" (Critical)"); return sb.ToString(); } } [Conditional("AuraType", ConditionType.Equal, 8u, 20u)] public PeriodicHealInfo HealInfo { get; set; } [TypeConverter(typeof(ExpandableObjectConverter))] public class PeriodicEnergizeInfo { public uint PowerType { get; set; } public uint Amount { get; set; } public override string ToString() { return $"Energize by {Amount} (Type {PowerType})"; } } [Conditional("AuraType", ConditionType.Equal, 21u, 24u)] public PeriodicEnergizeInfo Energize { get; set; } [TypeConverter(typeof(ExpandableObjectConverter))] public class PeriodicManaLeechInfo { public uint PowerType { get; set; } public uint Amount { get; set; } public float Multiplier { get; set; } public override string ToString() { return $"Energize by {Amount}x{Multiplier} (Type {PowerType})"; } } [Conditional("AuraType", ConditionType.Equal, 64u)] public PeriodicManaLeechInfo ManaLeech { get; set; } }