From ed89bc3b1ebb4148bdfc747258060c2c28d78330 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Tue, 22 Dec 2020 03:38:33 +1300 Subject: [PATCH] Add / remove mods from the player list if stealth flag is set. --- .../Horse Isle Server/Player/User.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Horse Isle Server/Horse Isle Server/Player/User.cs b/Horse Isle Server/Horse Isle Server/Player/User.cs index 7fb655a..242aadc 100644 --- a/Horse Isle Server/Horse Isle Server/Player/User.cs +++ b/Horse Isle Server/Horse Isle Server/Player/User.cs @@ -26,8 +26,7 @@ namespace HISP.Player public bool MetaPriority = false; - public bool Stealth = false; - + public int Facing; public Mailbox MailBox; public Friends Friends; @@ -36,6 +35,22 @@ namespace HISP.Player public Npc.NpcEntry LastTalkedToNpc; public Shop LastShoppedAt; public PlayerQuests Quests; + public bool Stealth + { + get + { + return stealth; + } + set + { + if (value) + Database.RemoveOnlineUser(this.Id); + else + Database.AddOnlineUser(this.Id, this.Administrator, this.Moderator); + + stealth = value; + } + } public int ChatViolations { get @@ -143,6 +158,7 @@ namespace HISP.Player private int charId; private string profilePage; private int x; + private bool stealth = false; private int y; private int money; private int questPoints;