public static void HandleSpellHealLog(Packet packet)
        {
            packet.ReadPackedGuid128("CasterGUID");
            packet.ReadPackedGuid128("TargetGUID");

            packet.ReadInt32("SpellID");
            packet.ReadInt32("Health");
            packet.ReadInt32("OverHeal");
            packet.ReadInt32("Absorbed");

            packet.ResetBitReader();

            packet.ReadBit("Crit");
            packet.ReadBit("Multistrike");

            var bit128 = packet.ReadBit("HasCritRollMade");
            var bit120 = packet.ReadBit("HasLogData");

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

            if (bit120)
            {
                SpellParsers.ReadSpellCastLogData(ref packet);
            }
        }
        public static void HandleAttackswingLandedLog(Packet packet)
        {
            SpellParsers.ReadSpellCastLogData(packet);

            packet.ReadInt32("Size");

            CombatHandler.ReadAttackRoundInfo(packet);
        }
Esempio n. 3
0
        public static void HandleAttackerStateUpdate(Packet packet)
        {
            var hasLogData = packet.ReadBit("HasLogData");

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

            packet.ReadInt32("Size");

            ReadAttackRoundInfo(packet, "AttackRoundInfo");
        }
        public static void HandleSpellEnergizeLog(Packet packet)
        {
            packet.ReadPackedGuid128("CasterGUID");
            packet.ReadPackedGuid128("TargetGUID");

            packet.ReadEntry <Int32>(StoreNameType.Spell, "SpellID");
            packet.ReadEnum <PowerType>("Type", TypeCode.UInt32);
            packet.ReadInt32("Amount");

            packet.ResetBitReader();

            var bit100 = packet.ReadBit("HasLogData");

            if (bit100)
            {
                SpellParsers.ReadSpellCastLogData(ref packet);
            }
        }
Esempio n. 5
0
        public static void HandleSpellEnergizeLog(Packet packet)
        {
            packet.ReadPackedGuid128("CasterGUID");
            packet.ReadPackedGuid128("TargetGUID");

            packet.ReadInt32 <SpellId>("SpellID");
            packet.ReadUInt32E <PowerType>("Type");
            packet.ReadInt32("Amount");

            packet.ResetBitReader();

            var bit100 = packet.ReadBit("HasLogData");

            if (bit100)
            {
                SpellParsers.ReadSpellCastLogData(packet);
            }
        }
        public static void HandleSpellNonMeleeDmgLog(Packet packet)
        {
            packet.ReadPackedGuid128("Me");
            packet.ReadPackedGuid128("CasterGUID");

            packet.ReadEntry <Int32>(StoreNameType.Spell, "SpellID");
            packet.ReadInt32("Damage");
            packet.ReadInt32("OverKill");

            packet.ReadByte("SchoolMask");

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

            packet.ResetBitReader();

            packet.ReadBit("Periodic");

            packet.ReadEnum <AttackerStateFlags>("Flags", 9);

            var bit148 = packet.ReadBit();
            var bit76  = packet.ReadBit("HasLogData");

            if (bit148)
            {
                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 (bit76)
            {
                SpellParsers.ReadSpellCastLogData(ref packet);
            }
        }
        public static void HandleSpellAbsorbLog(Packet packet)
        {
            packet.ReadPackedGuid128("Victim");
            packet.ReadPackedGuid128("Caster");

            packet.ReadInt32("InterruptedSpellID");
            packet.ReadInt32 <SpellId>("SpellID");
            packet.ReadPackedGuid128("ShieldTargetGUID?");
            packet.ReadInt32("Absorbed");

            packet.ResetBitReader();

            var bit100 = packet.ReadBit("HasLogData");

            if (bit100)
            {
                SpellParsers.ReadSpellCastLogData(packet);
            }
        }
Esempio n. 8
0
        public static void HandleSpellNonMeleeDmgLog(Packet packet)
        {
            packet.ReadPackedGuid128("Me");
            packet.ReadPackedGuid128("CasterGUID");

            packet.ReadInt32 <SpellId>("SpellID");
            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", ClientVersion.AddedInVersion(ClientVersionBuild.V6_2_0_20173) ? 8 : 9);

            var bit148 = packet.ReadBit();
            var bit76  = packet.ReadBit("HasLogData");

            if (bit148)
            {
                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 (bit76)
            {
                SpellParsers.ReadSpellCastLogData(packet);
            }
        }
        public static void HandlePeriodicAuraLog(Packet packet)
        {
            packet.ReadPackedGuid128("CasterGUID");
            packet.ReadPackedGuid128("TargetGUID");

            packet.ReadInt32("SpellID");

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

            // PeriodicAuraLogEffect
            for (var i = 0; i < int24; i++)
            {
                packet.ReadInt32("Effect", i);
                packet.ReadInt32("Amount", i);
                packet.ReadInt32("OverHealOrKill", i);
                packet.ReadInt32("SchoolMaskOrPower", i);
                packet.ReadInt32("AbsorbedOrAmplitude", i);
                packet.ReadInt32("Resisted");

                packet.ResetBitReader();

                packet.ReadBit("Crit", i);
                packet.ReadBit("Multistrike", i);

                // PeriodicAuraLogEffectDebugInfo
                var bit36 = packet.ReadBit("HasPeriodicAuraLogEffectDebugInfo");
                if (bit36)
                {
                    packet.ReadSingle("CritRollMade", i);
                    packet.ReadSingle("CritRollNeeded", i);
                }
            }

            packet.ResetBitReader();

            var bit56 = packet.ReadBit("HasLogData");

            if (bit56)
            {
                SpellParsers.ReadSpellCastLogData(ref packet);
            }
        }
Esempio n. 10
0
        public static void HandleAttackerStateUpdate(Packet packet)
        {
            var bit52 = packet.ReadBit("HasLogData");

            if (bit52)
            {
                SpellParsers.ReadSpellCastLogData(ref packet);
            }

            packet.ReadInt32("Size");

            var hitInfo = packet.ReadEnum <SpellHitInfo>("HitInfo", TypeCode.Int32);

            packet.ReadPackedGuid128("Attacker Guid");
            packet.ReadPackedGuid128("Target Guid");

            packet.ReadInt32("Damage");
            packet.ReadInt32("OverDamage");

            var subDmgCount = packet.ReadBoolean("HasSubDmg");

            if (subDmgCount)
            {
                packet.ReadInt32("SchoolMask");
                packet.ReadSingle("Float Damage");
                packet.ReadInt32("Int Damage");

                if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_ABSORB | SpellHitInfo.HITINFO_FULL_ABSORB))
                {
                    packet.ReadInt32("Damage Absorbed");
                }

                if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_RESIST | SpellHitInfo.HITINFO_FULL_RESIST))
                {
                    packet.ReadInt32("Damage Resisted");
                }
            }

            packet.ReadEnum <VictimStates>("VictimState", TypeCode.Byte);
            packet.ReadInt32("Unk Attacker State 0");

            packet.ReadEntry <Int32>(StoreNameType.Spell, "Melee Spell ID");

            if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_BLOCK))
            {
                packet.ReadInt32("Block Amount");
            }

            if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_RAGE_GAIN))
            {
                packet.ReadInt32("Rage Gained");
            }

            if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_UNK0))
            {
                packet.ReadInt32("Unk Attacker State 3 1");
                packet.ReadSingle("Unk Attacker State 3 2");
                packet.ReadSingle("Unk Attacker State 3 3");
                packet.ReadSingle("Unk Attacker State 3 4");
                packet.ReadSingle("Unk Attacker State 3 5");
                packet.ReadSingle("Unk Attacker State 3 6");
                packet.ReadSingle("Unk Attacker State 3 7");
                packet.ReadSingle("Unk Attacker State 3 8");
                packet.ReadSingle("Unk Attacker State 3 9");
                packet.ReadSingle("Unk Attacker State 3 10");
                packet.ReadSingle("Unk Attacker State 3 11");
                packet.ReadInt32("Unk Attacker State 3 12");
            }

            if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_BLOCK | SpellHitInfo.HITINFO_UNK12))
            {
                packet.ReadSingle("Unk Float");
            }
        }
        public static void HandleSpellLogExecute(Packet packet)
        {
            packet.ReadPackedGuid128("Caster");

            packet.ReadInt32("SpellID");

            var int16 = packet.ReadInt32("EffectsCount");

            for (var i = 0; i < int16; i++)
            {
                packet.ReadInt32("Effect", i);

                var int4  = packet.ReadInt32("PowerDrainTargetsCount", i);
                var int20 = packet.ReadInt32("ExtraAttacksTargetsCount", i);
                var int36 = packet.ReadInt32("DurabilityDamageTargetsCount", i);
                var int52 = packet.ReadInt32("GenericVictimTargetsCount", i);
                var int68 = packet.ReadInt32("TradeSkillTargetsCount", i);
                var int84 = packet.ReadInt32("FeedPetTargetsCount", i);

                // ClientSpellLogEffectPowerDrainParams
                for (var j = 0; j < int4; j++)
                {
                    packet.ReadPackedGuid128("Victim");
                    packet.ReadInt32("Points");
                    packet.ReadInt32("PowerType");
                    packet.ReadSingle("Amplitude");
                }

                // ClientSpellLogEffectExtraAttacksParams
                for (var j = 0; j < int20; j++)
                {
                    packet.ReadPackedGuid128("Victim", i, j);
                    packet.ReadInt32("NumAttacks", i, j);
                }

                // ClientSpellLogEffectDurabilityDamageParams
                for (var j = 0; j < int36; j++)
                {
                    packet.ReadPackedGuid128("Victim", i, j);
                    packet.ReadInt32("ItemID", i, j);
                    packet.ReadInt32("Amount", i, j);
                }

                // ClientSpellLogEffectGenericVictimParams
                for (var j = 0; j < int52; j++)
                {
                    packet.ReadPackedGuid128("Victim", i, j);
                }

                // ClientSpellLogEffectTradeSkillItemParams
                for (var j = 0; j < int68; j++)
                {
                    packet.ReadInt32("ItemID", i, j);
                }

                // ClientSpellLogEffectFeedPetParams
                for (var j = 0; j < int84; j++)
                {
                    packet.ReadInt32("ItemID", i, j);
                }
            }

            var bit160 = packet.ReadBit("HasLogData");

            if (bit160)
            {
                SpellParsers.ReadSpellCastLogData(ref packet);
            }
        }