Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add a button to record.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 19, 2023
1 parent 5a88012 commit 46bdef2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ActionTimelineEx/Configurations/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class Settings : IPluginConfiguration
{
public bool ShowTimelineOnlyInDuty = false;
public bool ShowTimelineOnlyInCombat = false;
//public float StatusCheckDelay = 0.1f;
public bool Record = true;
public List<DrawingSettings> TimelineSettings = new();
public HashSet<ushort> HideStatusIds = new HashSet<ushort>();
public bool PrintClipping = false;
Expand Down
6 changes: 3 additions & 3 deletions ActionTimelineEx/Timeline/TimelineManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private void ActionFromSelf(ActionEffectSet set)
#if DEBUG
//Svc.Chat.Print($"Id: {set.Header.ActionID}; {set.Header.ActionType}; Source: {set.Source.ObjectId}");
#endif
if (set.Source.ObjectId != Player.Object.ObjectId) return;
if (set.Source.ObjectId != Player.Object.ObjectId || !Plugin.Settings.Record) return;

DamageType damage = DamageType.None;
if(set.TargetEffects[0][0].type is ActionEffectType.Damage or ActionEffectType.Heal)
Expand Down Expand Up @@ -379,7 +379,7 @@ private async void OnActorControl(uint entityId, ActorControlCategory type, uint
// }
//#endif

if (entityId != Player.Object?.ObjectId) return;
if (entityId != Player.Object?.ObjectId || !Plugin.Settings.Record) return;

switch (type)
{
Expand Down Expand Up @@ -432,7 +432,7 @@ private unsafe void OnCast(uint sourceId, IntPtr ptr)
{
_onCastHook?.Original(sourceId, ptr);

if (sourceId != Player.Object?.ObjectId) return;
if (sourceId != Player.Object?.ObjectId || !Plugin.Settings.Record) return;

var actionId = *(ushort*)ptr;

Expand Down
1 change: 1 addition & 0 deletions ActionTimelineEx/Windows/SettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ private void DrawGeneralSetting()
Name = (Settings.TimelineSettings.Count + 1).ToString(),
});
}
ImGui.Checkbox("Record Data", ref Settings.Record);
ImGui.Checkbox("Show Only In Duty", ref Settings.ShowTimelineOnlyInDuty);
ImGui.Checkbox("Show Only In Combat", ref Settings.ShowTimelineOnlyInCombat);
ImGui.Checkbox("Print Clipping Time On Chat", ref Settings.PrintClipping);
Expand Down

0 comments on commit 46bdef2

Please sign in to comment.