Skip to content

Commit

Permalink
[TargetCastbarCountdown] Fix Update Rate (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
MidoriKami authored Nov 5, 2023
1 parent 858ed06 commit c76c61c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tweaks/UiAdjustment/TargetCastbarCountdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace SimpleTweaksPlugin.Tweaks.UiAdjustment;
[TweakReleaseVersion("1.8.3.0")]
[Changelog("1.8.3.1", "Add TopRight option for displaying countdown")]
[Changelog("1.8.9.0", "Add option to disable on primary target")]
[Changelog(UnreleasedVersion, "Fix updating slowly for really slow castbars")]
public unsafe class TargetCastbarCountdown : UiAdjustments.SubTweak {
private uint CastBarTextNodeId => CustomNodes.Get(this, "Countdown");

Expand Down Expand Up @@ -92,8 +93,8 @@ protected override void Disable() {
FreeAllNodes();
}

[AddonPostRequestedUpdate("_TargetInfoCastBar", "_TargetInfo", "_FocusTargetInfo")]
private void OnAddonRequestedUpdate(AddonArgs args) {
[AddonPreDraw("_TargetInfoCastBar", "_TargetInfo", "_FocusTargetInfo")]
private void OnAddonPreDraw(AddonArgs args) {
if (Service.ClientState.IsPvP) return;

var addon = (AtkUnitBase*) args.Addon;
Expand Down Expand Up @@ -145,7 +146,6 @@ private void MakeTextNode(AtkUnitBase* parent, uint nodeId, AtkResNode* position

textNode->AtkResNode.NodeFlags = NodeFlags.Visible | NodeFlags.Enabled | NodeFlags.AnchorTop | NodeFlags.AnchorLeft;
textNode->AtkResNode.DrawFlags = 2;
textNode->AtkResNode.DrawFlags = 2;
textNode->AtkResNode.Alpha_2 = 255;

textNode->TextColor = textColor;
Expand Down

0 comments on commit c76c61c

Please sign in to comment.