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

Commit

Permalink
fix: add a upper limit of ping, and restriction of healPotion usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 2, 2023
1 parent 015c5ba commit ef07570
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"181": 0.6,
"185": 0.1,
"190": 0.1,
"266": 0.6,
"3545": 0.6,
"3546": 0.6,
"3549": 0.6,
Expand Down Expand Up @@ -86,11 +87,11 @@
"3603": 0.6,
"3606": 0.6,
"3608": 0.6,
"3610": 0.1,
"3610": 0.6,
"3612": 0.6,
"3613": 0.6,
"3614": 0.6,
"3615": 0.6,
"3615": 0.1,
"4262": 0.6,
"4401": 0.6,
"4402": 0.6,
Expand All @@ -116,6 +117,7 @@
"7430": 0.6,
"7431": 0.1,
"7432": 0.6,
"7439": 0.6,
"7447": 0.1,
"7503": 0.1,
"7505": 0.6,
Expand Down Expand Up @@ -182,6 +184,8 @@
"16552": 0.6,
"16553": 0.6,
"17215": 0.1,
"19002": 0.6,
"19010": 0.6,
"20243": 0.1,
"21054": 2.1,
"22605": 2.1,
Expand Down
3 changes: 3 additions & 0 deletions Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
26437,
26451,
27742,
28446,
28512,
28528,
30134,
30140,
30166,
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver.Basic/Actions/HealPotionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public override bool CanUse(out IAction item)
{
item = null;
if (Service.Player == null) return false;
var job = (ClassJobID)Service.Player.ClassJob.Id;
if (Service.Player.GetHealthRatio() > job.GetHealSingleAbility() -
job.GetHealingOfTimeSubtractSingle()) return false;
if (Service.Player.MaxHp - Service.Player.CurrentHp < MaxHealHp) return false;
return base.CanUse(out item);
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void DutyState_DutyStarted(object sender, ushort e)
if (!Service.Player.IsJobCategory(JobRole.Tank) && !Service.Player.IsJobCategory(JobRole.Healer)) return;

var territory = Service.GetSheet<TerritoryType>().GetRow(e);
//if (HighEndDuties.Any(t => t.RowId == territory.RowId))
if (HighEndDuties.Any(t => t.RowId == territory.RowId))
{
var str = territory.PlaceName?.Value?.Name.ToString() ?? "High-end Duty";
var message = string.Format(LocalizationManager.RightLang.HighEndWarning, str);
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public Watcher()
private void UpdateRTTDetour(dynamic expando)
{
PluginLog.LogDebug($"LastRTT:{expando.LastRTT}");
DataCenter.Ping = (long)expando.LastRTT / 1000f;
var ping = (long)expando.LastRTT / 1000f;
DataCenter.Ping = ping > 0.3f ? 0.1f : ping;
}

public static string ShowStrSelf { get; private set; } = string.Empty;
Expand Down

0 comments on commit ef07570

Please sign in to comment.