Exemple #1
0
        public bool UpdateStatistics(PvPTeam t, PlayerMobile pm, Action <PvPProfileHistoryEntry> update)
        {
            if (t == null || t.Deleted || pm == null || update == null)
            {
                return(false);
            }

            var s = t.GetStatistics(pm);

            if (s == null)
            {
                return(false);
            }

            var success = true;

            VitaNexCore.TryCatch(
                update,
                s,
                x =>
            {
                AutoPvP.CMOptions.ToConsole(x);
                success = false;
            });

            if (t.IsMember(pm))
            {
                t.UpdateActivity(pm);
            }

            return(success);
        }