Show GMs differently in Announcements

This commit is contained in:
2021-09-17 10:39:55 -04:00
parent 3ea07adf46
commit a0b2e8d50d

View File

@ -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"))
{ {