Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Components/Combat/DefaultTargetingProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,16 @@ public async Task<bool> HandleTarget(TrinityActor target)
target.ToDiaObject() is DiaGizmo obj &&
!obj.IsDestructibleObject)
{
// Do not restart interaction with Gizmo that requires casting.
if (Core.Player.IsCasting)
return true;

// TODO: Fix the interaction condition here.
if (await CommonCoroutines.MoveAndInteract(
obj,
() => obj is GizmoLootContainer lc ? lc.IsOpen : obj.HasBeenOperated) == CoroutineResult.Running)
{
var result = await CommonCoroutines.MoveAndInteract(obj,
() => obj is GizmoLootContainer lc ? lc.IsOpen : obj.HasBeenOperated);

if (result == CoroutineResult.Running || Core.Player.IsCasting)
return true;
}

Clear();
return false;
Expand Down
15 changes: 3 additions & 12 deletions Framework/Reference/SkillUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,13 @@ public static HashSet<SNOPower> ActiveIds
public static void UpdateActiveSkills()
{
//Core.Logger.Debug($"UpdateActiveSkills: BotMain.BotThread.ThreadState={BotMain.BotThread?.ThreadState} BotMain.BotThread.IsAlive={BotMain.BotThread?.IsAlive} BotMain.IsRunning={BotMain.IsRunning} BotEvents.IsBotRunning={BotEvents.IsBotRunning}");

if (ZetaDia.Service.IsInGame)
{
using (ZetaDia.Memory.AcquireFrame())
if (!Zeta.Bot.BotMain.IsRunning)
{
//Core.Logger.Debug($"UpdateActiveSkills: Before UpdateActors: BotMain.BotThread.ThreadState={BotMain.BotThread?.ThreadState} BotMain.BotThread.IsAlive={BotMain.BotThread?.IsAlive} BotMain.IsRunning={BotMain.IsRunning} BotEvents.IsBotRunning={BotEvents.IsBotRunning}");
if(!Zeta.Bot.BotMain.IsRunning)
{
ZetaDia.Actors.Update();
}
//Core.Logger.Debug($"UpdateActiveSkills: Before AcquireFrame: BotMain.BotThread.ThreadState={BotMain.BotThread?.ThreadState} BotMain.BotThread.IsAlive={BotMain.BotThread?.IsAlive} BotMain.IsRunning={BotMain.IsRunning} BotEvents.IsBotRunning={BotEvents.IsBotRunning}");

//Core.Logger.Debug($"UpdateActiveSkills: Before Hotbar.Update: BotMain.BotThread.ThreadState={BotMain.BotThread?.ThreadState} BotMain.BotThread.IsAlive={BotMain.BotThread?.IsAlive} BotMain.IsRunning={BotMain.IsRunning} BotEvents.IsBotRunning={BotEvents.IsBotRunning}");

Core.Hotbar.Update();
ZetaDia.Actors.Update();
}
Core.Hotbar.Update();
}
_lastUpdatedActiveSkills = DateTime.UtcNow;
_active = CurrentClass.Where(s => Core.Hotbar.ActivePowers.Contains(s.SNOPower)).ToList();
Expand Down
2 changes: 1 addition & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void OnPulse()

public void OnEnabled()
{
using (ZetaDia.Memory.AcquireFrame())
using (ZetaDia.Memory.AcquireFrame(true))
{
if (IsEnabled || !Application.Current.CheckAccess())
return;
Expand Down
13 changes: 5 additions & 8 deletions Routines/DemonHunter/DemonHunterShadowImpale.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
using System;
using Trinity.Framework;
using Trinity.Framework.Helpers;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Controls;
using Trinity.Components.Combat.Resources;
using Trinity.Framework;
using Trinity.Framework.Actors.ActorTypes;
using Trinity.Framework.Grid;
using Trinity.Framework.Helpers;
using Trinity.Framework.Objects;
using Trinity.Framework.Reference;
using Trinity.UI;
using Trinity.Settings;
using Trinity.UI;
using Zeta.Common;
using Zeta.Game;
using Trinity.Routines.DemonHunter;
using Trinity.Routines;
using Zeta.Game.Internals.Actors;

namespace Trinity750.Routines.DemonHunter
namespace Trinity.Routines.DemonHunter
{
public sealed class DemonHunterShadowImpale : DemonHunterBase, IRoutine
{
Expand Down Expand Up @@ -57,7 +55,7 @@ public sealed class DemonHunterShadowImpale : DemonHunterBase, IRoutine

public TrinityPower GetOffensivePower()
{
TrinityActor target = CurrentTarget;
var target = CurrentTarget;

if (CurrentTarget != null &&
(!CurrentTarget.IsBoss ||
Expand Down Expand Up @@ -111,7 +109,6 @@ public TrinityPower GetBuffPower()
return null;
}


public TrinityPower GetDestructiblePower() => DefaultDestructiblePower();

public TrinityPower GetDefensivePower() => null;
Expand Down
4 changes: 0 additions & 4 deletions Settings/ItemList/ItemListEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,5 @@ internal static bool EvaluateProperty(LRule itemRule, ACDItem item, out float ne
newValue = returnValue;
return result;
}



}
}

5 changes: 1 addition & 4 deletions UI/Visualizer/RadarCanvas/RadarCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,7 @@ private void MouseUpHandler(object sender, MouseButtonEventArgs e)
}
Cursor = Cursors.Arrow;

using (ZetaDia.Memory.AcquireFrame())
{
HandleMapClicked(sender, e);
}
HandleMapClicked(sender, e);
}

private void Clear()
Expand Down
4 changes: 2 additions & 2 deletions UI/Visualizer/Visualizer.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@
<ListView.View>

<controls:AutoSizedGridView GridView.ColumnCollection="{Binding GridViewColumns, Mode=OneWayToSource}">
<controls:GridViewColumnExtended Visible="{Binding SelectedColumns, Converter={StaticResource flagsEnumValueConverter}, ConverterParameter=RActorGuid}" Width="Auto" DisplayMemberBinding="{Binding RActorGuid}">
<GridViewColumnHeader BorderThickness="0" HorizontalContentAlignment="Left" Content="RActorGuid" Command="{Binding SortCommand}" CommandParameter="RActorGuid" />
<controls:GridViewColumnExtended Visible="{Binding SelectedColumns, Converter={StaticResource flagsEnumValueConverter}, ConverterParameter=RActorId}" Width="Auto" DisplayMemberBinding="{Binding RActorId}">
<GridViewColumnHeader BorderThickness="0" HorizontalContentAlignment="Left" Content="RActorId" Command="{Binding SortCommand}" CommandParameter="RActorId" />
</controls:GridViewColumnExtended>

<controls:GridViewColumnExtended Visible="{Binding SelectedColumns, Converter={StaticResource flagsEnumValueConverter}, ConverterParameter=AcdId}" Width="Auto" DisplayMemberBinding="{Binding AcdId}">
Expand Down