Skip to content

Commit

Permalink
fix invalid world id crashing plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l committed Jan 2, 2023
1 parent 8c418dd commit 509ff69
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PartyPlanner/PluginUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ public void DrawDataCenter(Models.DataCenterType dataCenter)
{
if (ImGui.BeginTabItem(dataCenter.Name))
{


var events = partyVerseEvents
.FindAll(ev => ev.LocationId >= 0 && partyVerseApi.GetServerType(ev.LocationId).DataCenter == dataCenter.Id);
.FindAll(ev => ev.LocationId >= 0 && ev.LocationId < partyVerseApi.Servers.Count
&& partyVerseApi.GetServerType(ev.LocationId).DataCenter == dataCenter.Id);

var tags = events.SelectMany(ev => ev.Tags).Distinct().OrderBy(x => x);

Expand Down

0 comments on commit 509ff69

Please sign in to comment.