Skip to content

Commit

Permalink
write out heading/rotation for ActionEffect1, Add animationTargetId
Browse files Browse the repository at this point in the history
  • Loading branch information
marzent committed Jan 21, 2025
1 parent 4b34954 commit fca6067
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions OverlayPlugin.Core/NetworkProcessors/LineAbilityExtra.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,24 @@ public unsafe override string ToString(long epoch, uint ActorID)
var abilityId = aeHeader.Get<uint>("actionId");
var globalEffectCounter = aeHeader.Get<uint>("globalEffectCounter");

var h = FFXIVRepository.ConvertHeading(aeHeader.Get<ushort>("rotation"));
var atId = (aeHeader.Get<uint>("animationTargetId"));

if (rawPacket.actionEffectCount == 1)
{
// AE1 is not useful. It does not contain this data. But we still need to write something
// to indicate that a proper line will not be happening.
// AE1 only contains rotation.
return string.Format(CultureInfo.InvariantCulture,
"{0:X8}|{1:X4}|{2:X8}|{3}||||",
ActorID, abilityId, globalEffectCounter, (int)LineSubType.NO_DATA);
"{0:X8}|{1:X4}|{2:X8}|{3}||||{4:F3}|{5:X8}",
ActorID, abilityId, globalEffectCounter, (int)LineSubType.NO_DATA, h, atId);
}

float x = FFXIVRepository.ConvertUInt16Coordinate(rawPacket.x);
float y = FFXIVRepository.ConvertUInt16Coordinate(rawPacket.y);
float z = FFXIVRepository.ConvertUInt16Coordinate(rawPacket.z);

var h = FFXIVRepository.ConvertHeading(aeHeader.Get<ushort>("rotation"));
return string.Format(CultureInfo.InvariantCulture,
"{0:X8}|{1:X4}|{2:X8}|{3}|{4:F3}|{5:F3}|{6:F3}|{7:F3}",
ActorID, abilityId, globalEffectCounter, (int)LineSubType.DATA_PRESENT, x, y, z, h);
"{0:X8}|{1:X4}|{2:X8}|{3}|{4:F3}|{5:F3}|{6:F3}|{7:F3}|{8:X8}",
ActorID, abilityId, globalEffectCounter, (int)LineSubType.DATA_PRESENT, x, y, z, h, atId);
}
finally
{
Expand Down
4 changes: 2 additions & 2 deletions OverlayPlugin.Core/resources/reserved_log_lines.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"ID": 264,
"Name": "AbilityExtra",
"Source": "OverlayPlugin",
"Version": 1,
"Version": 2,
"Comment": "Extra info from ActionEffect packets"
},
{
Expand Down Expand Up @@ -146,4 +146,4 @@
"Version": 0,
"Comment": "Reserved for future OverlayPlugin use"
}
]
]

0 comments on commit fca6067

Please sign in to comment.