Compare commits

...
2 Commits
Author SHA1 Message Date
amacocianandGitHub 4f849d880b Ux improvements (#148)
Rearrange quest log layout
Fix some quest names
Fix some buttons ux
Mitigate issues when reading guildwars memory
2023-03-02 01:58:07 +00:00
amacocianandGitHub 4b60c96aad Closes #146 #145 (#147) 2023-03-02 00:39:52 +00:00
29 changed files with 527 additions and 216 deletions
@@ -14,6 +14,8 @@ public sealed class FocusViewOptions
public PointsDisplay BalthazarPointsDisplay { get; set; }
[JsonProperty("ImperialPointsDisplay")]
public PointsDisplay ImperialPointsDisplay { get; set; }
[JsonProperty("VanquishingDisplay")]
public PointsDisplay VanquishingDisplay { get; set; }
[JsonProperty("BrowserUrl")]
public string? BrowserUrl { get; set; } = string.Empty;
}
+3 -4
View File
@@ -20,13 +20,12 @@
FontStretch="{Binding ElementName=_this, Path=FontStretch, Mode=OneWay}"
FontWeight="{Binding ElementName=_this, Path=FontWeight, Mode=OneWay}"
FontStyle="{Binding ElementName=_this, Path=FontStyle, Mode=OneWay}"
VerticalAlignment="Center"
HorizontalAlignment="Center"></TextBlock>
VerticalAlignment="{Binding ElementName=_this, Path=TextVerticalAlignment, Mode=OneWay}"
HorizontalAlignment="{Binding ElementName=_this, Path=TextHorizontalAlignment, Mode=OneWay}"></TextBlock>
<Rectangle Fill="{Binding ElementName=_this, Path=Highlight, Mode=OneWay}"
Opacity="{Binding ElementName=_this, Path=HighlightOpacity, Mode=OneWay}"
Visibility="{Binding ElementName=_this, Path=HighlightVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"></Rectangle>
<Rectangle MouseEnter="Rectangle_MouseEnter" MouseLeave="Rectangle_MouseLeave"
MouseLeftButtonDown="Rectangle_MouseLeftButtonDown" Fill="Transparent"
Cursor="Hand"></Rectangle>
MouseLeftButtonDown="Rectangle_MouseLeftButtonDown" Fill="Transparent"></Rectangle>
</Grid>
</UserControl>
@@ -26,6 +26,10 @@ public partial class OpaqueButton : UserControl
public double highlightOpacity;
[GenerateDependencyProperty]
public bool highlightVisible;
[GenerateDependencyProperty(InitialValue = VerticalAlignment.Center)]
public VerticalAlignment textVerticalAlignment;
[GenerateDependencyProperty(InitialValue = HorizontalAlignment.Center)]
public HorizontalAlignment textHorizontalAlignment;
public OpaqueButton()
{
@@ -19,7 +19,7 @@
<ContextMenu.Template>
<ControlTemplate>
<StackPanel Margin="10">
<local:OpaqueButton Text="Load build template" Foreground="White" Background="#F0202020" BackgroundOpacity="0.4"
<local:OpaqueButton Text="Load build template" Foreground="White" Background="#F0212121" BackgroundOpacity="0.4"
Clicked="LoadBuildTemplateButton_Click" FontSize="16" Height="40" Width="200"></local:OpaqueButton>
</StackPanel>
</ControlTemplate>
@@ -33,7 +33,7 @@
</Grid.RowDefinitions>
<wv2:WebView2 x:Name="WebBrowser" Source="{Binding ElementName=_this, Path=Address, Mode=TwoWay}"
IsEnabled="{Binding ElementName=_this, Path=BrowserSupported, Mode=OneWay}"></wv2:WebView2>
<Grid Grid.Row="1" Background="#80808080" IsEnabled="{Binding ElementName=_this, Path=BrowserSupported, Mode=OneWay}"
<Grid Grid.Row="1" Background="#F0212121" IsEnabled="{Binding ElementName=_this, Path=BrowserSupported, Mode=OneWay}"
Visibility="{Binding ElementName=_this, Path=ControlsEnabled, Mode=OneWay, Converter={StaticResource ReverseBooleanToVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
@@ -1,4 +1,4 @@
<UserControl x:Class="Daybreak.Controls.ResourceBar"
<UserControl x:Class="Daybreak.Controls.HorizontalResourceBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -13,16 +13,16 @@
<Rectangle
Fill="{Binding ElementName=_this, Path=BarColor, Mode=OneWay}"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
HorizontalAlignment="{Binding ElementName=_this, Path=FillAlignment, Mode=OneWay}"
Width="{Binding ElementName=_this, Path=MaxResourceValue, Mode=TwoWay}"></Rectangle>
<Rectangle
Fill="#A0202020"
Fill="#F0202020"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"></Rectangle>
<Rectangle
Fill="{Binding ElementName=_this, Path=BarColor, Mode=OneWay}"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
HorizontalAlignment="{Binding ElementName=_this, Path=FillAlignment, Mode=OneWay}"
Width="{Binding ElementName=_this, Path=CurrentResourceValue, Mode=TwoWay}"></Rectangle>
</Grid>
</Viewbox>
@@ -0,0 +1,34 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Extensions;
using System.Windows.Media;
namespace Daybreak.Controls;
/// <summary>
/// Interaction logic for ResourceBar.xaml
/// </summary>
public partial class HorizontalResourceBar : UserControl
{
[GenerateDependencyProperty]
private double currentResourceValue;
[GenerateDependencyProperty]
private double maxResourceValue;
[GenerateDependencyProperty]
private Brush barColor;
[GenerateDependencyProperty]
private string text;
[GenerateDependencyProperty(InitialValue = HorizontalAlignment.Left)]
private HorizontalAlignment fillAlignment;
public HorizontalResourceBar()
{
this.InitializeComponent();
this.MaxResourceValue = 1;
this.CurrentResourceValue = 0;
this.barColor = Brushes.Transparent;
this.text = string.Empty;
}
}
+8
View File
@@ -12,6 +12,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="GameCompanionButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:GoldenArrowGlyph Foreground="White"
@@ -22,6 +23,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="ManageBuildsButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:FireballGlyph Foreground="White"
@@ -32,6 +34,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="AccountSettingsButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:AvatarGlyph Foreground="White"
@@ -42,6 +45,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="GuildwarsSettingsButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:FileGlyph Foreground="White"
@@ -52,6 +56,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="LauncherSettingsButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:CogGlyph Foreground="White"
@@ -63,6 +68,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="ExperimentalSettingsButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:ExperimentGlyph Foreground="White"
@@ -73,6 +79,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="VersionManagementButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:StaticGlyph Foreground="White"
@@ -83,6 +90,7 @@
Foreground="White"
HighlightColor="White"
Height="30"
Cursor="Hand"
Clicked="LogsButton_Clicked">
<buttons:MenuButton.InnerContent>
<local:LogsGlyph Foreground="White"
@@ -7,6 +7,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Extensions;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
namespace Daybreak.Controls.Templates;
@@ -60,36 +61,22 @@ public partial class QuestLogTemplate : UserControl
foreach(var grouping in this.questLogCache)
{
var location = grouping.Key;
var locationTextBlock = new TextBlock
var locationTextBlock = new OpaqueButton
{
Text = grouping.Key?.Name ?? UncategorizedQuestsString,
FontSize = 18,
Margin = new Thickness(5),
Cursor = grouping.Key is null ? Cursors.Arrow : Cursors.Hand,
HorizontalAlignment = HorizontalAlignment.Left
HorizontalAlignment = HorizontalAlignment.Stretch,
TextHorizontalAlignment = HorizontalAlignment.Left,
Highlight = Brushes.White,
HighlightOpacity = grouping.Key is null ? 0 : 0.6
};
locationTextBlock.MouseLeftButtonDown += (_, _) => this.OnMapClicked(location);
this.ItemStackPanel.Children.Add(locationTextBlock);
foreach(var questMetadata in grouping)
{
var quest = questMetadata.Quest;
var questTextBlock = new TextBlock
{
Text = quest?.Name,
FontSize = 20,
Cursor = Cursors.Hand,
HorizontalAlignment = HorizontalAlignment.Left
};
questTextBlock.MouseLeftButtonDown += (_, _) => this.OnQuestClicked(quest);
this.ItemStackPanel.Children.Add(questTextBlock);
}
var rectangle = new Rectangle
{
Height = 1,
Margin = new Thickness(0, 0, 0, 10)
};
var rectangleForegroundBinding = new Binding("Foreground")
@@ -99,6 +86,30 @@ public partial class QuestLogTemplate : UserControl
rectangle.SetBinding(Rectangle.FillProperty, rectangleForegroundBinding);
this.ItemStackPanel.Children.Add(rectangle);
foreach (var questMetadata in grouping)
{
var quest = questMetadata.Quest;
var questTextBlock = new OpaqueButton
{
Text = quest?.Name,
FontSize = 20,
Cursor = Cursors.Hand,
Highlight = Brushes.White,
HighlightOpacity = 0.6,
HorizontalAlignment = HorizontalAlignment.Stretch,
TextHorizontalAlignment = HorizontalAlignment.Left
};
questTextBlock.MouseLeftButtonDown += (_, _) => this.OnQuestClicked(quest);
this.ItemStackPanel.Children.Add(questTextBlock);
}
this.ItemStackPanel.Children.Add(new Rectangle
{
Fill = Brushes.Transparent,
Height = 10,
HorizontalAlignment = HorizontalAlignment.Stretch
});
}
}
@@ -0,0 +1,37 @@
<UserControl x:Class="Daybreak.Controls.VerticalResourceBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Daybreak.Controls"
mc:Ignorable="d"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Viewbox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Stretch="Fill">
<Grid Width="1">
<Rectangle
Fill="{Binding ElementName=_this, Path=BarColor, Mode=OneWay}"
VerticalAlignment="{Binding ElementName=_this, Path=FillAlignment, Mode=OneWay}"
HorizontalAlignment="Stretch"
Height="{Binding ElementName=_this, Path=MaxResourceValue, Mode=TwoWay}"></Rectangle>
<Rectangle
Fill="#F0212121"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"></Rectangle>
<Rectangle
Fill="{Binding ElementName=_this, Path=BarColor, Mode=OneWay}"
VerticalAlignment="{Binding ElementName=_this, Path=FillAlignment, Mode=OneWay}"
HorizontalAlignment="Stretch"
Height="{Binding ElementName=_this, Path=CurrentResourceValue, Mode=TwoWay}"></Rectangle>
</Grid>
</Viewbox>
<TextBlock
FontSize="{Binding ElementName=_this, Path=FontSize, Mode=OneWay}"
FontFamily="{Binding ElementName=_this, Path=FontFamily, Mode=OneWay}"
Text="{Binding ElementName=_this, Path=Text, Mode=OneWay}"
Foreground="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}"
VerticalAlignment="Center"
HorizontalAlignment="Center"></TextBlock>
</Grid>
</UserControl>
@@ -8,7 +8,7 @@ namespace Daybreak.Controls;
/// <summary>
/// Interaction logic for ResourceBar.xaml
/// </summary>
public partial class ResourceBar : UserControl
public partial class VerticalResourceBar : UserControl
{
[GenerateDependencyProperty]
private double currentResourceValue;
@@ -18,8 +18,10 @@ public partial class ResourceBar : UserControl
private Brush barColor;
[GenerateDependencyProperty]
private string text;
[GenerateDependencyProperty(InitialValue = VerticalAlignment.Bottom)]
private VerticalAlignment fillAlignment;
public ResourceBar()
public VerticalResourceBar()
{
this.InitializeComponent();
this.MaxResourceValue = 1;
+4 -1
View File
@@ -13,7 +13,7 @@
<LangVersion>preview</LangVersion>
<ApplicationIcon>Daybreak.ico</ApplicationIcon>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
<Version>0.9.8.2</Version>
<Version>0.9.8.4</Version>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<UserSecretsId>cfb2a489-db80-448d-a969-80270f314c46</UserSecretsId>
</PropertyGroup>
@@ -72,6 +72,9 @@
<Compile Update="Controls\Buttons\CancelButton.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Controls\VerticalResourceBar.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\IconDownloadView.xaml.cs">
<SubType>Code</SubType>
</Compile>
+5 -3
View File
@@ -23,7 +23,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Grid Cursor="Hand">
<Rectangle x:Name="OverlayRect" Fill="{TemplateBinding Background}" Opacity="0"></Rectangle>
<controls:ThreeDotsGlyph Margin="13"></controls:ThreeDotsGlyph>
</Grid>
@@ -33,7 +33,7 @@
<Condition Property="IsMouseOver" Value="True"></Condition>
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter Property="Opacity" TargetName="OverlayRect" Value="0.5"></Setter>
<Setter Property="Opacity" TargetName="OverlayRect" Value="1"></Setter>
</MultiTrigger.Setters>
</MultiTrigger>
<MultiTrigger>
@@ -118,7 +118,7 @@
Grid.RowSpan="2"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Background="#A0202020">
Background="#F0212121">
<controls:MenuList Margin="0, 30, 0, 0"/>
</Grid>
<ToggleButton x:Name="OpeningSettingsButton"
@@ -126,6 +126,7 @@
Width="50"
Height="30"
HorizontalAlignment="Left"
Background="#F0212121"
Margin="0, 0, 0, 0"
Grid.ColumnSpan="2"
Foreground="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}"
@@ -138,6 +139,7 @@
Margin="0, 0, 0, 0"
Grid.ColumnSpan="2"
Foreground="White"
Background="#F09E9E9E"
Visibility="{Binding ElementName=_this, Path=IsShowingDropdown, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
Click="SettingsButton_Clicked"></ToggleButton>
<wcl:Border OnResize="Border_OnResize" Grid.RowSpan="2" Grid.ColumnSpan="2" Active="True"></wcl:Border>
+63 -63
View File
@@ -627,68 +627,68 @@ public sealed class Map
public static readonly Map KilroysPunchoutTournament = new() { Id = 726, Name = "Plains of Jarin", WikiUrl = "https://wiki.guildwars.com/wiki/Plains_of_Jarin" };
public static readonly Map SpecialOpsFlameTempleCorridor = new() { Id = 727, Name = "Plains of Jarin", WikiUrl = "https://wiki.guildwars.com/wiki/Plains_of_Jarin" };
public static readonly Map SpecialOpsDragonsGullet = new() { Id = 728, Name = "(crash)", WikiUrl = "" };
public static readonly Map SpecialOpsGrendichCourthouse = new() { Id = 729, Name = " Special Ops Grendich Courthouse", WikiUrl = "https://wiki.guildwars.com/wiki/Grendich_Courthouse" };
public static readonly Map TheTenguAccords = new() { Id = 730, Name = " The Tengu Accords", WikiUrl = "https://wiki.guildwars.com/wiki/_The_Tengu_Accords" };
public static readonly Map TheBattleofJahai = new() { Id = 731, Name = " The Battle of Jahai", WikiUrl = "https://wiki.guildwars.com/wiki/The_Battle_of_Jahai" };
public static readonly Map TheFlightNorth = new() { Id = 732, Name = " The Flight North", WikiUrl = "https://wiki.guildwars.com/wiki/_The_Flight_North" };
public static readonly Map TheRiseoftheWhiteMantle = new() { Id = 733, Name = " The Rise of the White Mantle", WikiUrl = "https://wiki.guildwars.com/wiki/The_Rise_of_the_White_Mantle" };
public static readonly Map FindingtheBloodstoneMission = new() { Id = 734, Name = " Finding the Bloodstone Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Finding_the_Bloodstone" };
public static readonly Map GeniusOperatedLivingEnchantedManifestationMission = new() { Id = 760, Name = " Genius Operated Living Enchanted Manifestation Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Genius_Operated_Living_Enchanted_Manifestation" };
public static readonly Map AgainsttheCharrMission = new() { Id = 761, Name = " Against the Charr Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Against_the_Charr" };
public static readonly Map WarbandofbrothersMission = new() { Id = 762, Name = " Warband of brothers Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Warband_of_Brothers" };
public static readonly Map AssaultontheStrongholdMission = new() { Id = 763, Name = " Assault on the Stronghold Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Assault_on_the_Stronghold" };
public static readonly Map DestructionsDepthsMission = new() { Id = 764, Name = " Destructions Depths Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Destruction's_Depths" };
public static readonly Map ATimeforHeroesMission = new() { Id = 765, Name = " A Time for Heroes Mission", WikiUrl = "https://wiki.guildwars.com/wiki/A_Time_for_Heroes" };
public static readonly Map CurseoftheNornbearMission = new() { Id = 766, Name = " Curse of the Nornbear Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Curse_of_the_Nornbear" };
public static readonly Map BloodWashesBloodMission = new() { Id = 767, Name = " Blood Washes Blood Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Blood_Washes_Blood" };
public static readonly Map AGateTooFarMission = new() { Id = 768, Name = " A Gate Too Far Mission", WikiUrl = "https://wiki.guildwars.com/wiki/A_Gate_Too_Far" };
public static readonly Map TheElusiveGolemancerMission = new() { Id = 769, Name = " The Elusive Golemancer Mission", WikiUrl = "https://wiki.guildwars.com/wiki/The_Elusive_Golemancer" };
public static readonly Map SecretLairoftheSnowmen2 = new() { Id = 770, Name = " Secret Lair of the Snowmen2", WikiUrl = "https://wiki.guildwars.com/wiki/Secret_Lair_of_the_Snowmen" };
public static readonly Map SecretLairoftheSnowmen3 = new() { Id = 782, Name = " Secret Lair of the Snowmen3", WikiUrl = "https://wiki.guildwars.com/wiki/Secret_Lair_of_the_Snowmen" };
public static readonly Map DroknarsForgecinematic = new() { Id = 783, Name = " Droknars Forge (cinematic)", WikiUrl = "https://wiki.guildwars.com/wiki/Droknar's_Forge" };
public static readonly Map IsleoftheNamelessPvP = new() { Id = 784, Name = " Isle of the Nameless PvP", WikiUrl = "https://wiki.guildwars.com/wiki/Isle_of_the_Nameless_(PvP)" };
public static readonly Map TempleoftheAgesROX = new() { Id = 785, Name = " Temple of the Ages ROX", WikiUrl = "https://wiki.guildwars.com/wiki/Deactivating_R.O.X." };
public static readonly Map WajjunBazaarPOX = new() { Id = 789, Name = " Wajjun Bazaar POX", WikiUrl = "https://wiki.guildwars.com/wiki/Deactivating_P.O.X." };
public static readonly Map BokkaAmphitheatreNOX = new() { Id = 790, Name = " Bokka Amphitheatre NOX", WikiUrl = "https://wiki.guildwars.com/wiki/Deactivating_N.O.X." };
public static readonly Map SecretUndergroundLair = new() { Id = 791, Name = " Secret Underground Lair", WikiUrl = "https://wiki.guildwars.com/wiki/_Secret_Underground_Lair" };
public static readonly Map GolemTutorialSimulation = new() { Id = 792, Name = " Golem Tutorial Simulation", WikiUrl = "https://wiki.guildwars.com/wiki/_Golem_Tutorial_Simulation" };
public static readonly Map SnowballDominance = new() { Id = 793, Name = " Snowball Dominance", WikiUrl = "https://wiki.guildwars.com/wiki/_Snowball_Dominance" };
public static readonly Map ZaishenMenagerieGrounds = new() { Id = 794, Name = " Zaishen Menagerie Grounds", WikiUrl = "https://wiki.guildwars.com/wiki/_Zaishen_Menagerie_Grounds" };
public static readonly Map ZaishenMenagerieOutpost = new() { Id = 795, Name = " Zaishen Menagerie (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Zaishen_Menagerie_(outpost)" };
public static readonly Map CodexArenaOutpost = new() { Id = 796, Name = " Codex Arena (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Codex_Arena_(outpost)" };
public static readonly Map TheUnderworldSomethingWickedThisWayComes = new() { Id = 797, Name = " The Underworld Something Wicked This Way Comes", WikiUrl = "https://wiki.guildwars.com/wiki/Something_Wicked_This_Way_Comes" };
public static readonly Map TheUnderworldDontFeartheReapers = new() { Id = 807, Name = " The Underworld Don't Fear the Reapers", WikiUrl = "https://wiki.guildwars.com/wiki/Don't_Fear_the_Reapers" };
public static readonly Map LionsArchHalloweenOutpost = new() { Id = 808, Name = " Lions Arch Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(Halloween)" };
public static readonly Map LionsArchWintersdayOutpost = new() { Id = 809, Name = " Lions Arch Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(Wintersday)" };
public static readonly Map LionsArchCanthanNewYearOutpost = new() { Id = 810, Name = " Lions Arch Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch" };
public static readonly Map AscalonCityWintersdayOutpost = new() { Id = 811, Name = " Ascalon City Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Ascalon_City_(Wintersday)" };
public static readonly Map DroknarsForgeHalloweenOutpost = new() { Id = 812, Name = " Droknars Forge Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Droknar's_Forge_(Halloween)" };
public static readonly Map DroknarsForgeWintersdayOutpost = new() { Id = 813, Name = " Droknars Forge Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Droknar's_Forge_(Halloween)" };
public static readonly Map TombofthePrimevalKingsHalloweenOutpost = new() { Id = 814, Name = " Tomb of the Primeval Kings Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Tomb_of_the_Primeval_Kings_(Halloween)" };
public static readonly Map ShingJeaMonasteryDragonFestivalOutpost = new() { Id = 815, Name = " Shing Jea Monastery Dragon Festival (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Shing_Jea_Monastery" };
public static readonly Map ShingJeaMonasteryCanthanNewYearOutpost = new() { Id = 816, Name = " Shing Jea Monastery Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Shing_Jea_Monastery" };
public static readonly Map KainengCenterCanthanNewYearOutpost = new() { Id = 817, Name = " Kaineng Center Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kaineng_Center" };
public static readonly Map KamadanJewelofIstanHalloweenOutpost = new() { Id = 818, Name = " Kamadan Jewel of Istan Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kamadan,_Jewel_of_Istan_(Halloween)" };
public static readonly Map KamadanJewelofIstanWintersdayOutpost = new() { Id = 819, Name = " Kamadan Jewel of Istan Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kamadan,_Jewel_of_Istan_(Wintersday)" };
public static readonly Map KamadanJewelofIstanCanthanNewYearOutpost = new() { Id = 820, Name = " Kamadan Jewel of Istan Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kamadan,_Jewel_of_Istan" };
public static readonly Map EyeoftheNorthOutpostWintersdayOutpost = new() { Id = 821, Name = " Eyeofthe North Outpost Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Eye_of_the_North_(outpost)_(Wintersday)" };
public static readonly Map WarinKrytaTalmarkWilderness = new() { Id = 822, Name = " War in Kryta Talmark Wilderness", WikiUrl = "https://wiki.guildwars.com/wiki/Talmark_Wilderness_(War_in_Kryta)" };
public static readonly Map WarinKrytaTrialofZinn = new() { Id = 838, Name = " War in Kryta Trialof Zinn", WikiUrl = "https://wiki.guildwars.com/wiki/Trial_of_Zinn" };
public static readonly Map WarinKrytaDivinityCoast = new() { Id = 839, Name = " War in Kryta Divinity Coast", WikiUrl = "https://wiki.guildwars.com/wiki/Divinity_Coast_(explorable_area)" };
public static readonly Map WarinKrytaLionsArchKeep = new() { Id = 840, Name = " War in Kryta Lions Arch Keep", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(War_in_Kryta)" };
public static readonly Map WarinKrytaDAlessioSeaboard = new() { Id = 841, Name = " War in Kryta D'Alessio Seaboard", WikiUrl = "https://wiki.guildwars.com/wiki/D'Alessio_Seaboard_(explorable_area)" };
public static readonly Map WarinKrytaTheBattleforLionsArch = new() { Id = 842, Name = " War in Kryta The Battle for Lions Arch", WikiUrl = "https://wiki.guildwars.com/wiki/The_Battle_for_Lion's_Arch" };
public static readonly Map WarinKrytaRiversideProvince = new() { Id = 843, Name = " War in Kryta Riverside Province", WikiUrl = "https://wiki.guildwars.com/wiki/Riverside_Province_(explorable_area)" };
public static readonly Map WarinKrytaLionsArch = new() { Id = 844, Name = " War in Kryta Lions Arch", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(War_in_Kryta)" };
public static readonly Map WarinKrytaTheMausoleum = new() { Id = 845, Name = " War in Kryta The Mausoleum", WikiUrl = "https://wiki.guildwars.com/wiki/The_Mausoleum" };
public static readonly Map WarinKrytaRise = new() { Id = 846, Name = " War in Kryta Rise", WikiUrl = "https://wiki.guildwars.com/wiki/Rise" };
public static readonly Map WarinKrytaShadowsintheJungle = new() { Id = 847, Name = " War in Kryta Shadows in the Jungle", WikiUrl = "https://wiki.guildwars.com/wiki/Shadows_in_the_Jungle" };
public static readonly Map WarinKrytaAVengeanceofBlades = new() { Id = 848, Name = " War in Kryta A Vengeance of Blades", WikiUrl = "https://wiki.guildwars.com/wiki/A_Vengeance_of_Blades" };
public static readonly Map WarinKrytaAuspiciousBeginnings = new() { Id = 849, Name = " War in Kryta Auspicious Beginnings", WikiUrl = "https://wiki.guildwars.com/wiki/Auspicious_Beginnings" };
public static readonly Map Olafsteadcinematic = new() { Id = 850, Name = " Olafstead (cinematic)", WikiUrl = "https://wiki.guildwars.com/wiki/Olafstead" };
public static readonly Map TheGreatSnowballFightoftheGodsOperationCrushSpirits = new() { Id = 855, Name = " The Great Snowball Fight of the Gods Operation Crush Spirits", WikiUrl = "https://wiki.guildwars.com/wiki/The_Great_Snowball_Fight_of_the_Gods_(outpost)" };
public static readonly Map TheGreatSnowballFightoftheGodsFightinginaWinterWonderland = new() { Id = 856, Name = " The Great Snowball Fight of the Gods Fighting in a Winter Wonderland", WikiUrl = "https://wiki.guildwars.com/wiki/The_Great_Snowball_Fight_of_the_Gods" };
public static readonly Map EmbarkBeach = new() { Id = 857, Name = " Embark Beach", WikiUrl = "https://wiki.guildwars.com/wiki/_Embark_Beach" };
public static readonly Map SpecialOpsGrendichCourthouse = new() { Id = 729, Name = "Special Ops Grendich Courthouse", WikiUrl = "https://wiki.guildwars.com/wiki/Grendich_Courthouse" };
public static readonly Map TheTenguAccords = new() { Id = 730, Name = "The Tengu Accords", WikiUrl = "https://wiki.guildwars.com/wiki/_The_Tengu_Accords" };
public static readonly Map TheBattleofJahai = new() { Id = 731, Name = "The Battle of Jahai", WikiUrl = "https://wiki.guildwars.com/wiki/The_Battle_of_Jahai" };
public static readonly Map TheFlightNorth = new() { Id = 732, Name = "The Flight North", WikiUrl = "https://wiki.guildwars.com/wiki/_The_Flight_North" };
public static readonly Map TheRiseoftheWhiteMantle = new() { Id = 733, Name = "The Rise of the White Mantle", WikiUrl = "https://wiki.guildwars.com/wiki/The_Rise_of_the_White_Mantle" };
public static readonly Map FindingtheBloodstoneMission = new() { Id = 734, Name = "Finding the Bloodstone Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Finding_the_Bloodstone" };
public static readonly Map GeniusOperatedLivingEnchantedManifestationMission = new() { Id = 760, Name = "Genius Operated Living Enchanted Manifestation Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Genius_Operated_Living_Enchanted_Manifestation" };
public static readonly Map AgainsttheCharrMission = new() { Id = 761, Name = "Against the Charr Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Against_the_Charr" };
public static readonly Map WarbandofbrothersMission = new() { Id = 762, Name = "Warband of brothers Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Warband_of_Brothers" };
public static readonly Map AssaultontheStrongholdMission = new() { Id = 763, Name = "Assault on the Stronghold Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Assault_on_the_Stronghold" };
public static readonly Map DestructionsDepthsMission = new() { Id = 764, Name = "Destructions Depths Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Destruction's_Depths" };
public static readonly Map ATimeforHeroesMission = new() { Id = 765, Name = "A Time for Heroes Mission", WikiUrl = "https://wiki.guildwars.com/wiki/A_Time_for_Heroes" };
public static readonly Map CurseoftheNornbearMission = new() { Id = 766, Name = "Curse of the Nornbear Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Curse_of_the_Nornbear" };
public static readonly Map BloodWashesBloodMission = new() { Id = 767, Name = "Blood Washes Blood Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Blood_Washes_Blood" };
public static readonly Map AGateTooFarMission = new() { Id = 768, Name = "A Gate Too Far Mission", WikiUrl = "https://wiki.guildwars.com/wiki/A_Gate_Too_Far" };
public static readonly Map TheElusiveGolemancerMission = new() { Id = 769, Name = "The Elusive Golemancer Mission", WikiUrl = "https://wiki.guildwars.com/wiki/The_Elusive_Golemancer" };
public static readonly Map SecretLairoftheSnowmen2 = new() { Id = 770, Name = "Secret Lair of the Snowmen2", WikiUrl = "https://wiki.guildwars.com/wiki/Secret_Lair_of_the_Snowmen" };
public static readonly Map SecretLairoftheSnowmen3 = new() { Id = 782, Name = "Secret Lair of the Snowmen3", WikiUrl = "https://wiki.guildwars.com/wiki/Secret_Lair_of_the_Snowmen" };
public static readonly Map DroknarsForgecinematic = new() { Id = 783, Name = "Droknars Forge (cinematic)", WikiUrl = "https://wiki.guildwars.com/wiki/Droknar's_Forge" };
public static readonly Map IsleoftheNamelessPvP = new() { Id = 784, Name = "Isle of the Nameless PvP", WikiUrl = "https://wiki.guildwars.com/wiki/Isle_of_the_Nameless_(PvP)" };
public static readonly Map TempleoftheAgesROX = new() { Id = 785, Name = "Temple of the Ages ROX", WikiUrl = "https://wiki.guildwars.com/wiki/Deactivating_R.O.X." };
public static readonly Map WajjunBazaarPOX = new() { Id = 789, Name = "Wajjun Bazaar POX", WikiUrl = "https://wiki.guildwars.com/wiki/Deactivating_P.O.X." };
public static readonly Map BokkaAmphitheatreNOX = new() { Id = 790, Name = "Bokka Amphitheatre NOX", WikiUrl = "https://wiki.guildwars.com/wiki/Deactivating_N.O.X." };
public static readonly Map SecretUndergroundLair = new() { Id = 791, Name = "Secret Underground Lair", WikiUrl = "https://wiki.guildwars.com/wiki/_Secret_Underground_Lair" };
public static readonly Map GolemTutorialSimulation = new() { Id = 792, Name = "Golem Tutorial Simulation", WikiUrl = "https://wiki.guildwars.com/wiki/_Golem_Tutorial_Simulation" };
public static readonly Map SnowballDominance = new() { Id = 793, Name = "Snowball Dominance", WikiUrl = "https://wiki.guildwars.com/wiki/_Snowball_Dominance" };
public static readonly Map ZaishenMenagerieGrounds = new() { Id = 794, Name = "Zaishen Menagerie Grounds", WikiUrl = "https://wiki.guildwars.com/wiki/_Zaishen_Menagerie_Grounds" };
public static readonly Map ZaishenMenagerieOutpost = new() { Id = 795, Name = "Zaishen Menagerie (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Zaishen_Menagerie_(outpost)" };
public static readonly Map CodexArenaOutpost = new() { Id = 796, Name = "Codex Arena (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Codex_Arena_(outpost)" };
public static readonly Map TheUnderworldSomethingWickedThisWayComes = new() { Id = 797, Name = "The Underworld Something Wicked This Way Comes", WikiUrl = "https://wiki.guildwars.com/wiki/Something_Wicked_This_Way_Comes" };
public static readonly Map TheUnderworldDontFeartheReapers = new() { Id = 807, Name = "The Underworld Don't Fear the Reapers", WikiUrl = "https://wiki.guildwars.com/wiki/Don't_Fear_the_Reapers" };
public static readonly Map LionsArchHalloweenOutpost = new() { Id = 808, Name = "Lions Arch Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(Halloween)" };
public static readonly Map LionsArchWintersdayOutpost = new() { Id = 809, Name = "Lions Arch Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(Wintersday)" };
public static readonly Map LionsArchCanthanNewYearOutpost = new() { Id = 810, Name = "Lions Arch Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch" };
public static readonly Map AscalonCityWintersdayOutpost = new() { Id = 811, Name = "Ascalon City Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Ascalon_City_(Wintersday)" };
public static readonly Map DroknarsForgeHalloweenOutpost = new() { Id = 812, Name = "Droknars Forge Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Droknar's_Forge_(Halloween)" };
public static readonly Map DroknarsForgeWintersdayOutpost = new() { Id = 813, Name = "Droknars Forge Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Droknar's_Forge_(Halloween)" };
public static readonly Map TombofthePrimevalKingsHalloweenOutpost = new() { Id = 814, Name = "Tomb of the Primeval Kings Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Tomb_of_the_Primeval_Kings_(Halloween)" };
public static readonly Map ShingJeaMonasteryDragonFestivalOutpost = new() { Id = 815, Name = "Shing Jea Monastery Dragon Festival (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Shing_Jea_Monastery" };
public static readonly Map ShingJeaMonasteryCanthanNewYearOutpost = new() { Id = 816, Name = "Shing Jea Monastery Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Shing_Jea_Monastery" };
public static readonly Map KainengCenterCanthanNewYearOutpost = new() { Id = 817, Name = "Kaineng Center Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kaineng_Center" };
public static readonly Map KamadanJewelofIstanHalloweenOutpost = new() { Id = 818, Name = "Kamadan Jewel of Istan Halloween (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kamadan,_Jewel_of_Istan_(Halloween)" };
public static readonly Map KamadanJewelofIstanWintersdayOutpost = new() { Id = 819, Name = "Kamadan Jewel of Istan Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kamadan,_Jewel_of_Istan_(Wintersday)" };
public static readonly Map KamadanJewelofIstanCanthanNewYearOutpost = new() { Id = 820, Name = "Kamadan Jewel of Istan Canthan New Year (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Kamadan,_Jewel_of_Istan" };
public static readonly Map EyeoftheNorthOutpostWintersdayOutpost = new() { Id = 821, Name = "Eyeofthe North Outpost Wintersday (Outpost)", WikiUrl = "https://wiki.guildwars.com/wiki/Eye_of_the_North_(outpost)_(Wintersday)" };
public static readonly Map WarinKrytaTalmarkWilderness = new() { Id = 822, Name = "War in Kryta Talmark Wilderness", WikiUrl = "https://wiki.guildwars.com/wiki/Talmark_Wilderness_(War_in_Kryta)" };
public static readonly Map WarinKrytaTrialofZinn = new() { Id = 838, Name = "War in Kryta Trialof Zinn", WikiUrl = "https://wiki.guildwars.com/wiki/Trial_of_Zinn" };
public static readonly Map WarinKrytaDivinityCoast = new() { Id = 839, Name = "War in Kryta Divinity Coast", WikiUrl = "https://wiki.guildwars.com/wiki/Divinity_Coast_(explorable_area)" };
public static readonly Map WarinKrytaLionsArchKeep = new() { Id = 840, Name = "War in Kryta Lions Arch Keep", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(War_in_Kryta)" };
public static readonly Map WarinKrytaDAlessioSeaboard = new() { Id = 841, Name = "War in Kryta D'Alessio Seaboard", WikiUrl = "https://wiki.guildwars.com/wiki/D'Alessio_Seaboard_(explorable_area)" };
public static readonly Map WarinKrytaTheBattleforLionsArch = new() { Id = 842, Name = "War in Kryta The Battle for Lions Arch", WikiUrl = "https://wiki.guildwars.com/wiki/The_Battle_for_Lion's_Arch" };
public static readonly Map WarinKrytaRiversideProvince = new() { Id = 843, Name = "War in Kryta Riverside Province", WikiUrl = "https://wiki.guildwars.com/wiki/Riverside_Province_(explorable_area)" };
public static readonly Map WarinKrytaLionsArch = new() { Id = 844, Name = "War in Kryta Lions Arch", WikiUrl = "https://wiki.guildwars.com/wiki/Lion's_Arch_(War_in_Kryta)" };
public static readonly Map WarinKrytaTheMausoleum = new() { Id = 845, Name = "War in Kryta The Mausoleum", WikiUrl = "https://wiki.guildwars.com/wiki/The_Mausoleum" };
public static readonly Map WarinKrytaRise = new() { Id = 846, Name = "War in Kryta Rise", WikiUrl = "https://wiki.guildwars.com/wiki/Rise" };
public static readonly Map WarinKrytaShadowsintheJungle = new() { Id = 847, Name = "War in Kryta Shadows in the Jungle", WikiUrl = "https://wiki.guildwars.com/wiki/Shadows_in_the_Jungle" };
public static readonly Map WarinKrytaAVengeanceofBlades = new() { Id = 848, Name = "War in Kryta A Vengeance of Blades", WikiUrl = "https://wiki.guildwars.com/wiki/A_Vengeance_of_Blades" };
public static readonly Map WarinKrytaAuspiciousBeginnings = new() { Id = 849, Name = "War in Kryta Auspicious Beginnings", WikiUrl = "https://wiki.guildwars.com/wiki/Auspicious_Beginnings" };
public static readonly Map Olafsteadcinematic = new() { Id = 850, Name = "Olafstead (cinematic)", WikiUrl = "https://wiki.guildwars.com/wiki/Olafstead" };
public static readonly Map TheGreatSnowballFightoftheGodsOperationCrushSpirits = new() { Id = 855, Name = "The Great Snowball Fight of the Gods Operation Crush Spirits", WikiUrl = "https://wiki.guildwars.com/wiki/The_Great_Snowball_Fight_of_the_Gods_(outpost)" };
public static readonly Map TheGreatSnowballFightoftheGodsFightinginaWinterWonderland = new() { Id = 856, Name = "The Great Snowball Fight of the Gods Fighting in a Winter Wonderland", WikiUrl = "https://wiki.guildwars.com/wiki/The_Great_Snowball_Fight_of_the_Gods" };
public static readonly Map EmbarkBeach = new() { Id = 857, Name = "Embark Beach", WikiUrl = "https://wiki.guildwars.com/wiki/_Embark_Beach" };
public static readonly Map DragonsThroatareaWhatWaitsinShadow = new() { Id = 858, Name = "What Waits in Shadow", WikiUrl = "https://wiki.guildwars.com/wiki/What_Waits_in_Shadow" };
public static readonly Map KainengCenterWindsofChangeAChanceEncounter = new() { Id = 861, Name = "Winds of Change A Chance Encounter", WikiUrl = "https://wiki.guildwars.com/wiki/A_Chance_Encounter" };
public static readonly Map TheMarketplaceareaTrackingtheCorruption = new() { Id = 862, Name = "Tracking The Corruption", WikiUrl = "https://wiki.guildwars.com/wiki/Tracking_the_Corruption" };
@@ -697,7 +697,7 @@ public sealed class Map
public static readonly Map SeitungHarborareaDeadlyCargo = new() { Id = 865, Name = "Deadly Cargo", WikiUrl = "https://wiki.guildwars.com/wiki/Deadly_Cargo" };
public static readonly Map TahnnakaiTempleWindsofChangeTheRescueAttempt = new() { Id = 866, Name = "The Rescue Attempt", WikiUrl = "https://wiki.guildwars.com/wiki/The_Rescue_Attempt" };
public static readonly Map WajjunBazaarWindsofChangeViolenceintheStreets = new() { Id = 867, Name = "Violence in the Streets", WikiUrl = "https://wiki.guildwars.com/wiki/Violence_in_the_Streets" };
public static readonly Map ScarredPsycheMission = new() { Id = 868, Name = " Scarred Psyche Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Scarred_Psyche" };
public static readonly Map ScarredPsycheMission = new() { Id = 868, Name = "Scarred Psyche Mission", WikiUrl = "https://wiki.guildwars.com/wiki/Scarred_Psyche" };
public static readonly Map ShadowsPassageWindsofChangeCallingAllThugs = new() { Id = 869, Name = "Calling All Thugs", WikiUrl = "https://wiki.guildwars.com/wiki/Calling_All_Thugs" };
public static readonly Map AltrummRuinsFindingJinnai = new() { Id = 870, Name = "Finding Jinnai", WikiUrl = "https://wiki.guildwars.com/wiki/Finding_Jinnai" };
public static readonly Map ShingJeaMonasteryRaidonShingJeaMonastery = new() { Id = 871, Name = "Raid on Shing Jea Monastery", WikiUrl = "https://wiki.guildwars.com/wiki/Raid_on_Shing_Jea_Monastery" };
@@ -44,7 +44,7 @@ public sealed class ExperienceCalculator : IExperienceCalculator
var previousLevelExperience = 0U;
foreach (var threshold in ExperienceThreshold)
{
if (currentTotalExperience >= threshold)
if (threshold >= currentTotalExperience)
{
break;
}
@@ -96,6 +96,7 @@ public sealed class ExperienceCalculator : IExperienceCalculator
if (currentTotalExperience < ExperienceCalculationThreshold)
{
var totalXpForNextLevel = 0U;
var totalXpForPreviousLevel = 0U;
foreach (var threshold in ExperienceThreshold)
{
if (currentTotalExperience < threshold)
@@ -103,9 +104,11 @@ public sealed class ExperienceCalculator : IExperienceCalculator
totalXpForNextLevel = threshold;
break;
}
totalXpForPreviousLevel = threshold;
}
return totalXpForNextLevel;
return totalXpForNextLevel - totalXpForPreviousLevel;
}
else
{
@@ -99,7 +99,19 @@ public sealed class GuildwarsMemoryReader : IGuildwarsMemoryReader, IDisposable
{
var cancellationTokenSource = new CancellationTokenSource();
this.cancellationTokenSource = cancellationTokenSource;
System.Extensions.TaskExtensions.RunPeriodicAsync(() => this.ReadGameMemory(cancellationTokenSource.Token), TimeSpan.Zero, TimeSpan.FromSeconds(1), cancellationTokenSource.Token);
System.Extensions.TaskExtensions.RunPeriodicAsync(() => this.SafeReadGameMemory(cancellationTokenSource.Token), TimeSpan.Zero, TimeSpan.FromSeconds(1), cancellationTokenSource.Token);
}
private void SafeReadGameMemory(CancellationToken cancellationToken)
{
try
{
this.ReadGameMemory(cancellationToken);
}
catch(Exception e)
{
this.logger.LogError(e, "Exception encountered when reading game memory");
}
}
private void ReadGameMemory(CancellationToken cancellationToken)
@@ -131,8 +143,8 @@ public sealed class GuildwarsMemoryReader : IGuildwarsMemoryReader, IDisposable
var playerEntityId = this.memoryScanner.ReadPtrChain<int>(this.GetPlayerIdPointer(), 0x0, 0x0);
// The following lines would retrieve all entities, including item entities.
//var entityArray = this.memoryScanner.ReadPtrChain<GuildwarsArray>(this.GetEntityArrayPointer(), 0x0, 0x0);
//var entities = this.memoryScanner.ReadArray<EntityContext>(entityArray);
// var entityArray = this.memoryScanner.ReadPtrChain<GuildwarsArray>(this.GetEntityArrayPointer(), 0x0, 0x0);
// var entities = this.memoryScanner.ReadArray<EntityContext>(entityArray);
var email = ParseAndCleanWCharArray(userContext.PlayerEmailBytes);
var name = ParseAndCleanWCharArray(userContext.PlayerNameBytes);
+1 -1
View File
@@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:Daybreak.Controls"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<TextBlock HorizontalAlignment="Center" Text="Accounts settings" FontSize="22" Foreground="White"></TextBlock>
<controls:AddButton Foreground="White" Height="30" Width="30" Grid.Column="0" HorizontalAlignment="Right" Margin="5, 5, 45, 5"
Clicked="AddButton_Clicked" VerticalAlignment="Top"></controls:AddButton>
+1 -1
View File
@@ -9,7 +9,7 @@
mc:Ignorable="d"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
+1 -1
View File
@@ -8,7 +8,7 @@
mc:Ignorable="d"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
@@ -17,7 +17,7 @@
<BooleanToVisibilityConverter x:Key="BaseBooleanToVisibilityConverter"></BooleanToVisibilityConverter>
</UserControl.Resources>
<Grid
Background="#A0202020">
Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
@@ -174,7 +174,7 @@
</StackPanel>
</Grid>
<Grid Grid.RowSpan="3"
Background="#A0202020"
Background="#F0212121"
Visibility="{Binding ElementName=_this, Path=ShowLoading, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
<controls:CircularLoadingWidget MaxWidth="200"
MaxHeight="200"/>
+1 -1
View File
@@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:Daybreak.Controls"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<TextBlock HorizontalAlignment="Center" Text="Executables settings" FontSize="22" Foreground="White"></TextBlock>
<controls:AddButton Foreground="White" Height="30" Width="30" Grid.Column="0" HorizontalAlignment="Right" Margin="5, 5, 45, 5"
Clicked="AddButton_Clicked" VerticalAlignment="Top"></controls:AddButton>
+1 -1
View File
@@ -66,7 +66,7 @@
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
+212 -88
View File
@@ -7,6 +7,7 @@
xmlns:controls="clr-namespace:Daybreak.Controls"
xmlns:templates="clr-namespace:Daybreak.Controls.Templates"
mc:Ignorable="d"
Foreground="White"
Loaded="FocusView_Loaded"
Unloaded="FocusView_Unloaded"
x:Name="_this"
@@ -16,123 +17,247 @@
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*"></ColumnDefinition>
<ColumnDefinition Width="0.01*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="0.1*"></ColumnDefinition>
<ColumnDefinition Width="0.01*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"></RowDefinition>
<RowDefinition Height="0.6*"></RowDefinition>
<RowDefinition Height="0.2*"></RowDefinition>
<RowDefinition Height="0.1*"></RowDefinition>
<RowDefinition Height="0*"></RowDefinition>
<RowDefinition Height="1*"></RowDefinition>
<RowDefinition Height="118"></RowDefinition>
</Grid.RowDefinitions>
<controls:ResourceBar
<Grid
Margin="0, 2, 0, 0"
Grid.Column="1"
Grid.ColumnSpan="2"
Grid.Row="2"
Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="0.1*"></ColumnDefinition>
<ColumnDefinition Width="0.3*"></ColumnDefinition>
<ColumnDefinition Width="0.1*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<controls:VerticalResourceBar
Grid.Column="1"
Grid.ColumnSpan="2"
Grid.Row="2"
Height="30"
Grid.ColumnSpan="3"
CurrentResourceValue="{Binding ElementName=_this, Path=CurrentExperienceInLevel, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=NextLevelExperienceThreshold, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Center"
BarColor="#a026ff00"
Text="{Binding ElementName=_this,Path=ExperienceBarText, Mode=OneWay}"
BarColor="#6076FF03"
Foreground="White"
FontSize="22"
Height="113"
FontSize="14"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=ExperienceBarText, Mode=OneWay}"
MouseLeftButtonDown="ExperienceBar_MouseLeftButtonDown"></controls:ResourceBar>
<controls:ResourceBar
Grid.Column="1"
MouseLeftButtonDown="ExperienceBar_MouseLeftButtonDown">
<controls:VerticalResourceBar.OpacityMask>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry>
<PathGeometry.Figures>
<PathFigure IsClosed="True" StartPoint="5, 1">
<PathSegmentCollection>
<LineSegment Point="1, 5"></LineSegment>
<LineSegment Point="5, 9"></LineSegment>
<LineSegment Point="15, 9"></LineSegment>
<LineSegment Point="19, 5"></LineSegment>
<LineSegment Point="15, 1"></LineSegment>
</PathSegmentCollection>
</PathFigure>
</PathGeometry.Figures>
</PathGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</controls:VerticalResourceBar.OpacityMask>
</controls:VerticalResourceBar>
<StackPanel
Height="116"
VerticalAlignment="Center"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="2"
Margin="0, 0, 20, 80"
Height="30"
CurrentResourceValue="{Binding ElementName=_this, Path=GameData.User.CurrentKurzickPoints, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=GameData.User.TotalKurzickPoints, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#a00b00ff"
Foreground="White"
FontSize="22"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=KurzickBarText, Mode=OneWay}"
MouseLeftButtonDown="KurzickBar_MouseLeftButtonDown"></controls:ResourceBar>
<controls:ResourceBar
Grid.Column="1"
Grid.RowSpan="2">
<StackPanel.OpacityMask>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry>
<PathGeometry.Figures>
<PathFigure IsClosed="True" StartPoint="1, 1">
<PathSegmentCollection>
<LineSegment Point="1, 9"></LineSegment>
<LineSegment Point="21, 9"></LineSegment>
<LineSegment Point="19, 5"></LineSegment>
<LineSegment Point="21, 1"></LineSegment>
</PathSegmentCollection>
</PathFigure>
</PathGeometry.Figures>
</PathGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</StackPanel.OpacityMask>
<controls:HorizontalResourceBar
Margin="0, 2, 0, 2"
Height="25"
CurrentResourceValue="{Binding ElementName=_this, Path=CurrentKurzick, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=TotalKurzick, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#603D5AFE"
Foreground="White"
FontSize="14"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=KurzickBarText, Mode=OneWay}"
MouseLeftButtonDown="KurzickBar_MouseLeftButtonDown"></controls:HorizontalResourceBar>
<controls:HorizontalResourceBar
Margin="0, 2, 0, 2"
Height="25"
CurrentResourceValue="{Binding ElementName=_this, Path=CurrentLuxon, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=TotalLuxon, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#60FF9100"
Foreground="White"
FontSize="14"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=LuxonBarText, Mode=OneWay}"
MouseLeftButtonDown="LuxonBar_MouseLeftButtonDown"></controls:HorizontalResourceBar>
<controls:HorizontalResourceBar
Margin="0, 2, 0, 2"
Height="25"
CurrentResourceValue="{Binding ElementName=_this, Path=CurrentImperial, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=TotalImperial, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#60651FFF"
Foreground="White"
FontSize="14"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=ImperialBarText, Mode=OneWay}"
MouseLeftButtonDown="ImperialBar_MouseLeftButtonDown"></controls:HorizontalResourceBar>
<controls:HorizontalResourceBar
Margin="0, 2, 0, 2"
Height="25"
CurrentResourceValue="{Binding ElementName=_this, Path=CurrentBalthazar, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=TotalBalthazar, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#60FFEA00"
Foreground="White"
FontSize="14"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=BalthazarBarText, Mode=OneWay}"
MouseLeftButtonDown="BalthazarBar_MouseLeftButtonDown"></controls:HorizontalResourceBar>
</StackPanel>
<StackPanel
Height="116"
VerticalAlignment="Center"
Grid.Column="3"
Grid.ColumnSpan="2"
Grid.Row="2"
Margin="0, 0, 20, 40"
Height="30"
CurrentResourceValue="{Binding ElementName=_this, Path=GameData.User.CurrentLuxonPoints, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=GameData.User.TotalLuxonPoints, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#a0ff3400"
Foreground="White"
FontSize="22"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=LuxonBarText, Mode=OneWay}"
MouseLeftButtonDown="LuxonBar_MouseLeftButtonDown"></controls:ResourceBar>
<controls:ResourceBar
Grid.Column="2"
Grid.Row="2"
Margin="20, 0, 0, 80"
Height="30"
CurrentResourceValue="{Binding ElementName=_this, Path=GameData.User.CurrentImperialPoints, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=GameData.User.TotalImperialPoints, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#a0a800ff"
Foreground="White"
FontSize="22"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=ImperialBarText, Mode=OneWay}"
MouseLeftButtonDown="ImperialBar_MouseLeftButtonDown"></controls:ResourceBar>
<controls:ResourceBar
Grid.Column="2"
Grid.Row="2"
Margin="20, 0, 0, 40"
Height="30"
CurrentResourceValue="{Binding ElementName=_this, Path=GameData.User.CurrentBalthazarPoints, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=GameData.User.TotalBalthazarPoints, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#a0ffb200"
Foreground="White"
FontSize="22"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=BalthazarBarText, Mode=OneWay}"
MouseLeftButtonDown="BalthazarBar_MouseLeftButtonDown"></controls:ResourceBar>
Grid.RowSpan="2"
Visibility="{Binding ElementName=_this, Path=Vanquishing, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel.OpacityMask>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry>
<PathGeometry.Figures>
<PathFigure IsClosed="True" StartPoint="1, 1">
<PathSegmentCollection>
<LineSegment Point="3, 5"></LineSegment>
<LineSegment Point="1, 9"></LineSegment>
<LineSegment Point="21, 9"></LineSegment>
<LineSegment Point="21, 1"></LineSegment>
</PathSegmentCollection>
</PathFigure>
</PathGeometry.Figures>
</PathGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</StackPanel.OpacityMask>
<controls:HorizontalResourceBar
Margin="0, 3, 0, 3"
Height="53"
CurrentResourceValue="{Binding ElementName=_this, Path=FoesKilled, Mode=OneWay}"
MaxResourceValue="{Binding ElementName=_this, Path=TotalFoes, Mode=OneWay}"
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
BarColor="#60D50000"
Foreground="White"
FontSize="14"
Cursor="Hand"
Text="{Binding ElementName=_this, Path=VanquishingText, Mode=OneWay}"
FillAlignment="Right"
MouseLeftButtonDown="VanquishingBar_MouseLeftButtonDown"></controls:HorizontalResourceBar>
<!--The following rectangle is a placeholder so that masking will work properly. Will replace it later with something more useful-->
<Rectangle Height="53"
Margin="0, 3, 0, 3"
HorizontalAlignment="Stretch"
Fill="Transparent"></Rectangle>
</StackPanel>
</Grid>
<Grid
Grid.Row="1"
Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel
Background="#F0212121"
Grid.Row="0"
Margin="0, 0, 10, 0">
Margin="0, 0, 5, 0">
<TextBlock
FontSize="18"
Margin="5"
Margin="10"
Text="Current Quest"></TextBlock>
<TextBlock
Text="{Binding ElementName=_this, Path=GameData.MainPlayer.Quest.Name, Mode=OneWay}"
Cursor="Hand"
FontSize="20"
MouseLeftButtonDown="CurrentQuest_MouseLeftButtonDown"></TextBlock>
<Rectangle
Height="1"
Fill="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}"></Rectangle>
<TextBlock
FontSize="18"
Margin="5"
Text="Quest Log"></TextBlock>
<controls:OpaqueButton
Text="{Binding ElementName=_this, Path=GameData.MainPlayer.Quest.Name, Mode=OneWay}"
Highlight="White"
HighlightOpacity="0.6"
HorizontalAlignment="Stretch"
TextHorizontalAlignment="Left"
Cursor="Hand"
FontSize="20"
MouseLeftButtonDown="CurrentQuest_MouseLeftButtonDown"></controls:OpaqueButton>
</StackPanel>
<TextBlock
Background="#F0212121"
Grid.Row="2"
FontSize="18"
Margin="0, 0, 5, 0"
Padding="10"
Text="Quest Log"></TextBlock>
<ScrollViewer
Background="#F0212121"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
Grid.Row="1">
Grid.Row="3"
Margin="0, 0, 5, 0">
<templates:QuestLogTemplate
Foreground="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}"
Quests="{Binding ElementName=_this,Path=GameData.MainPlayer.QuestLog, Mode=OneWay}"
@@ -141,12 +266,11 @@
</templates:QuestLogTemplate>
</ScrollViewer>
</Grid>
<controls:ChromiumBrowserWrapper
x:Name="Browser"
Grid.Column="2"
Grid.Row="1"
Margin="10, 0, 0, 0"
Margin="5, 0, 0, 0"
ControlsEnabled="True"
AddressBarReadonly="False"
CanNavigate="True"
+77 -10
View File
@@ -38,7 +38,22 @@ public partial class FocusView : UserControl
private double nextLevelExperienceThreshold;
[GenerateDependencyProperty]
private string experienceBarText = string.Empty;
[GenerateDependencyProperty]
private double currentKurzick;
[GenerateDependencyProperty]
private double totalKurzick;
[GenerateDependencyProperty]
private double currentLuxon;
[GenerateDependencyProperty]
private double totalLuxon;
[GenerateDependencyProperty]
private double currentImperial;
[GenerateDependencyProperty]
private double totalImperial;
[GenerateDependencyProperty]
private double currentBalthazar;
[GenerateDependencyProperty]
private double totalBalthazar;
[GenerateDependencyProperty]
private string luxonBarText = string.Empty;
[GenerateDependencyProperty]
@@ -48,6 +63,15 @@ public partial class FocusView : UserControl
[GenerateDependencyProperty]
private string balthazarBarText = string.Empty;
[GenerateDependencyProperty]
private bool vanquishing;
[GenerateDependencyProperty]
private double foesKilled;
[GenerateDependencyProperty]
private double totalFoes;
[GenerateDependencyProperty]
private string vanquishingText = string.Empty;
[GenerateDependencyProperty]
private string browserAddress = string.Empty;
@@ -104,18 +128,32 @@ public partial class FocusView : UserControl
this.Dispatcher.Invoke(() =>
{
this.GameData = this.guildwarsMemoryReader.GameData;
if (this.GameData?.MainPlayer is null)
if (this.GameData?.MainPlayer is null ||
this.GameData?.User is null ||
this.GameData?.Session is null)
{
return;
}
this.CurrentExperienceInLevel = this.experienceCalculator.GetExperienceForCurrentLevel(this.GameData.MainPlayer!.Experience);
this.NextLevelExperienceThreshold = this.experienceCalculator.GetNextExperienceThreshold(this.GameData.MainPlayer!.Experience);
this.CurrentLuxon = (double)this.GameData.User.CurrentLuxonPoints;
this.CurrentKurzick = (double)this.GameData.User.CurrentKurzickPoints;
this.CurrentImperial = (double)this.GameData.User.CurrentImperialPoints;
this.CurrentBalthazar = (double)this.GameData.User.CurrentBalthazarPoints;
this.TotalLuxon = (double)this.GameData.User.MaxLuxonPoints;
this.TotalKurzick = (double)this.GameData.User.MaxKurzickPoints;
this.TotalImperial = (double)this.GameData.User.MaxImperialPoints;
this.TotalBalthazar = (double)this.GameData.User.MaxBalthazarPoints;
this.FoesKilled = (double)this.GameData.Session.FoesKilled;
this.TotalFoes = (double)this.GameData.Session.FoesKilled + (double)this.GameData.Session.FoesToKill;
this.Vanquishing = this.GameData.Session.FoesToKill + this.GameData.Session.FoesKilled > 0U;
this.UpdateExperienceText();
this.UpdateLuxonText();
this.UpdateKurzickText();
this.UpdateImperialText();
this.UpdateBalthazarText();
this.UpdateVanquishingText();
},
System.Windows.Threading.DispatcherPriority.ApplicationIdle);
}
@@ -146,10 +184,10 @@ public partial class FocusView : UserControl
switch (this.liveUpdateableOptions.Value.FocusViewOptions.LuxonPointsDisplay)
{
case Configuration.FocusView.PointsDisplay.CurrentAndMax:
this.LuxonBarText = $"{this.GameData.User!.CurrentLuxonPoints} / {this.GameData.User!.MaxLuxonPoints} Luxon Points";
this.LuxonBarText = $"{this.CurrentLuxon} / {this.TotalLuxon} Luxon Points";
break;
case Configuration.FocusView.PointsDisplay.Remaining:
this.LuxonBarText = $"Remaining {this.GameData.User!.MaxLuxonPoints - this.GameData.User!.CurrentLuxonPoints} Luxon Points";
this.LuxonBarText = $"Remaining {this.TotalLuxon - this.CurrentLuxon} Luxon Points";
break;
}
}
@@ -159,10 +197,10 @@ public partial class FocusView : UserControl
switch (this.liveUpdateableOptions.Value.FocusViewOptions.KurzickPointsDisplay)
{
case Configuration.FocusView.PointsDisplay.CurrentAndMax:
this.KurzickBarText = $"{this.GameData.User!.CurrentKurzickPoints} / {this.GameData.User!.MaxKurzickPoints} Kurzick Points";
this.KurzickBarText = $"{this.CurrentKurzick} / {this.TotalKurzick} Kurzick Points";
break;
case Configuration.FocusView.PointsDisplay.Remaining:
this.KurzickBarText = $"Remaining {this.GameData.User!.MaxKurzickPoints - this.GameData.User!.CurrentKurzickPoints} Kurzick Points";
this.KurzickBarText = $"Remaining {this.TotalKurzick - this.CurrentKurzick} Kurzick Points";
break;
}
}
@@ -172,10 +210,10 @@ public partial class FocusView : UserControl
switch (this.liveUpdateableOptions.Value.FocusViewOptions.ImperialPointsDisplay)
{
case Configuration.FocusView.PointsDisplay.CurrentAndMax:
this.ImperialBarText = $"{this.GameData.User!.CurrentImperialPoints} / {this.GameData.User!.MaxImperialPoints} Imperial Points";
this.ImperialBarText = $"{this.CurrentImperial} / {this.TotalImperial} Imperial Points";
break;
case Configuration.FocusView.PointsDisplay.Remaining:
this.ImperialBarText = $"Remaining {this.GameData.User!.MaxImperialPoints - this.GameData.User!.CurrentImperialPoints} Imperial Points";
this.ImperialBarText = $"Remaining {this.TotalImperial - this.CurrentImperial} Imperial Points";
break;
}
}
@@ -185,10 +223,23 @@ public partial class FocusView : UserControl
switch (this.liveUpdateableOptions.Value.FocusViewOptions.BalthazarPointsDisplay)
{
case Configuration.FocusView.PointsDisplay.CurrentAndMax:
this.BalthazarBarText = $"{this.GameData.User!.CurrentBalthazarPoints} / {this.GameData.User!.MaxBalthazarPoints} Balthazar Points";
this.BalthazarBarText = $"{this.CurrentBalthazar} / {this.TotalBalthazar} Balthazar Points";
break;
case Configuration.FocusView.PointsDisplay.Remaining:
this.BalthazarBarText = $"Remaining {this.GameData.User!.MaxBalthazarPoints - this.GameData.User!.CurrentBalthazarPoints} Balthazar Points";
this.BalthazarBarText = $"Remaining {this.TotalBalthazar - this.CurrentBalthazar} Balthazar Points";
break;
}
}
private void UpdateVanquishingText()
{
switch (this.liveUpdateableOptions.Value.FocusViewOptions.VanquishingDisplay)
{
case Configuration.FocusView.PointsDisplay.CurrentAndMax:
this.VanquishingText = $"{this.FoesKilled} / {this.TotalFoes} Killed";
break;
case Configuration.FocusView.PointsDisplay.Remaining:
this.VanquishingText = $"Remaining {this.TotalFoes - this.FoesKilled} Foes";
break;
}
}
@@ -301,6 +352,22 @@ public partial class FocusView : UserControl
this.UpdateBalthazarText();
}
private void VanquishingBar_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
switch (this.liveUpdateableOptions.Value.FocusViewOptions.VanquishingDisplay)
{
case Configuration.FocusView.PointsDisplay.CurrentAndMax:
this.liveUpdateableOptions.Value.FocusViewOptions.VanquishingDisplay = Configuration.FocusView.PointsDisplay.Remaining;
break;
case Configuration.FocusView.PointsDisplay.Remaining:
this.liveUpdateableOptions.Value.FocusViewOptions.VanquishingDisplay = Configuration.FocusView.PointsDisplay.CurrentAndMax;
break;
}
this.liveUpdateableOptions.UpdateOption();
this.UpdateVanquishingText();
}
private void CurrentQuest_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (this.GameData.MainPlayer?.Quest?.WikiUrl is string url)
+1 -1
View File
@@ -10,7 +10,7 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid
Background="#A0202020">
Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
+6 -3
View File
@@ -24,20 +24,23 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<controls:OpaqueButton Text="Launch game" Highlight="White" TransparentBackground="Black" HighlightOpacity="0.3" BackgroundOpacity="0.2"
<controls:OpaqueButton Text="Launch game" Highlight="White" TransparentBackground="#F0212121" HighlightOpacity="0.3" BackgroundOpacity="1"
Foreground="White" FontSize="36" Width="250" Height="60" VerticalAlignment="Bottom"
IsEnabled="{Binding ElementName=_this, Path=LaunchButtonEnabled, Mode=OneWay}"
Clicked="LaunchButton_Clicked" Grid.Row="0" Grid.ColumnSpan="3"
Cursor="Hand"
Visibility="{Binding ElementName=_this, Path=ButtonsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibility}}"></controls:OpaqueButton>
<controls:OpaqueButton Text="Launch toolbox" Highlight="White" TransparentBackground="Black" HighlightOpacity="0.3" BackgroundOpacity="0.2"
<controls:OpaqueButton Text="Launch toolbox" Highlight="White" TransparentBackground="#F0212121" HighlightOpacity="0.3" BackgroundOpacity="1"
Foreground="White" FontSize="24" Width="200" Height="40" Margin="0, 10, 0, 10"
IsEnabled="{Binding ElementName=_this, Path=LaunchToolboxButtonEnabled, Mode=OneWay}"
Clicked="LaunchToolboxButton_Clicked" Grid.Row="1" Grid.ColumnSpan="2"
Cursor="Hand"
Visibility="{Binding ElementName=_this, Path=ButtonsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibility}}"></controls:OpaqueButton>
<controls:OpaqueButton Text="Launch texmod" Highlight="White" TransparentBackground="Black" HighlightOpacity="0.3" BackgroundOpacity="0.2"
<controls:OpaqueButton Text="Launch texmod" Highlight="White" TransparentBackground="#F0212121" HighlightOpacity="0.3" BackgroundOpacity="1"
Foreground="White" FontSize="24" Width="200" Height="40" Margin="0, 10, 0, 10"
IsEnabled="{Binding ElementName=_this, Path=LaunchTexmodButtonEnabled, Mode=OneWay}"
Clicked="LaunchTexmodButton_Clicked" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1"
Cursor="Hand"
Visibility="{Binding ElementName=_this, Path=ButtonsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibility}}"></controls:OpaqueButton>
<Grid Grid.Column="2" Margin="10" Visibility="{Binding ElementName=_this, Path=BrowsersEnabled, Mode=OneWay, Converter={StaticResource BooleanToVisibility}}">
<controls:ChromiumBrowserWrapper x:Name="RightWebBrowser"
+1 -1
View File
@@ -13,7 +13,7 @@
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
</UserControl.Resources>
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
+1 -1
View File
@@ -8,7 +8,7 @@
mc:Ignorable="d"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
+1 -1
View File
@@ -67,7 +67,7 @@
</ResourceDictionary>
</UserControl.Resources>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
+1 -1
View File
@@ -8,7 +8,7 @@
mc:Ignorable="d"
x:Name="_this"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="#A0202020">
<Grid Background="#F0212121">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>