-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'storage-chest-overview'
- Loading branch information
Showing
54 changed files
with
1,310 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace StatisticsAnalysisTool.Enumerations; | ||
|
||
public enum VaultLocation | ||
{ | ||
Unknown = 0, | ||
BankOfThetford = 0006, | ||
BankOfLymhurst = 1001, | ||
ForestCross = 1006, | ||
SteppeCross = 2002, | ||
BankOfBridgewatch = 2003, | ||
HighlandCross = 3002, | ||
BankOfCaerleon = 3006, | ||
BankOfMartlock = 3007, | ||
BankOfFortSterling = 4001, | ||
MountainCross = 4006, | ||
ArthursRest = 4300, | ||
MerlynsRest = -2, | ||
MorganasRest = -3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
src/StatisticsAnalysisTool/Models/BindingModel/VaultBindings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
using System; | ||
using StatisticsAnalysisTool.Models.NetworkModel; | ||
using StatisticsAnalysisTool.Properties; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; | ||
using System.Windows; | ||
|
||
namespace StatisticsAnalysisTool.Models.BindingModel; | ||
|
||
public class VaultBindings : INotifyPropertyChanged | ||
{ | ||
private List<ContainerItem> _vaultContainerContent; | ||
private List<Vault> _vaults; | ||
private Vault _vaultSelected; | ||
private List<VaultContainer> _vaultContainer; | ||
private VaultContainer _vaultContainerSelected; | ||
private Visibility _lastUpdateVisibility = Visibility.Hidden; | ||
private DateTime _lastUpdate; | ||
|
||
public List<Vault> Vaults | ||
{ | ||
get => _vaults; | ||
set | ||
{ | ||
_vaults = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public Vault VaultSelected | ||
{ | ||
get => _vaultSelected; | ||
set | ||
{ | ||
_vaultSelected = value; | ||
VaultContainer = _vaultSelected.VaultContainer.FindAll(x => x.LastUpdate.Ticks > 0).OrderBy(y => y.Name).ToList(); | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public List<VaultContainer> VaultContainer | ||
{ | ||
get => _vaultContainer; | ||
set | ||
{ | ||
_vaultContainer = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public VaultContainer VaultContainerSelected | ||
{ | ||
get => _vaultContainerSelected; | ||
set | ||
{ | ||
_vaultContainerSelected = value; | ||
VaultContainerContent = _vaultContainer?.FirstOrDefault(x => x.Guid == _vaultContainerSelected.Guid)?.Items ?? new List<ContainerItem>(); | ||
LastUpdate = _vaultContainerSelected?.LastUpdate ?? new DateTime(0); | ||
LastUpdateVisibility = _vaultContainerSelected?.LastUpdate.Ticks <= 1 ? Visibility.Hidden : Visibility.Visible; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public List<ContainerItem> VaultContainerContent | ||
{ | ||
get => _vaultContainerContent; | ||
set | ||
{ | ||
_vaultContainerContent = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public Visibility LastUpdateVisibility | ||
{ | ||
get => _lastUpdateVisibility; | ||
set | ||
{ | ||
_lastUpdateVisibility = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public DateTime LastUpdate | ||
{ | ||
get => _lastUpdate; | ||
set | ||
{ | ||
_lastUpdate = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
[NotifyPropertyChangedInvocator] | ||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) | ||
{ | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/StatisticsAnalysisTool/Models/NetworkModel/ContainerItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
using StatisticsAnalysisTool.Common; | ||
|
||
namespace StatisticsAnalysisTool.Models.NetworkModel; | ||
|
||
public class ContainerItem | ||
{ | ||
public int ItemIndex { get; set; } | ||
[JsonIgnore] | ||
public Item Item => ItemController.GetItemByIndex(ItemIndex); | ||
public int Quantity { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/StatisticsAnalysisTool/Models/NetworkModel/ItemContainerObject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace StatisticsAnalysisTool.Models.NetworkModel; | ||
|
||
public class ItemContainerObject | ||
{ | ||
public ItemContainerObject(long? objectId, Guid containerGuid, List<int> slotItemId) | ||
{ | ||
ObjectId = objectId; | ||
ContainerGuid = containerGuid; | ||
SlotItemId = slotItemId; | ||
|
||
LastUpdate = DateTime.UtcNow; | ||
} | ||
|
||
public DateTime LastUpdate { get; } | ||
public long? ObjectId { get; set; } | ||
public Guid ContainerGuid { get; set; } | ||
public List<int> SlotItemId { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using StatisticsAnalysisTool.Enumerations; | ||
using StatisticsAnalysisTool.GameData; | ||
using StatisticsAnalysisTool.Network.Manager; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace StatisticsAnalysisTool.Models.NetworkModel; | ||
|
||
public class Vault | ||
{ | ||
public string Location { get; set; } | ||
[JsonIgnore] | ||
public VaultLocation VaultLocation => VaultController.GetVaultLocation(Location); | ||
[JsonIgnore] | ||
public string LocationName => WorldData.GetUniqueNameOrDefault(VaultController.GetVaultLocationIndex(Location)); | ||
public List<VaultContainer> VaultContainer { get; set; } = new(); | ||
} |
13 changes: 13 additions & 0 deletions
13
src/StatisticsAnalysisTool/Models/NetworkModel/VaultContainer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace StatisticsAnalysisTool.Models.NetworkModel; | ||
|
||
public class VaultContainer | ||
{ | ||
public DateTime LastUpdate { get; set; } | ||
public Guid Guid { get; set; } | ||
public string Name { get; set; } | ||
public string Icon { get; set; } | ||
public List<ContainerItem> Items { get; set; } = new (); | ||
} |
Oops, something went wrong.