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

Commit

Permalink
Merge pull request #14 from ArchiDog1998/main
Browse files Browse the repository at this point in the history
Release Plz.
  • Loading branch information
ArchiDog1998 authored Jul 22, 2023
2 parents 346eba2 + 5146627 commit acc0f05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ActionTimelineEx/ActionTimelineEx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>ArchiTed</Authors>
<PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU</Platforms>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<Nullable>enable</Nullable>
<DalamudLibPath>$(AppData)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down
1 change: 1 addition & 0 deletions ActionTimelineEx/Timeline/StatusLineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void DrawItemWithCenter(Vector2 centerPos, Vector2 windowPos, DrawingSett
if (rightBottom.X <= windowPos.X) return;

leftTop.X = Math.Max(leftTop.X, windowPos.X);
leftTop.Y = Math.Max(leftTop.Y, windowPos.Y);

drawList.AddImage(texture.ImGuiHandle, leftTop,
leftTop + new Vector2(statusHeight / TimelineItem.HeightRatio, statusHeight), Vector2.Zero, Vector2.One);
Expand Down
24 changes: 3 additions & 21 deletions ActionTimelineEx/Timeline/TimelineManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,31 +453,13 @@ private unsafe void OnCast(uint sourceId, IntPtr ptr)

var actionId = *(ushort*)ptr;

string name = string.Empty;
ushort icon = 0;
var action = Svc.Data.GetExcelSheet<Action>()?.GetRow(actionId);

if(action?.Cast100ms > 0)
{
name = action?.Name ?? string.Empty;
icon = actionId == 4 ? (ushort)118 //Mount
: action?.Icon ?? 0;
}
else
{
var item = Svc.Data.GetExcelSheet<Item>()?.GetRow(actionId);
if (item?.CastTimes > 0)
{
name = item?.Name ?? string.Empty;
icon = item?.Icon ?? 0;
}
}


AddItem(new TimelineItem()
{
Name = name,
Icon = icon,
Name = action?.Name ?? string.Empty,
Icon = actionId == 4 ? (ushort)118 //Mount
: action?.Icon ?? 0,
StartTime = DateTime.Now,
GCDTime = GCD,
CastingTime = Player.Object.TotalCastTime - Player.Object.CurrentCastTime,
Expand Down

0 comments on commit acc0f05

Please sign in to comment.