TrinityCore / TrinityCore/WowPacketParser
[3.3.5] SMSG_ATTACKER_STATE_UPDATE structure
Open
Nobody has claimed this yet.
bug
- Dominant language
- C#
- Stars
- 522
- Forks
- 387
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 4
Description
Description: SMSG_ATTACKER_STATE_UPDATE packet structure is wrong for 3.3.5 sniffs and does not match TrinityCore structure.
Current (wrong):
var hitInfo = packet.ReadInt32E<SpellHitInfo>("HitInfo");
packet.ReadPackedGuid("AttackerGUID");
packet.ReadPackedGuid("TargetGUID");
packet.ReadInt32("Damage");
packet.ReadInt32("OverDamage");
var subDmgCount = packet.ReadByte();
for (var i = 0; i < subDmgCount; ++i)
{
packet.ReadInt32("SchoolMask", i);
packet.ReadSingle("Float Damage", i);
packet.ReadInt32("Int Damage", i);
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_ABSORB | SpellHitInfo.HITINFO_FULL_ABSORB))
packet.ReadInt32("Damage Absorbed", i);
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_RESIST | SpellHitInfo.HITINFO_FULL_RESIST))
packet.ReadInt32("Damage Resisted", i);
}
...
Expected (correct):
var hitInfo = packet.ReadInt32E<SpellHitInfo>("HitInfo");
packet.ReadPackedGuid("AttackerGUID");
packet.ReadPackedGuid("TargetGUID");
packet.ReadInt32("Damage");
packet.ReadInt32("OverDamage");
var subDmgCount = packet.ReadByte();
for (var i = 0; i < subDmgCount; ++i)
{
packet.ReadInt32("SchoolMask", i);
packet.ReadSingle("Float Damage", i);
packet.ReadInt32("Int Damage", i);
}
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_ABSORB | SpellHitInfo.HITINFO_FULL_ABSORB))
{
for (var i = 0; i < subDmgCount; ++i)
packet.ReadInt32("Damage Absorbed", i);
}
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_RESIST | SpellHitInfo.HITINFO_FULL_RESIST))
{
for (var i = 0; i < subDmgCount; ++i)
packet.ReadInt32("Damage Resisted", i);
}
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the parser entry point for the 3.3.5 SMSG_ATTACKER_STATE_UPDATE structure and compare its current field ordering with the expected structure in this issue. The work is done when absorb and resist values are read in separate loops after all sub-damage entries, matching the expected packet layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100