Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Triky313 committed Aug 12, 2024
2 parents 018f831 + 51d6a25 commit 16f0044
Showing 34 changed files with 539 additions and 187 deletions.
Binary file modified src/StatisticsAnalysisTool/Assets/preparation_folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/StatisticsAnalysisTool/Cluster/ClusterController.cs
Original file line number Diff line number Diff line change
@@ -72,8 +72,8 @@ public void SetAndResetValues(ClusterInfo currentCluster)
_trackingController.CombatController.ResetDamageMeterByClusterChange();
_trackingController.StatisticController.SetKillsDeathsValues();
_trackingController.VaultController.ResetDiscoveredItems();
_trackingController.VaultController.ResetVaultContainer();
_trackingController.VaultController.ResetCurrentVaultInfo();
_trackingController.VaultController.ResetInternalVaultContainer();
_trackingController.VaultController.ResetCurrentInternalVault();
_trackingController.TreasureController.RemoveTemporaryTreasures();
_trackingController.TreasureController.UpdateLootedChestsDashboardUi();
_trackingController.LootController.ResetLocalPlayerDiscoveredLoot();
52 changes: 52 additions & 0 deletions src/StatisticsAnalysisTool/Localization/localization.json
Original file line number Diff line number Diff line change
@@ -37274,6 +37274,58 @@
"seg": "Average est. Market value"
}
]
},
{
"tuid": "STANDALONE_LAUNCHER",
"tuv": [
{
"lang": "de-DE",
"seg": "Eigenständiger Launcher"
},
{
"lang": "en-US",
"seg": "Standalone Launcher"
}
]
},
{
"tuid": "STANDALONE_LAUNCHER_MESSAGE",
"tuv": [
{
"lang": "de-DE",
"seg": "Wähle den AlbionOnline Ordner aus, wo du ihn installiert hast. Zum Beispiel unter 'C:\\AlbionOnline'"
},
{
"lang": "en-US",
"seg": "Select the AlbionOnline folder where you installed it. For example, under 'C:\\AlbionOnline'"
}
]
},
{
"tuid": "STEAM_LAUNCHER",
"tuv": [
{
"lang": "de-DE",
"seg": "Steam Launcher"
},
{
"lang": "en-US",
"seg": "Steam Launcher"
}
]
},
{
"tuid": "STEAM_LAUNCHER_MESSAGE",
"tuv": [
{
"lang": "de-DE",
"seg": "Wähle den AlbionOnline Ordner in den steamapps aus. Meistens zu finden unter 'C:\\Program Files\\Steam\\steamapps\\common'"
},
{
"lang": "en-US",
"seg": "Select the AlbionOnline folder in the steamapps. Usually found under 'C:\\Program Files\\Steam\\steamapps\\common'"
}
]
}
]
}
14 changes: 0 additions & 14 deletions src/StatisticsAnalysisTool/Models/NetworkModel/ContainerItem.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -20,4 +20,5 @@ public ItemContainerObject(long? objectId, Guid privateContainerGuid, Guid conta
public Guid PrivateContainerGuid { get; set; }
public Guid ContainerGuid { get; set; }
public List<long> SlotItemIds { get; set; }
public double RepairCosts { get; set; }
}
36 changes: 0 additions & 36 deletions src/StatisticsAnalysisTool/Models/NetworkModel/Vault.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using StatisticsAnalysisTool.Network.Events;
using StatisticsAnalysisTool.Network.Manager;
using StatisticsAnalysisTool.StorageHistory;
using System.Threading.Tasks;
using StatisticsAnalysisTool.Models.NetworkModel;

namespace StatisticsAnalysisTool.Network.Handler;

@@ -18,7 +18,7 @@ protected override async Task OnActionAsync(BankVaultInfoEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.SetCurrentVault(new VaultInfo(value.ObjectId, value.LocationGuidString, value.VaultGuidList, value.VaultNames, value.IconTags));
_trackingController.VaultController.SetCurrentVault(new InternalVault(value.ObjectId, value.LocationGuidString, value.VaultGuidList, value.VaultNames, value.IconTags));
}

await Task.CompletedTask;
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ protected override async Task OnActionAsync(NewEquipmentItemEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.Add(value.Item);
_trackingController.VaultController.AddDiscoveredItem(value.Item);
}

_trackingController.EntityController.AddEquipmentItem(new EquipmentItemInternal
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ protected override async Task OnActionAsync(NewFurnitureItemEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.Add(value.Item);
_trackingController.VaultController.AddDiscoveredItem(value.Item);
}

EstimatedMarketValueController.Add(value.Item.ItemIndex, value.Item.EstimatedMarketValueInternal, value.Item.Quality);
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ protected override async Task OnActionAsync(NewJournalItemEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.Add(value.Item);
_trackingController.VaultController.AddDiscoveredItem(value.Item);
}

EstimatedMarketValueController.Add(value.Item.ItemIndex, value.Item.EstimatedMarketValueInternal, value.Item.Quality);
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ protected override async Task OnActionAsync(NewKillTrophyItemEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.Add(value.Item);
_trackingController.VaultController.AddDiscoveredItem(value.Item);
}

EstimatedMarketValueController.Add(value.Item.ItemIndex, value.Item.EstimatedMarketValueInternal, value.Item.Quality);
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ protected override async Task OnActionAsync(NewLaborerItemEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.Add(value.Item);
_trackingController.VaultController.AddDiscoveredItem(value.Item);
}

EstimatedMarketValueController.Add(value.Item.ItemIndex, value.Item.EstimatedMarketValueInternal, value.Item.Quality);
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ protected override async Task OnActionAsync(NewSimpleItemEvent value)
{
if (_trackingController.IsTrackingAllowedByMainCharacter())
{
_trackingController.VaultController.Add(value.Item);
_trackingController.VaultController.AddDiscoveredItem(value.Item);
}

EstimatedMarketValueController.Add(value.Item.ItemIndex, value.Item.EstimatedMarketValueInternal, value.Item.Quality);
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
using StatisticsAnalysisTool.Localization;
using StatisticsAnalysisTool.Network.PacketProviders;
using StatisticsAnalysisTool.Party;
using StatisticsAnalysisTool.StorageHistory;
using StatisticsAnalysisTool.Trade;
using StatisticsAnalysisTool.Trade.Mails;
using StatisticsAnalysisTool.Trade.Market;
4 changes: 2 additions & 2 deletions src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -53,5 +53,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.7.1.*")]
[assembly: AssemblyFileVersion("7.7.1.0")]
[assembly: AssemblyVersion("7.7.2.*")]
[assembly: AssemblyFileVersion("7.7.2.0")]
4 changes: 4 additions & 0 deletions src/StatisticsAnalysisTool/StatisticsAnalysisTool.csproj
Original file line number Diff line number Diff line change
@@ -293,6 +293,9 @@
<Resource Include="Assets\preparation_folder.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Assets\preparation_folder_steam.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Assets\purple_glow.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
@@ -690,6 +693,7 @@
<None Remove="Assets\pickaxe_premium.png" />
<None Remove="Assets\pickaxe_repeat.png" />
<None Remove="Assets\preparation_folder.png" />
<None Remove="Assets\preparation_folder_steam.png" />
<None Remove="Assets\purple_glow.png" />
<None Remove="Assets\repair_cross.png" />
<None Remove="Assets\sat-icon.png" />
32 changes: 32 additions & 0 deletions src/StatisticsAnalysisTool/StorageHistory/ContainerItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Models;
using StatisticsAnalysisTool.ViewModels;

namespace StatisticsAnalysisTool.StorageHistory;

public class ContainerItem : BaseViewModel
{
private int _itemIndex;
private int _quantity;

public int ItemIndex
{
get => _itemIndex;
set
{
_itemIndex = value;
OnPropertyChanged();
}
}

public int Quantity
{
get => _quantity;
set
{
_quantity = value;
OnPropertyChanged();
}
}
public Item Item => ItemController.GetItemByIndex(ItemIndex);
}
11 changes: 11 additions & 0 deletions src/StatisticsAnalysisTool/StorageHistory/ContainerItemDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Text.Json.Serialization;

namespace StatisticsAnalysisTool.StorageHistory;

public class ContainerItemDto
{
[JsonPropertyName("I")]
public int ItemIndex { get; set; }
[JsonPropertyName("Q")]
public int Quantity { get; set; }
}
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@
using System;
using System.Collections.Generic;

namespace StatisticsAnalysisTool.Models.NetworkModel;
namespace StatisticsAnalysisTool.StorageHistory;

public class VaultInfo
public class InternalVault
{
public VaultInfo(long? objectId, string locationGuidString, List<Guid> containerGuidList, List<string> containerNames, List<string> containerIconTags)
public InternalVault(long? objectId, string locationGuidString, List<Guid> containerGuidList, List<string> containerNames, List<string> containerIconTags)
{
ObjectId = objectId;
LocationGuidString = locationGuidString;
@@ -24,4 +24,5 @@ public VaultInfo(long? objectId, string locationGuidString, List<Guid> container
public MapType MapType => WorldData.GetMapType(LocationGuidString);
public string MainLocationIndex { get; set; }
public string UniqueClusterName { get; set; }
public double RepairCosts { get; set; }
}
71 changes: 71 additions & 0 deletions src/StatisticsAnalysisTool/StorageHistory/StorageHistoryMapping.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System.Collections.ObjectModel;
using System.Linq;

namespace StatisticsAnalysisTool.StorageHistory;

public static class StorageHistoryMapping
{
public static VaultDto Mapping(Vault vault)
{
return new VaultDto()
{
Location = vault.Location,
MainLocationIndex = vault.MainLocationIndex,
MapType = vault.MapType,
VaultContainer = vault.VaultContainer.Select(Mapping).ToList()
};
}

public static Vault Mapping(VaultDto vaultDto)
{
return new Vault()
{
Location = vaultDto.Location,
MainLocationIndex = vaultDto.MainLocationIndex,
MapType = vaultDto.MapType,
VaultContainer = vaultDto.VaultContainer.Select(Mapping).ToList()
};
}

public static VaultContainerDto Mapping(VaultContainer vaultContainer)
{
return new VaultContainerDto()
{
LastUpdate = vaultContainer.LastUpdate,
Guid = vaultContainer.Guid,
Name = vaultContainer.Name,
Icon = vaultContainer.Icon,
Items = vaultContainer.Items.Select(Mapping).ToList()
};
}

public static VaultContainer Mapping(VaultContainerDto vaultContainerDto)
{
return new VaultContainer()
{
LastUpdate = vaultContainerDto.LastUpdate,
Guid = vaultContainerDto.Guid,
Name = vaultContainerDto.Name,
Icon = vaultContainerDto.Icon,
Items = new ObservableCollection<ContainerItem>(vaultContainerDto.Items.Select(Mapping))
};
}

public static ContainerItemDto Mapping(ContainerItem containerItem)
{
return new ContainerItemDto()
{
ItemIndex = containerItem.ItemIndex,
Quantity = containerItem.Quantity
};
}

public static ContainerItem Mapping(ContainerItemDto containerItemDto)
{
return new ContainerItem()
{
ItemIndex = containerItemDto.ItemIndex,
Quantity = containerItemDto.Quantity
};
}
}
Loading

0 comments on commit 16f0044

Please sign in to comment.