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

Commit

Permalink
fix: input will be disable when in pvp zone.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 31, 2023
1 parent 9ca5f38 commit b381539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RotationSolver/Updaters/InputUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void KeyDown(KeyRecord key)
return;
}

if (!Service.Config.UseKeyboardCommand) return;
if (!Service.Config.UseKeyboardCommand || SocialUpdater.InPvp) return;

if (Service.Config.KeyState.ContainsValue(key))
{
Expand Down Expand Up @@ -130,7 +130,7 @@ private static void ButtonDown(ButtonRecord button)
return;
}

if (!Service.Config.UseGamepadCommand) return;
if (!Service.Config.UseGamepadCommand || SocialUpdater.InPvp) return;

if (Service.Config.ButtonState.ContainsValue(button))
{
Expand Down
2 changes: 2 additions & 0 deletions RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace RotationSolver.Updaters;

internal class SocialUpdater
{
public static bool InPvp { get; private set; }
static List<string> _macroToAuthor = new List<string>()
{
"blush",
Expand Down Expand Up @@ -73,6 +74,7 @@ static void ClientState_TerritoryChanged(object sender, ushort e)
{
_canSaying = true;
}
InPvp = territory.IsPvpZone;
DataCenter.InHighEndDuty = HighEndDuties.Any(t => t.RowId == territory.RowId);
}

Expand Down

0 comments on commit b381539

Please sign in to comment.