Browse Source

Show GMs differently in Announcements

master
Gregory Rudolph 3 years ago
parent
commit
a0b2e8d50d
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 5
      Pages/Index.cshtml.cs

5
Pages/Index.cshtml.cs

@ -216,9 +216,14 @@ namespace NightmareCoreWeb2.Pages
ret += "<br/><h1 align=\"center\">Online Players</h1>\n"; ret += "<br/><h1 align=\"center\">Online Players</h1>\n";
foreach (Character c in OnlineCharacters) foreach (Character c in OnlineCharacters)
{ {
Account a = new Account(c.Username)
if (a.IsGM) {
ret += $"<p>[GM] <a href=\"https://wotdn.nightmare.haus/?handler=Account&amp;name={c.Username}\">{c.Username}</a>: {c.GetRace()} {c.GetClass()}, {c.Name}</p>";
} else {
ret += $"<p> <a href=\"https://wotdn.nightmare.haus/?handler=Account&amp;name={c.Username}\">{c.Username}</a>: Level {c.Level} {c.GetRace()} {c.GetClass()}, {c.Name}</p>"; ret += $"<p> <a href=\"https://wotdn.nightmare.haus/?handler=Account&amp;name={c.Username}\">{c.Username}</a>: Level {c.Level} {c.GetRace()} {c.GetClass()}, {c.Name}</p>";
} }
} }
}
if (System.IO.File.Exists("announce.html")) if (System.IO.File.Exists("announce.html"))
{ {

Loading…
Cancel
Save