Skip to content

Commit

Permalink
Merge branch 'merge' into mergeWIP
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnifexOptimus committed Feb 24, 2025
2 parents f0db1ad + 5c89c18 commit d49e9dd
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 42 deletions.
3 changes: 2 additions & 1 deletion BossMod/ActionQueue/Casters/PCT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public void Dispose() { }
private void Customize(ActionDefinitions d)
{
d.RegisterChargeIncreaseTrait(AID.StrikingMuse, TraitID.EnhancedPictomancyII);
d.RegisterChargeIncreaseTrait(AID.LivingMuse, TraitID.EnhancedPictomancyIV);
foreach (var creature in new AID[] { AID.LivingMuse, AID.PomMuse, AID.WingedMuse, AID.ClawedMuse, AID.FangedMuse })
d.RegisterChargeIncreaseTrait(creature, TraitID.EnhancedPictomancyIV);

d.Spell(AID.Smudge)!.TransformAngle = (ws, _, _, _) => _config.AlignDashToCamera
? ws.Client.CameraAzimuth + 180.Degrees()
Expand Down
4 changes: 2 additions & 2 deletions BossMod/Autorotation/MiscAI/AutoPull.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public override void Execute(StrategyValues strategy, Actor? primaryTarget, floa
if (strategy.Enabled(Track.Hunt) && Bossmods.ActiveModule?.Info?.Category == BossModuleInfo.Category.Hunt && Bossmods.ActiveModule?.PrimaryActor is Actor p && p.InCombat && p.HPRatio < 0.95f)
{
Hints.SetPriority(p, 0);
primaryTarget = p;
primaryTarget = Hints.ForcedTarget = p;
return;
}

Expand All @@ -48,7 +48,7 @@ public override void Execute(StrategyValues strategy, Actor? primaryTarget, floa
if (bestEnemy != null)
{
bestEnemy.Priority = 0;
primaryTarget = bestEnemy.Actor;
primaryTarget = Hints.ForcedTarget = bestEnemy.Actor;
}
}
}
Expand Down
9 changes: 7 additions & 2 deletions BossMod/Framework/MovementOverride.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void Dispose()
_rmiFlyHook.Dispose();
}

private bool NavmeshActive()
private bool FollowpathActive()
{
if (_navmeshPathIsRunning == null && _dalamud.TryGetData<bool[]>("vnav.PathIsRunning", out var data))
_navmeshPathIsRunning = data;
Expand All @@ -116,7 +116,7 @@ private void RMIWalkDetour(void* self, float* sumLeft, float* sumForward, float*
_rmiWalkHook.Original(self, sumLeft, sumForward, sumTurnLeft, haveBackwardOrStrafe, a6, bAdditiveUnk);

// TODO: we really need to introduce some extra checks that PlayerMoveController::readInput does - sometimes it skips reading input, and returning something non-zero breaks stuff...
var movementAllowed = bAdditiveUnk == 0 && _rmiWalkIsInputEnabled1(self) && _rmiWalkIsInputEnabled2(self) && !NavmeshActive();
var movementAllowed = bAdditiveUnk == 0 && _rmiWalkIsInputEnabled1(self) && _rmiWalkIsInputEnabled2(self) && !FollowpathActive();
var misdirectionMode = PlayerHasMisdirection();
if (!movementAllowed && misdirectionMode)
{
Expand Down Expand Up @@ -169,6 +169,11 @@ private void RMIFlyDetour(void* self, PlayerMoveControllerFlyInput* result)
{
_forcedControlState = null;
_rmiFlyHook.Original(self, result);

// do nothing while followpath is running
if (FollowpathActive())
return;

// TODO: we really need to introduce some extra checks that PlayerMoveController::readInput does - sometimes it skips reading input, and returning something non-zero breaks stuff...
if (result->Forward == 0 && result->Left == 0 && result->Up == 0 && DirectionToDestination(true) is var relDir && relDir != null)
{
Expand Down
3 changes: 2 additions & 1 deletion BossMod/Framework/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public unsafe Plugin(IDalamudPluginInterface dalamud, ICommandManager commandMan
InteropGenerator.Runtime.Resolver.GetInstance.Resolve();

dalamud.Create<Service>();
Service.LogHandler = (string msg) => Service.Logger.Debug(msg);
Service.LogHandlerDebug = (string msg) => Service.Logger.Debug(msg);
Service.LogHandlerVerbose = (string msg) => Service.Logger.Verbose(msg);
Service.LuminaGameData = dataManager.GameData;
Service.WindowSystem = new("bmr");
//Service.Device = pluginInterface.UiBuilder.Device;
Expand Down
6 changes: 4 additions & 2 deletions BossMod/Framework/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public sealed class Service
#pragma warning restore CS8618

#pragma warning disable CA2211
public static Action<string>? LogHandler;
public static void Log(string msg) => LogHandler?.Invoke(msg);
public static Action<string>? LogHandlerDebug;
public static Action<string>? LogHandlerVerbose;
public static void Log(string msg) => LogHandlerDebug?.Invoke(msg);
public static void LogVerbose(string msg) => LogHandlerVerbose?.Invoke(msg);

public static Lumina.GameData? LuminaGameData;
public static Lumina.Excel.ExcelSheet<T>? LuminaSheet<T>() where T : struct, Lumina.Excel.IExcelRow<T> => LuminaGameData?.GetExcelSheet<T>(Lumina.Data.Language.English);
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Framework/WorldStateGameSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private unsafe void UpdateActors()

if (obj != null && (obj->EntityId & 0xFF000000) == 0xFF000000)
{
// Service.Log($"[WorldState] Skipping bad object #{i} with id {obj->EntityId:X}");
Service.LogVerbose($"[WorldState] Skipping bad object #{i} with id {obj->EntityId:X}");
obj = null;
}

Expand Down
Binary file modified BossMod/Pathfinding/ObstacleMaps/1193.824.1.bmp
Binary file not shown.
Binary file modified BossMod/Pathfinding/ObstacleMaps/1193.824.2.bmp
Binary file not shown.
Binary file modified BossMod/Pathfinding/ObstacleMaps/1193.824.3.bmp
Binary file not shown.
Binary file removed BossMod/Pathfinding/ObstacleMaps/1193.824.4.bmp
Binary file not shown.
Binary file removed BossMod/Pathfinding/ObstacleMaps/1193.824.5.bmp
Binary file not shown.
Binary file added BossMod/Pathfinding/ObstacleMaps/1242.1008.1.bmp
Binary file not shown.
38 changes: 6 additions & 32 deletions BossMod/Pathfinding/ObstacleMaps/maplist.json
Original file line number Diff line number Diff line change
Expand Up @@ -1545,31 +1545,18 @@
}
],
"1193.824": [
{
"MinBoundsX": 9,
"MinBoundsY": -25,
"MinBoundsZ": 157,
"MaxBoundsX": 222.5,
"MaxBoundsY": 2,
"MaxBoundsZ": 212.5,
"OriginX": 9,
"OriginZ": 157,
"ViewWidth": 60,
"ViewHeight": 60,
"Filename": "1193.824.1.bmp"
},
{
"MinBoundsX": -155.5,
"MinBoundsY": 9.5,
"MinBoundsY": -25,
"MinBoundsZ": 49,
"MaxBoundsX": -63,
"MaxBoundsX": 222.5,
"MaxBoundsY": 51.5,
"MaxBoundsZ": 154,
"MaxBoundsZ": 212.5,
"OriginX": -155.5,
"OriginZ": 49,
"ViewWidth": 60,
"ViewHeight": 60,
"Filename": "1193.824.2.bmp"
"Filename": "1193.824.1.bmp"
},
{
"MinBoundsX": -167.5,
Expand All @@ -1582,7 +1569,7 @@
"OriginZ": -22.5,
"ViewWidth": 60,
"ViewHeight": 60,
"Filename": "1193.824.3.bmp"
"Filename": "1193.824.2.bmp"
},
{
"MinBoundsX": -173,
Expand All @@ -1595,20 +1582,7 @@
"OriginZ": -219.5,
"ViewWidth": 60,
"ViewHeight": 60,
"Filename": "1193.824.4.bmp"
},
{
"MinBoundsX": -111,
"MinBoundsY": -8.5,
"MinBoundsZ": 158,
"MaxBoundsX": 4,
"MaxBoundsY": 21.5,
"MaxBoundsZ": 211,
"OriginX": -111,
"OriginZ": 158,
"ViewWidth": 60,
"ViewHeight": 60,
"Filename": "1193.824.5.bmp"
"Filename": "1193.824.3.bmp"
}
],
"1194.829": [
Expand Down
11 changes: 11 additions & 0 deletions BossMod/QuestBattle/ARealmReborn/MSQ/LurkersInTheGrotto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace BossMod.QuestBattle.ARealmReborn.MSQ;

[ZoneModuleInfo(BossModuleInfo.Maturity.Contributed, 332)]
public class LurkersInTheGrotto(WorldState ws) : QuestBattle(ws)
{
public override void CalculateAIHints(int playerSlot, Actor player, AIHints hints)
{
foreach (var p in hints.PotentialTargets)
p.Priority = p.Actor.OID == 0x386 ? 0 : 1;
}
}
3 changes: 2 additions & 1 deletion UIDev/UITest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public static void Main(string[] args)

InitializeDalamudStyle();

Service.LogHandler = msg => Debug.WriteLine(msg);
Service.LogHandlerDebug = msg => Debug.WriteLine(msg);
Service.LogHandlerVerbose = msg => Debug.WriteLine(msg);
Service.LuminaGameData = new(FindGameDataPath());
//Service.LuminaGameData.Options.PanicOnSheetChecksumMismatch = false; // TODO: remove - temporary workaround until lumina is updated
Service.LuminaGameData.Options.RsvResolver = Service.LuminaRSV.TryGetValue;
Expand Down

0 comments on commit d49e9dd

Please sign in to comment.