Esempio n. 1
0
        public static void HandleSpellNonMeleeDmgLog(Packet packet)
        {
            packet.ReadPackedGuid128("Me");
            packet.ReadPackedGuid128("CasterGUID");
            packet.ReadPackedGuid128("CastID");

            packet.ReadInt32 <SpellId>("SpellID");
            if (ClientVersion.AddedInVersion(ClientVersionBuild.V7_2_0_23826))
            {
                packet.ReadInt32("SpellXSpellVisualID");
            }
            packet.ReadInt32("Damage");
            packet.ReadInt32("OverKill");

            packet.ReadByte("SchoolMask");

            packet.ReadInt32("Absorbed");
            packet.ReadInt32("Resisted");
            packet.ReadInt32("ShieldBlock");

            packet.ResetBitReader();

            packet.ReadBit("Periodic");

            packet.ReadBitsE <AttackerStateFlags>("Flags", 7);

            var hasDebugData      = packet.ReadBit("HasDebugData");
            var hasLogData        = packet.ReadBit("HasLogData");
            var hasSandboxScaling = packet.ReadBit("HasSandboxScaling");

            if (hasDebugData)
            {
                packet.ReadSingle("CritRoll");
                packet.ReadSingle("CritNeeded");
                packet.ReadSingle("HitRoll");
                packet.ReadSingle("HitNeeded");
                packet.ReadSingle("MissChance");
                packet.ReadSingle("DodgeChance");
                packet.ReadSingle("ParryChance");
                packet.ReadSingle("BlockChance");
                packet.ReadSingle("GlanceChance");
                packet.ReadSingle("CrushChance");
            }

            if (hasLogData)
            {
                SpellHandler.ReadSpellCastLogData(packet, "SpellCastLogData");
            }

            if (hasSandboxScaling)
            {
                SpellHandler.ReadSandboxScalingData(packet, "SandboxScalingData");
            }
        }
Esempio n. 2
0
        public static void HandleAttackerStateUpdate(Packet packet)
        {
            var hasLogData = packet.ReadBit("HasLogData");

            if (hasLogData)
            {
                SpellHandler.ReadSpellCastLogData(packet);
            }

            packet.ReadInt32("Size");

            ReadAttackRoundInfo(packet, "AttackRoundInfo");
        }
Esempio n. 3
0
        public static void HandleSpellHealLog(Packet packet)
        {
            packet.ReadPackedGuid128("TargetGUID");
            packet.ReadPackedGuid128("CasterGUID");

            packet.ReadInt32 <SpellId>("SpellID");
            packet.ReadInt32("Health");
            packet.ReadInt32("OverHeal");
            packet.ReadInt32("Absorbed");

            packet.ResetBitReader();

            packet.ReadBit("Crit");
            var hasCritRollMade   = packet.ReadBit("HasCritRollMade");
            var hasCritRollNeeded = packet.ReadBit("HasCritRollNeeded");
            var hasLogData        = packet.ReadBit("HasLogData");
            var hasSandboxScaling = packet.ReadBit("HasLogData");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V7_2_0_23826))
            {
                if (hasLogData)
                {
                    SpellHandler.ReadSpellCastLogData(packet);
                }
            }

            if (hasCritRollMade)
            {
                packet.ReadSingle("CritRollMade");
            }

            if (hasCritRollNeeded)
            {
                packet.ReadSingle("CritRollNeeded");
            }

            if (ClientVersion.RemovedInVersion(ClientVersionBuild.V7_2_0_23826))
            {
                if (hasLogData)
                {
                    SpellHandler.ReadSpellCastLogData(packet);
                }
            }

            if (hasSandboxScaling)
            {
                SpellHandler.ReadSandboxScalingData(packet, "SandboxScalingData");
            }
        }
Esempio n. 4
0
        public static void HandleSpellPeriodicAuraLog720(Packet packet)
        {
            packet.ReadPackedGuid128("TargetGUID");
            packet.ReadPackedGuid128("CasterGUID");

            packet.ReadInt32 <SpellId>("SpellID");

            var periodicAuraLogEffectCount = packet.ReadInt32("PeriodicAuraLogEffectCount");

            packet.ResetBitReader();
            var hasLogData = packet.ReadBit("HasLogData");

            for (var i = 0; i < periodicAuraLogEffectCount; i++)
            {
                ReadPeriodicAuraLogEffectData(packet, "PeriodicAuraLogEffectData");
            }

            if (hasLogData)
            {
                SpellHandler.ReadSpellCastLogData(packet, "SpellCastLogData");
            }
        }
Esempio n. 5
0
 public static void HandleUseToy(Packet packet)
 {
     packet.ReadInt32 <ItemId>("ItemID");
     SpellHandler.ReadSpellCastRequest(packet, "Cast");
 }