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

Commit

Permalink
fix: fixed vfx drawing about the gcd target.
Browse files Browse the repository at this point in the history
Issues: #574
  • Loading branch information
ArchiDog1998 committed Apr 4, 2024
1 parent d0cf340 commit 63d9e8c
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>ArchiTed</Authors>
<Version>4.2.4.1</Version>
<Version>4.2.4.3</Version>
<PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 2 additions & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,8 @@
"29709": 0.1,
"29711": 0.6,
"29731": 0.1,
"29732": 0.6,
"29733": 0.6,
"30800": 0.1,
"31323": 2.1,
"31338": 2.1,
Expand Down
4 changes: 2 additions & 2 deletions Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 121701,
"SayingHelloCount": 194,
"ClickingCount": 121754,
"SayingHelloCount": 195,
"SaidUsers": []
}
23 changes: 23 additions & 0 deletions RotationSolver.Basic/Rotations/Duties/VariantRotation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

namespace RotationSolver.Basic.Rotations.Duties;

/// <summary>
/// The variant action.
/// </summary>
[DutyTerritory(1069, 1137, 1176)] //TODO: the variant territory ids!
public abstract class VariantRotation : DutyRotation
{
}

partial class DutyRotation
{
static partial void ModifyVariantCurePvE(ref ActionSetting setting)
{
setting.TargetStatusProvide = [StatusID.VariantCureSet];
}

static partial void ModifyVariantCurePvE_33862(ref ActionSetting setting)
{
setting.TargetStatusProvide = [StatusID.VariantCureSet];
}
}
7 changes: 6 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,10 @@
"RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Mistake": "Can't properly execute the behavior that RS wants to do.",
"RotationSolver.Data.UiString.ConfigWindow_About_Compatibility_Crash": "Causes the game to crash.",
"RotationSolver.Data.UiString.ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"RotationSolver.Data.UiString.ConfigWindow_About_OpenConfigFolder": "Open Config Folder"
"RotationSolver.Data.UiString.ConfigWindow_About_OpenConfigFolder": "Open Config Folder",
"RotationSolver.Data.UiString.SpecialCommandType_Smart": "Auto Target ",
"RotationSolver.Basic.Data.TargetingType.Small": "Small",
"RotationSolver.Data.UiString.SpecialCommandType_Off": "Off",
"RotationSolver.Data.UiString.SpecialCommandType_Cancel": "Cancel",
"RotationSolver.Data.UiString.ConfigWindow_DutyRotationDesc": "The duty rotation you chose, click to modify."
}
77 changes: 39 additions & 38 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,52 @@ internal static IBaseAction? NextGCDAction
get => _nextGCDAction;
set
{
UpdateOmen(value);
if (_nextGCDAction == value) return;
_nextGCDAction = value;
}
}

if (!Service.Config.ShowTarget) return;

var player = Player.Object;
if (player == null) return;

circle ??= new(GroundOmenFriendly.Circle.Omen(), player, new Vector3(0, gcdHeight, 0));
sector ??= new(GroundOmenFriendly.Fan120.Omen(), player, new Vector3(0, gcdHeight, 0));
rectangle ??= new(GroundOmenFriendly.Rectangle.Omen(), player, new Vector3(0, gcdHeight, 0));
private static void UpdateOmen(IBaseAction? value)
{
var player = Player.Object;
if (player == null) return;

circle.Enable = sector.Enable = rectangle.Enable = false;
circle.Owner = sector.Owner = rectangle.Owner = player;
circle ??= new(GroundOmenFriendly.Circle.Omen(), player, new Vector3(0, gcdHeight, 0));
sector ??= new(GroundOmenFriendly.Fan120.Omen(), player, new Vector3(0, gcdHeight, 0));
rectangle ??= new(GroundOmenFriendly.Rectangle.Omen(), player, new Vector3(0, gcdHeight, 0));

if (value == null) return;
var target = value.Target.Target ?? player;
circle.Enable = sector.Enable = rectangle.Enable = false;
circle.Owner = sector.Owner = rectangle.Owner = player;

var range = value.Action.EffectRange;
var size = new Vector3(range, gcdHeight, range);
switch(value.Action.CastType)
{
//case 1:
case 2:
circle.Owner = target;
circle.UpdateScale(size);
circle.Enable = true;
break;
if (!Service.Config.ShowTarget) return;
if (value == null) return;

case 3:
sector.Target = target;
sector.UpdateScale(size);
sector.Enable = true;
break;
var target = value.Target.Target ?? player;

case 4:
size.X = value.Action.XAxisModifier / 2;
rectangle.Target = target;
rectangle.UpdateScale(size);
rectangle.Enable = true;
break;
}
var range = value.Action.EffectRange;
var size = new Vector3(range, gcdHeight, range);
switch (value.Action.CastType)
{
//case 1:
case 2:
circle.Owner = target;
circle.UpdateScale(size);
circle.Enable = true;
break;

case 3:
sector.Target = target;
sector.UpdateScale(size);
sector.Enable = true;
break;

case 4:
size.X = value.Action.XAxisModifier / 2;
rectangle.Target = target;
rectangle.UpdateScale(size);
rectangle.Enable = true;
break;
}
}

Expand Down Expand Up @@ -121,10 +125,7 @@ internal static void UpdateNextAction()

if (gcdAction is IBaseAction GcdAction)
{
if (NextGCDAction != GcdAction)
{
NextGCDAction = GcdAction;
}
NextGCDAction = GcdAction;
}
return;
}
Expand Down
7 changes: 0 additions & 7 deletions RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ static void ClientState_TerritoryChanged(ushort id)

DataCenter.Territory = territory;

#if DEBUG
Svc.Log.Debug($"Move to {DataCenter.TerritoryName} ({id})");
#endif

try
{
DataCenter.RightNowRotation?.OnTerritoryChanged();
Expand Down Expand Up @@ -149,10 +145,7 @@ private static async void SayHelloToUsers()
}

var players = DataCenter.AllianceMembers.OfType<PlayerCharacter>()
#if DEBUG
#else
.Where(c => c.ObjectId != Player.Object.ObjectId)
#endif
.Select(player => (player, player.EncryptString()))
.Where(pair => !saidAuthors.Contains(pair.Item2)
&& !OtherConfiguration.RotationSolverRecord.SaidUsers.Contains(pair.Item2));
Expand Down

0 comments on commit 63d9e8c

Please sign in to comment.