Skip to content

Commit

Permalink
fix: run buffs
Browse files Browse the repository at this point in the history
  • Loading branch information
DorielRivalet committed Feb 13, 2024
1 parent d36eb2f commit 056730c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions MHFZ_Overlay/Models/Addresses/AddressModelHGE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,10 +1837,10 @@ public AddressModelHGE(Mem m)
public override int ActiveFeature3() => this.M.Read2Byte("mhfo-hd.dll+E41A2A8");

/// <inheritdoc/>
public override int ServerHeartbeatLandOdd() => this.M.ReadInt("mhfo-hd.dll+EABD4F0");
public override int ServerHeartbeatLandMain() => this.M.ReadInt("mhfo-hd.dll+EABD4F0");

/// <inheritdoc/>
public override int ServerHeartbeatLandEven() => this.M.ReadInt("mhfo-hd.dll+E9D1EB0");
public override int ServerHeartbeatLandAlternative() => this.M.ReadInt("mhfo-hd.dll+E9D1EB0");

/// <inheritdoc/>
public override int LandSlot() => this.M.ReadInt("mhfo-hd.dll+EDFB940");
Expand Down
4 changes: 2 additions & 2 deletions MHFZ_Overlay/Models/Addresses/AddressModelNotHGE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1756,10 +1756,10 @@ public AddressModelNotHGE(Mem m)
public override int ActiveFeature3() => this.M.Read2Byte("mhfo.dll+57E26E8");

/// <inheritdoc/>
public override int ServerHeartbeatLandOdd() => this.M.ReadInt("mhfo.dll+5E83A00");
public override int ServerHeartbeatLandMain() => this.M.ReadInt("mhfo.dll+5E83A00");

/// <inheritdoc/>
public override int ServerHeartbeatLandEven() => this.M.ReadInt("mhfo.dll+5D983C0");
public override int ServerHeartbeatLandAlternative() => this.M.ReadInt("mhfo.dll+5D983C0");

/// <inheritdoc/>
public override int LandSlot() => this.M.ReadInt("mhfo.dll+61C11A0");
Expand Down
16 changes: 11 additions & 5 deletions MHFZ_Overlay/ViewModels/Windows/AddressModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,9 +1341,9 @@ 21747 or
/// <returns></returns>
public abstract int ActiveFeature3();

public abstract int ServerHeartbeatLandEven();
public abstract int ServerHeartbeatLandAlternative ();

public abstract int ServerHeartbeatLandOdd();
public abstract int ServerHeartbeatLandMain();

public abstract int LandSlot();

Expand Down Expand Up @@ -1395,7 +1395,7 @@ 21747 or
/// Updates every 11 seconds
/// </summary>
/// <returns></returns>
public int ServerHeartbeat => LandSlot() % 2 == 0 ? ServerHeartbeatLandEven() : ServerHeartbeatLandOdd();
public int ServerHeartbeat => ServerHeartbeatLandMain() > ServerHeartbeatLandAlternative() ? ServerHeartbeatLandMain() : ServerHeartbeatLandAlternative();

/// <TODO>
/// [] Not Done
Expand Down Expand Up @@ -2815,8 +2815,14 @@ public string CalculateRunBuffsTag(RunBuff runBuffs, QuestVariant2 questVariant2
return "TA";
}

// elz 3m
if (runBuffs.HasFlag(RunBuff.LeaderboardTimeAttack) && runBuffs.HasFlag(RunBuff.ActiveFeature) && (questVariant3.HasFlag(Models.Structures.QuestVariant3.NoGPSkills)))
{
return "TA";
}

// dures and w/e
if (runBuffs.HasFlag(RunBuff.LeaderboardTimeAttack) && runBuffs.HasFlag(RunBuff.ActiveFeature) && (questVariant2.HasFlag(Models.Structures.QuestVariant2.Road) || questVariant2.HasFlag(Models.Structures.QuestVariant3.NoGPSkills)))
if (runBuffs.HasFlag(RunBuff.PoogieItem) && runBuffs.HasFlag(RunBuff.DivaSong) && runBuffs.HasFlag(RunBuff.Bento) && runBuffs.HasFlag(RunBuff.GuildPoogie) && runBuffs.HasFlag(RunBuff.ActiveFeature) && runBuffs.HasFlag(RunBuff.GuildFood) && (questVariant2.HasFlag(Models.Structures.QuestVariant2.Road) || questVariant3.HasFlag(Models.Structures.QuestVariant3.NoGPSkills)))
{
return "TA";
}
Expand Down Expand Up @@ -2855,7 +2861,7 @@ public RunBuff GetRunBuffs(string overlayMode = "")
var questVariant2 = (QuestVariant2)QuestVariant2();
var questVariant3 = (QuestVariant3)QuestVariant3();

if (HalkOn() && !(questVariant2.HasFlag(Models.Structures.QuestVariant2.DisableHalkPoogieCuff)) || questVariant2.HasFlag(Models.Structures.QuestVariant2.Road))
if (HalkOn() && !(questVariant2.HasFlag(Models.Structures.QuestVariant2.DisableHalkPoogieCuff) || questVariant2.HasFlag(Models.Structures.QuestVariant2.Road)))
{
runBuffs |= RunBuff.Halk;
}
Expand Down

0 comments on commit 056730c

Please sign in to comment.