Merge branch 'master' into RetainerNotify

This commit is contained in:
meli 2019-11-21 15:36:54 -08:00
commit f936462423
3 changed files with 15 additions and 30 deletions

View file

@ -165,7 +165,7 @@ namespace Dalamud {
});
CommandManager.AddHandler("/xlunmute", new CommandInfo(OnBadWordsRemove) {
HelpMessage = "Unmute a word or sentence. Usage: /fatewatchremove <word or sentence>"
HelpMessage = "Unmute a word or sentence. Usage: /xlunmute <word or sentence>"
});
CommandManager.AddHandler("/xldstate", new CommandInfo(OnDebugPrintGameState) {
@ -183,12 +183,12 @@ namespace Dalamud {
CommandManager.AddHandler("/xlbgmset", new CommandInfo(OnBgmSetCommand)
{
HelpMessage = "Set the Game background music. Usage: /bgmset <BGM ID>"
HelpMessage = "Set the Game background music. Usage: /xlbgmset <BGM ID>"
});
CommandManager.AddHandler("/xlitem", new CommandInfo(OnItemLinkCommand)
{
HelpMessage = "Link an item by name. Usage: /item <Item name>"
HelpMessage = "Link an item by name. Usage: /xlitem <Item name>"
});
}

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Target">
<PlatformTarget>AnyCPU</PlatformTarget>
<TargetFramework>net48</TargetFramework>
<TargetFramework>net471</TargetFramework>
<LangVersion>8.0</LangVersion>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
@ -14,9 +14,9 @@
</PropertyGroup>
<PropertyGroup Label="Feature">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyVersion>4.1.0.3</AssemblyVersion>
<Version>4.1.0.3</Version>
<FileVersion>4.1.0.3</FileVersion>
<AssemblyVersion>4.1.0.5</AssemblyVersion>
<Version>4.1.0.5</Version>
<FileVersion>4.1.0.5</FileVersion>
</PropertyGroup>
<ItemGroup Label="Resources">
<None Include="$(SolutionDir)/Resources/**/*" CopyToOutputDirectory="PreserveNewest" Visible="false" />

View file

@ -24,6 +24,7 @@ namespace Dalamud.Game.Internal.Gui {
private IntPtr activeBuffArray = IntPtr.Zero;
private IntPtr jobInfo;
private IntPtr byteBase;
private IntPtr playerLevel;
private Dalamud dalamud;
private HashSet<uint> CustomIDs;
@ -37,6 +38,8 @@ namespace Dalamud.Game.Internal.Gui {
this.byteBase = scanner.Module.BaseAddress;
this.comboTimer = byteBase + 0x1BB0B50;
this.lastComboMove = byteBase + 0x1BB0B54;
this.playerLevel = byteBase + 0x1C28FA8 + 0x78;
CustomIDs = new HashSet<uint>();
VanillaIDs = new HashSet<uint>();
@ -80,31 +83,13 @@ namespace Dalamud.Game.Internal.Gui {
// TODO: More jobs, level checking for everything.
// Check if player is loaded in by trying to get their buffs.
// If not, skip everything until we are (game will crash cause I'm lazy).
/*
if (activeBuffArray == IntPtr.Zero) {
try {
activeBuffArray = FindBuffAddress();
Log.Verbose("ActiveBuffArray address: {ActiveBuffArray}", activeBuffArray);
}
catch (Exception e) {
activeBuffArray = IntPtr.Zero;
return this.iconHook.Original(self, actionID);
}
}
*/
if (this.VanillaIDs.Contains(actionID)) return this.iconHook.Original(self, actionID);
if (!this.CustomIDs.Contains(actionID)) return actionID;
// TODO: this is currently broken
// As it stands, don't rely on localCharacter.level for anything.
//var localPlayer = this.dalamud.ClientState.LocalPlayer;
// Don't clutter the spaghetti any worse than it already is.
var lastMove = Marshal.ReadInt32(this.lastComboMove);
var comboTime = Marshal.ReadInt32(this.comboTimer);
var level = 80;
var level = Marshal.ReadByte(this.playerLevel);
// DRAGOON
// TODO: Jump/High Jump into Mirage Dive
@ -119,7 +104,7 @@ namespace Dalamud.Game.Internal.Gui {
return 86;
}
}
// Replace Chaos Thrust with the Chaos Thrust combo chain
if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.DragoonChaosThrustCombo)) {
@ -135,7 +120,7 @@ namespace Dalamud.Game.Internal.Gui {
return 75;
}
}
// Replace Full Thrust with the Full Thrust combo chain
if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.DragoonFullThrustCombo)) {
@ -503,7 +488,7 @@ namespace Dalamud.Game.Internal.Gui {
if (actionID == 3581) {
SMNGauge gauge = this.dalamud.ClientState.JobGauges.Get<SMNGauge>();
if (gauge.IsBahamutReady()) return 7427;
if (gauge.IsPhoenixReady() ||
if (gauge.IsPhoenixReady() ||
(gauge.TimerRemaining > 0 && gauge.ReturnSummon != SummonPet.NONE)) return 16513;
return 3581;
}
@ -819,7 +804,7 @@ namespace Dalamud.Game.Internal.Gui {
}
}
// Replace Redoublement with Redoublement combo, Enchanted if possible.
if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.RedMageMeleeCombo)) {