Skip to content

Commit

Permalink
Option to have next/prev friend highlight friend. Closes #80
Browse files Browse the repository at this point in the history
  • Loading branch information
markdwags committed Mar 12, 2020
1 parent d583b22 commit 0e346bc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Razor/Core/TargetingNextPrevious.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private static void NextPrevTarget(List<Mobile> targets, bool nextTarget, bool i
target.Y = mobile.Position.Y;
target.Z = mobile.Position.Z;

if (!isFriend)
if (!isFriend || Config.GetBool("HighlightFriend"))
{
Client.Instance.SendToClient(new ChangeCombatant(mobile));
m_LastCombatant = mobile.Serial;
Expand Down
2 changes: 2 additions & 0 deletions Razor/UI/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ public void MakeDefault()
AddProperty("AutoSaveScript", false);
AddProperty("AutoSaveScriptPlay", false);

AddProperty("HighlightFriend", false);

Counter.Default();
Filter.DisableAll();
DressList.ClearAll();
Expand Down
20 changes: 16 additions & 4 deletions Razor/UI/Razor.Designer.cs

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

7 changes: 7 additions & 0 deletions Razor/UI/Razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,8 @@ public void InitConfig()
autoSaveScript.SafeAction(s => { s.Checked = Config.GetBool("AutoSaveScript"); });
autoSaveScriptPlay.SafeAction(s => { s.Checked = Config.GetBool("AutoSaveScriptPlay"); });

highlightFriend.SafeAction(s => { s.Checked = Config.GetBool("HighlightFriend"); });

// Disable SmartCPU in case it was enabled before the feature was removed
Client.Instance.SetSmartCPU(false);

Expand Down Expand Up @@ -6675,5 +6677,10 @@ private void renameScript_Click(object sender, EventArgs e)
}
}
}

private void highlightFriend_CheckedChanged(object sender, EventArgs e)
{
Config.SetProperty("HighlightFriend", highlightFriend.Checked);
}
}
}

0 comments on commit 0e346bc

Please sign in to comment.