Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soto vnext #905

Merged
merged 3 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Blish HUD/GameServices/OverlayService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public DynamicHUDMethod DynamicHUDLoading {

private readonly object _exitLock = new object();

private bool _sotoIsLive = false;

internal OverlayService() {
SetServiceModules(this.OverlayUpdateHandler = new OverlayUpdateHandler(this));
}
Expand Down Expand Up @@ -309,7 +311,15 @@ private Locale GetGw2LocaleFromCurrentUICulture() {
}
}

private void SotoFix() {
// TODO: We will eventually want to change this so that we detect if the active player has at least one level 80 - we use this to move the icon over one more.
if (DateTime.UtcNow.Date >= new DateTime(2023, 8, 22, 0, 0, 0, DateTimeKind.Utc)) {
_sotoIsLive = true;
}
}

protected override void Load() {
SotoFix();
BuildMainWindow();
BuildCornerIcon();
}
Expand Down Expand Up @@ -382,7 +392,8 @@ protected override void Update(GameTime gameTime) {

if (GameIntegration.Gw2Instance.IsInGame) {
int offset = /* Offset +1 if Chinese client */ (GameIntegration.ClientType.ClientType == Gw2ClientContext.ClientType.Chinese ? 1 : 0)
+ /* Offset +1 if running TacO */ (GameIntegration.TacO.TacOIsRunning ? 1 : 0);
+ /* Offset +1 if running TacO */ (GameIntegration.TacO.TacOIsRunning ? 1 : 0)
+ /* Offset +1 if SOTO released */ (_sotoIsLive ? 1 : 0);

CornerIcon.LeftOffset = offset * 36;
}
Expand Down
9 changes: 6 additions & 3 deletions Blish HUD/Library/Glide/Tweener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,13 @@ private void ForAllTweens(Action<Tween> action) {

private void ForAllTweens(object target, Action<Tween> action) {
if (tweens.TryGetValue(target, out var list)) {
Tween[] tweensList;
lock (list) {
foreach (Tween tween in list) {
action(tween);
}
tweensList = list.ToArray();
}

foreach (Tween tween in tweensList) {
action(tween);
}
}
}
Expand Down