Exemple #1
0
        private void AnimateList()
        {
            VitaNexCore.TryCatch(
                () =>
            {
                ConquestCompletedGump p = this;

                foreach (ConquestCompletedGump g in
                         GetInstances <ConquestCompletedGump>(User, true)
                         .Where(g => g != this && g.IsOpen && !g.IsDisposed && g.X >= p.X)
                         .OrderBy(g => g.X))
                {
                    g.X = p.X + p.OuterWidth;
                    p   = g;

                    if (g.AnimState != null)
                    {
                        return;
                    }

                    DateTime lr = g.LastAutoRefresh;
                    g.Refresh(true);
                    g.LastAutoRefresh = lr;
                }
            },
                e => e.ToConsole());
        }
Exemple #2
0
        public virtual void OnTierComplete(ConquestState s)
        {
            if (!Enabled || Deleted || s == null || s.Conquest != this || s.User == null)
            {
                return;
            }

            ConquestProfile p = Conquests.EnsureProfile(s.User);

            if (p != null)
            {
                p.Credit += Points;
            }

            if (s.TiersComplete || RewardTierComplete)
            {
                GiveRewards(s);
            }

            if (SoundOnComplete > 0)
            {
                s.User.PlaySound(SoundOnComplete);
            }

            if (!CentralGump.CentralGump.EnsureProfile(s.User).IgnoreConquests)
            {
                ConquestCompletedGump g = ConquestCompletedGump.Acquire(s);

                if (g != null)
                {
                    g.Send();
                }
            }

            if (Conquests.CMOptions.ModuleDebug)
            {
                Conquests.CMOptions.ToConsole("{0} tier complete: {1} ({2})", Name, s.User, s.Tier);
            }
        }