예제 #1
0
        public void RemoveReferral(ulong referralId)
        {
            if (!Referrals.ContainsKey(referralId))
            {
                return;
            }

            Referrals.Remove(referralId);

            InviterList.Inviters[InviterId] = this;

            UpdateActiveReferrals();
        }
예제 #2
0
        public void UpdateReferral(ulong referralId, bool state)
        {
            if (!Referrals.ContainsKey(referralId))
            {
                return;
            }

            Referrals[referralId].Active = state;

            InviterList.Inviters[InviterId] = this;

            UpdateActiveReferrals();
        }
예제 #3
0
        public void AddReferral(ulong referralId, bool state = true, DateTime?date = null)
        {
            if (Referrals.ContainsKey(referralId))
            {
                return;
            }

            Referrals.Add(referralId, new Referral(referralId, state: state, date: date));

            InviterList.Inviters[InviterId] = this;

            UpdateActiveReferrals();
        }