Skip to content

Commit

Permalink
Fixed broken credit filter. Exlcuded high priority alerts from filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali60351 committed Jan 8, 2018
1 parent 812d633 commit b5a59d5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
22 changes: 14 additions & 8 deletions Warframe_Alerts/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ public void WF_Update()
var title = alerts[i].Title;
var titleSp = title.Split('-');

title = titleSp[0];
var tempTitle = titleSp[0];

for (var j = 1; j < titleSp.Length - 1; j++)
{
title = title + "-" + titleSp[j];
tempTitle = tempTitle + "-" + titleSp[j];
}

var description = alerts[i].Description;
Expand Down Expand Up @@ -253,7 +253,7 @@ public void WF_Update()
aLeft = aLeft + aSpan.Seconds + " Seconds Left";

_idList.Add(aId);
string[] row = {description, title, faction, aLeft};
string[] row = {description, tempTitle, faction, aLeft};
var listViewItem = new ListViewItem(row);
//AlertData.Items.Add(listViewItem);
Invoke(new Action(() => AlertData.Items.Add(listViewItem)));
Expand Down Expand Up @@ -472,22 +472,27 @@ private bool Filter_Alerts(string title)

if (!BlueprintFilter)
{
if (title.IndexOf("(Blueprint)", StringComparison.Ordinal) != -1)
if (title.IndexOf("(Blueprint)", StringComparison.Ordinal) != -1 &&
title.IndexOf("Catalyst", StringComparison.Ordinal) == -1 &&
title.IndexOf("Reactor", StringComparison.Ordinal) == -1)
{
flag = false;
}
}

var dashCount = 0;

if (!CreditFilter)
{
var dashCount = 0;
var previous = 'X';

foreach (var t in title)
{
if (t == '-')
if (t == '-' && previous == ' ')
{
dashCount++;
}

previous = t;
}

if (dashCount == 2)
Expand All @@ -503,7 +508,8 @@ private bool Filter_Alerts(string title)

if (!ModFilter)
{
if (title.IndexOf("(Mod)", StringComparison.Ordinal) != -1)
if (title.IndexOf("(Mod)", StringComparison.Ordinal) != -1 &&
title.IndexOf("Riven", StringComparison.Ordinal) == -1)
{
flag = false;
}
Expand Down
25 changes: 19 additions & 6 deletions Warframe_Alerts/Secondary_Form.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b5a59d5

Please sign in to comment.