Skip to content

Commit

Permalink
updated ESI.net
Browse files Browse the repository at this point in the history
  • Loading branch information
BitBaboonSteve committed Sep 17, 2023
1 parent ab2331d commit b3978ee
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions EVEData/EVEData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<ItemGroup>
<PackageReference Include="DecimalMath.DecimalEx" Version="1.0.2" />
<PackageReference Include="ESI.NET" Version="2023.4.15" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.48" />
<PackageReference Include="ESI.NET" Version="2023.7.15" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.53" />
</ItemGroup>
<ItemGroup>
<None Update="data\JumpRangeCache.dat">
Expand Down
42 changes: 21 additions & 21 deletions EVEData/EveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public EveManager(string version)
Directory.CreateDirectory(characterSaveFolder);
}

CharacterIDToName = new SerializableDictionary<long, string>();
AllianceIDToName = new SerializableDictionary<long, string>();
AllianceIDToTicker = new SerializableDictionary<long, string>();
CharacterIDToName = new SerializableDictionary<int, string>();
AllianceIDToName = new SerializableDictionary<int, string>();
AllianceIDToTicker = new SerializableDictionary<int, string>();
NameToSystem = new Dictionary<string, System>();
IDToSystem = new Dictionary<long, System>();

Expand Down Expand Up @@ -217,12 +217,12 @@ public static EveManager Instance
/// <summary>
/// Gets or sets the Alliance ID to Name dictionary
/// </summary>
public SerializableDictionary<long, string> AllianceIDToName { get; set; }
public SerializableDictionary<int, string> AllianceIDToName { get; set; }

/// <summary>
/// Gets or sets the Alliance ID to Alliance Ticker dictionary
/// </summary>
public SerializableDictionary<long, string> AllianceIDToTicker { get; set; }
public SerializableDictionary<int, string> AllianceIDToTicker { get; set; }

/// <summary>
/// Gets or sets the character cache
Expand All @@ -233,7 +233,7 @@ public static EveManager Instance
/// <summary>
/// Gets or sets the Alliance ID to Name dictionary
/// </summary>
public SerializableDictionary<long, string> CharacterIDToName { get; set; }
public SerializableDictionary<int, string> CharacterIDToName { get; set; }

public List<Coalition> Coalitions { get; set; }

Expand Down Expand Up @@ -1377,7 +1377,7 @@ public void CreateFromScratch(string sourceFolder, string outputFolder)
/// </summary>
/// <param name="id">Alliance ID</param>
/// <returns>Alliance Name</returns>
public string GetAllianceName(long id)
public string GetAllianceName(int id)
{
string name = string.Empty;
if (AllianceIDToName.ContainsKey(id))
Expand All @@ -1393,7 +1393,7 @@ public string GetAllianceName(long id)
/// </summary>
/// <param name="id">Alliance ID</param>
/// <returns>Alliance Ticker</returns>
public string GetAllianceTicker(long id)
public string GetAllianceTicker(int id)
{
string ticker = string.Empty;
if (AllianceIDToTicker.ContainsKey(id))
Expand All @@ -1404,7 +1404,7 @@ public string GetAllianceTicker(long id)
return ticker;
}

public string GetCharacterName(long id)
public string GetCharacterName(int id)
{
string name = string.Empty;
if (CharacterIDToName.ContainsKey(id))
Expand Down Expand Up @@ -1620,9 +1620,9 @@ public void LoadFromDisk()
SystemIDToName[s.ID] = s.Name;
}

CharacterIDToName = new SerializableDictionary<long, string>();
AllianceIDToName = new SerializableDictionary<long, string>();
AllianceIDToTicker = new SerializableDictionary<long, string>();
CharacterIDToName = new SerializableDictionary<int, string>();
AllianceIDToName = new SerializableDictionary<int, string>();
AllianceIDToTicker = new SerializableDictionary<int, string>();

// patch up any links
foreach (System s in Systems)
Expand Down Expand Up @@ -1689,16 +1689,16 @@ public void LoadJumpBridgeData()
/// <summary>
/// Update the Alliance and Ticker data for specified list
/// </summary>
public async Task ResolveAllianceIDs(List<long> IDs)
public async Task ResolveAllianceIDs(List<int> IDs)
{
if (IDs.Count == 0)
{
return;
}

// strip out any ID's we already know..
List<long> UnknownIDs = new List<long>();
foreach (long l in IDs)
List<int> UnknownIDs = new List<int>();
foreach (int l in IDs)
{
if (!AllianceIDToName.ContainsKey(l) || !AllianceIDToTicker.ContainsKey(l))
{
Expand Down Expand Up @@ -1742,16 +1742,16 @@ public async Task ResolveAllianceIDs(List<long> IDs)
/// <summary>
/// Update the Character ID data for specified list
/// </summary>
public async Task ResolveCharacterIDs(List<long> IDs)
public async Task ResolveCharacterIDs(List<int> IDs)
{
if (IDs.Count == 0)
{
return;
}

// strip out any ID's we already know..
List<long> UnknownIDs = new List<long>();
foreach (long l in IDs)
List<int> UnknownIDs = new List<int>();
foreach (int l in IDs)
{
if (!CharacterIDToName.ContainsKey(l))
{
Expand Down Expand Up @@ -2087,7 +2087,7 @@ public void UpdateIDsForMapRegion(string name)
return;
}

List<long> IDToResolve = new List<long>();
List<int> IDToResolve = new List<int>();

foreach (KeyValuePair<string, MapSystem> kvp in r.MapSystems)
{
Expand Down Expand Up @@ -3100,7 +3100,7 @@ private async void UpdateSovCampaigns()
sc.Valid = false;
}

List<long> allianceIDsToResolve = new List<long>();
List<int> allianceIDsToResolve = new List<int>();

ESI.NET.EsiResponse<List<ESI.NET.Models.Sovereignty.Campaign>> esr = await ESIClient.Sovereignty.Campaigns();
if (ESIHelpers.ValidateESICall<List<ESI.NET.Models.Sovereignty.Campaign>>(esr))
Expand Down Expand Up @@ -3248,7 +3248,7 @@ private async void UpdateSOVFromESI()
{
if (obj["alliance_id"] != null)
{
es.SOVAllianceTCU = long.Parse(obj["alliance_id"].ToString());
es.SOVAllianceTCU = int.Parse(obj["alliance_id"].ToString());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions EVEData/LocalCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ private async Task UpdateFleetInfo()

if (FleetInfo.FleetID != 0 && FleetInfo.IsFleetBoss)
{
List<long> characterIDsToResolve = new List<long>();
List<int> characterIDsToResolve = new List<int>();

ESI.NET.EsiResponse<List<ESI.NET.Models.Fleets.Member>> esrf = await esiClient.Fleets.Members(FleetInfo.FleetID);
if (ESIHelpers.ValidateESICall<List<ESI.NET.Models.Fleets.Member>>(esrf))
Expand Down Expand Up @@ -971,7 +971,7 @@ public async Task UpdateInfoFromESI()
return;
}

List<long> AllianceToResolve = new List<long>();
List<int> AllianceToResolve = new List<int>();

try
{
Expand Down
2 changes: 1 addition & 1 deletion EVEData/SOVCampaign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public double DefendersScore
}

public int CampaignID { get; set; }
public long DefendingAllianceID { get; set; }
public int DefendingAllianceID { get; set; }
public string DefendingAllianceName { get; set; }
public string System { get; set; }
public string Region { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions EVEData/System.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,19 @@ public enum EdenComTrigStatus
/// Gets or sets the name of the alliance holding sov in this system
/// </summary>
[XmlIgnoreAttribute]
public long SOVAllianceIHUB { get; set; }
public int SOVAllianceIHUB { get; set; }

/// <summary>
/// Gets or sets the name of the alliance holding sov in this system
/// </summary>
[XmlIgnoreAttribute]
public long SOVAllianceTCU { get; set; }
public int SOVAllianceTCU { get; set; }

/// <summary>
/// Gets or sets the name of the corporation holding sov in this system
/// </summary>
[XmlIgnoreAttribute]
public long SOVCorp { get; set; }
public int SOVCorp { get; set; }

[XmlIgnoreAttribute]
public float TCUOccupancyLevel { get; set; }
Expand Down
14 changes: 7 additions & 7 deletions EVEData/ZKillRedisQ.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ private void zkb_DoWork(object sender, DoWorkEventArgs e)
{
ZKBDataSimple zs = new ZKBDataSimple();
zs.KillID = long.Parse(z.Package.KillId.ToString());
zs.VictimAllianceID = long.Parse(z.Package.Killmail.Victim.AllianceId.ToString());
zs.VictimCharacterID = long.Parse(z.Package.Killmail.Victim.CharacterId.ToString());
zs.VictimCorpID = long.Parse(z.Package.Killmail.Victim.CharacterId.ToString());
zs.VictimAllianceID = int.Parse(z.Package.Killmail.Victim.AllianceId.ToString());
zs.VictimCharacterID = int.Parse(z.Package.Killmail.Victim.CharacterId.ToString());
zs.VictimCorpID = int.Parse(z.Package.Killmail.Victim.CharacterId.ToString());
zs.SystemName = EveManager.Instance.GetEveSystemNameFromID(z.Package.Killmail.SolarSystemId);
if (zs.SystemName == string.Empty)
{
Expand Down Expand Up @@ -141,7 +141,7 @@ private void zkb_DoWorkComplete(object sender, RunWorkerCompletedEventArgs e)
{
bool updatedKillList = false;

List<long> AllianceIDs = new List<long>();
List<int> AllianceIDs = new List<int>();

for (int i = KillStream.Count - 1; i >= 0; i--)
{
Expand Down Expand Up @@ -211,7 +211,7 @@ public class ZKBDataSimple : INotifyPropertyChanged
/// <summary>
/// Gets or sets the Victims Alliance ID
/// </summary>
public long VictimAllianceID { get; set; }
public int VictimAllianceID { get; set; }

/// <summary>
/// Gets or sets the Victims Alliance Name
Expand All @@ -232,12 +232,12 @@ public string VictimAllianceName
/// <summary>
/// Gets or sets the character ID of the victim
/// </summary>
public long VictimCharacterID { get; set; }
public int VictimCharacterID { get; set; }

/// <summary>
/// Gets or sets the Victim's corp ID
/// </summary>
public long VictimCorpID { get; set; }
public int VictimCorpID { get; set; }

public override string ToString()
{
Expand Down
4 changes: 2 additions & 2 deletions SMT/RegionControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2797,7 +2797,7 @@ private void AddSystemsToMap()
}
}

long SystemAlliance = 0;
int SystemAlliance = 0;

if (MapConf.SOVBasedITCU)
{
Expand Down Expand Up @@ -3144,7 +3144,7 @@ Sys links as curves

Thickness p = new Thickness(1);

foreach (long allianceID in AlliancesKeyList)
foreach (int allianceID in AlliancesKeyList)
{
string allianceName = EM.GetAllianceName(allianceID);
string allianceTicker = EM.GetAllianceTicker(allianceID);
Expand Down
2 changes: 1 addition & 1 deletion SMT/SMT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit">
<Version>5.0.103</Version>
</PackageReference>
<PackageReference Include="ESI.NET" Version="2023.4.15" />
<PackageReference Include="ESI.NET" Version="2023.7.15" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications">
<Version>7.1.3</Version>
</PackageReference>
Expand Down

0 comments on commit b3978ee

Please sign in to comment.