Esempio n. 1
0
        public void OnDecline(HabboHelper Helper)
        {
            DeclinedHelpers.Add(Helper);

            HabboHelper newhelper = HelperToolsManager.GetHelpersToCase(this).FirstOrDefault();

            if (newhelper != null)
            {
                HelperToolsManager.InvinteHelpCall(newhelper, this);
            }
            else
            {
                Session.SendMessage(new CallForHelperErrorComposer(1));
                HelperToolsManager.RemoveCall(this);
            }
        }
Esempio n. 2
0
        public static HabboHelper AddHelper(GameClient Session, bool IsHelper, bool IsGard, bool IsGuide)
        {
            HabboHelper h = GetHelper(Session);

            if (h != null)
            {
                return(h);
            }

            Session.GetHabbo().OnHelperDuty = true;

            h = new HabboHelper(Session, IsGuide, IsHelper, IsGard);
            Helpers.Add(h);

            return(h);
        }
Esempio n. 3
0
        public static void RemoveHelper(GameClient Session)
        {
            HabboHelper h = GetHelper(Session);

            if (h != null)
            {
                RemoveHelper(h);
            }

            foreach (HabboHelper helper in Helpers)
            {
                if (helper.Session.GetHabbo() == null)
                {
                    RemoveHelper(helper);
                }
            }
        }
Esempio n. 4
0
        public static void HelperToolsManager_OnClientDisconnect(GameClient Session)
        {
            HabboHelper client = Helpers.FirstOrDefault(c => c.Session == Session);

            if (client == null)
            {
            }
            IHelperElement element = GetElement(Session);

            if (element == null)
            {
                return;
            }

            if (element is HabboHelper)
            {
                HabboHelper h = (HabboHelper)element;
                RemoveHelper(h);

                if (h.Case != null)
                {
                    h.Case.End(0);
                }

                if (h.InvinteCase != null)
                {
                    h.InvinteCase.OnDecline(h);
                }
            }
            else if (element is HelperCase c)
            {
                RemoveCall(c);
                if (c.Helper != null)
                {
                    c.Helper.End(0);
                }
            }
        }
Esempio n. 5
0
 public static void InvinteHelpCall(HabboHelper Helper, HelperCase hcase)
 {
     Helper.InvinteCase = hcase;
     Helper.Session.SendMessage(new CallForHelperWindowComposer(true, hcase));
     hcase.Helper = Helper;
 }
Esempio n. 6
0
 public static void RemoveHelper(HabboHelper client)
 {
     Helpers.Remove(client);
 }