Ejemplo n.º 1
0
        public virtual void GetHtmlString(Mobile viewer, StringBuilder html)
        {
            html.Append("".WrapUOHtmlColor(SuperGump.DefaultHtmlColor, false));

            if (Deleted)
            {
                html.Append("<B>This profile has been deleted.</B>");
                return;
            }

            html.AppendLine("<B>PvP Profile for {0}</B>", Owner.RawName);
            html.AppendLine();

            html.Append("".WrapUOHtmlColor(Color.YellowGreen, false));
            html.AppendLine("<B>Statistics</B>");
            html.AppendLine();

            int oRank = GetRank(), sRank = GetRank(AutoPvP.CurrentSeason);

            html.AppendLine("* Season Rank: {0}", sRank > 0 ? sRank.ToString("#,0") : "Unranked");
            html.AppendLine("* Overall Rank: {0}", oRank > 0 ? oRank.ToString("#,0") : "Unranked");
            html.AppendLine("* Overall Points: {0}", _Points.ToString("#,0"));
            html.AppendLine();

            Statistics.GetHtmlString(viewer, html);

            html.Append("".WrapUOHtmlColor(Color.Cyan, false));
            html.AppendLine("<B>Statisctics For All Seasons:</B>");
            html.AppendLine();

            html.AppendLine("<B>Main Statistic Totals</B>");
            html.AppendLine();

            html.AppendLine("* Battles Attended: {0}", TotalBattles.ToString("#,0"));
            html.AppendLine("* Battles Won: {0}", TotalWins.ToString("#,0"));
            html.AppendLine("* Battles Lost: {0}", TotalLosses.ToString("#,0"));
            html.AppendLine("* Points Gained: {0}", TotalPointsGained.ToString("#,0"));
            html.AppendLine("* Points Lost: {0}", TotalPointsLost.ToString("#,0"));
            html.AppendLine("* Kills: {0}", TotalKills.ToString("#,0"));
            html.AppendLine("* Deaths: {0}", TotalDeaths.ToString("#,0"));
            html.AppendLine("* Resurrections: {0}", TotalResurrections.ToString("#,0"));
            html.AppendLine("* Damage Taken: {0}", TotalDamageTaken.ToString("#,0"));
            html.AppendLine("* Damage Done: {0}", TotalDamageDone.ToString("#,0"));
            html.AppendLine("* Healing Taken: {0}", TotalHealingTaken.ToString("#,0"));
            html.AppendLine("* Healing Done: {0}", TotalHealingDone.ToString("#,0"));
            html.AppendLine();

            html.Append("".WrapUOHtmlColor(Color.GreenYellow, false));
            html.AppendLine("<B>Misc Statistic Totals</B>");
            html.AppendLine();

            foreach (var kvp in GetMiscStatisticTotals())
            {
                html.AppendLine("* {0}: {1}", kvp.Key, kvp.Value.ToString("#,0"));
            }

            html.AppendLine();
            html.Append("".WrapUOHtmlColor(SuperGump.DefaultHtmlColor, false));
        }
Ejemplo n.º 2
0
 public void CombineStats(PersistedStats StatsToBeMerged)
 {
     TotalDeaths.CombineStats(StatsToBeMerged.TotalDeaths);
     TotalPlayerKills.CombineStats(StatsToBeMerged.TotalPlayerKills);
     TotalPlayerAssists.CombineStats(StatsToBeMerged.TotalPlayerAssists);
     TotalPlayerDamage.CombineStats(StatsToBeMerged.TotalPlayerDamage);
     TotalPlayerHealing.CombineStats(StatsToBeMerged.TotalPlayerHealing);
     TotalPlayerAbsorb.CombineStats(StatsToBeMerged.TotalPlayerAbsorb);
     TotalPlayerDamageReceived.CombineStats(StatsToBeMerged.TotalPlayerDamageReceived);
     TotalBadgePoints.CombineStats(StatsToBeMerged.TotalBadgePoints);
     NetDamageAvoidedByEvades.CombineStats(StatsToBeMerged.NetDamageAvoidedByEvades);
     NetDamageAvoidedByEvadesPerLife.CombineStats(StatsToBeMerged.NetDamageAvoidedByEvadesPerLife);
     DamageDodgedByEvades.CombineStats(StatsToBeMerged.DamageDodgedByEvades);
     DamageInterceptedByEvades.CombineStats(StatsToBeMerged.DamageInterceptedByEvades);
     MyIncomingDamageReducedByCover.CombineStats(StatsToBeMerged.MyIncomingDamageReducedByCover);
     MyIncomingDamageReducedByCoverPerLife.CombineStats(StatsToBeMerged
                                                        .MyIncomingDamageReducedByCoverPerLife);
     MyOutgoingDamageReducedByCover.CombineStats(StatsToBeMerged.MyOutgoingDamageReducedByCover);
     MyOutgoingExtraDamageFromEmpowered.CombineStats(StatsToBeMerged.MyOutgoingExtraDamageFromEmpowered);
     MyOutgoingDamageReducedFromWeakened.CombineStats(StatsToBeMerged.MyOutgoingDamageReducedFromWeakened);
     TeamOutgoingDamageIncreasedByEmpoweredFromMe.CombineStats(StatsToBeMerged
                                                               .TeamOutgoingDamageIncreasedByEmpoweredFromMe);
     TeamIncomingDamageReducedByWeakenedFromMe.CombineStats(StatsToBeMerged
                                                            .TeamIncomingDamageReducedByWeakenedFromMe);
     MovementDeniedByMePerTurn.CombineStats(StatsToBeMerged.MovementDeniedByMePerTurn);
     EnergyGainPerTurn.CombineStats(StatsToBeMerged.EnergyGainPerTurn);
     DamagePerTurn.CombineStats(StatsToBeMerged.DamagePerTurn);
     BoostedOutgoingDamagePerTurn.CombineStats(StatsToBeMerged.BoostedOutgoingDamagePerTurn);
     DamageEfficiency.CombineStats(StatsToBeMerged.DamageEfficiency);
     KillParticipation.CombineStats(StatsToBeMerged.KillParticipation);
     EffectiveHealing.CombineStats(StatsToBeMerged.EffectiveHealing);
     TeamDamageAdjustedByMe.CombineStats(StatsToBeMerged.TeamDamageAdjustedByMe);
     TeamDamageSwingByMePerTurn.CombineStats(StatsToBeMerged.TeamDamageSwingByMePerTurn);
     TeamExtraEnergyByEnergizedFromMe.CombineStats(StatsToBeMerged.TeamExtraEnergyByEnergizedFromMe);
     TeamBoostedEnergyByMePerTurn.CombineStats(StatsToBeMerged.TeamBoostedEnergyByMePerTurn);
     TeamDamageReceived.CombineStats(StatsToBeMerged.TeamDamageReceived);
     DamageTakenPerLife.CombineStats(StatsToBeMerged.DamageTakenPerLife);
     EnemiesSightedPerTurn.CombineStats(StatsToBeMerged.EnemiesSightedPerTurn);
     TotalTurns.CombineStats(StatsToBeMerged.TotalTurns);
     TankingPerLife.CombineStats(StatsToBeMerged.TankingPerLife);
     TeamMitigation.CombineStats(StatsToBeMerged.TeamMitigation);
     SupportPerTurn.CombineStats(StatsToBeMerged.SupportPerTurn);
     DamageDonePerLife.CombineStats(StatsToBeMerged.DamageDonePerLife);
     DamageTakenPerTurn.CombineStats(StatsToBeMerged.DamageTakenPerTurn);
     SecondsPlayed.CombineStats(StatsToBeMerged.SecondsPlayed);
     MatchesWon.CombineStats(StatsToBeMerged.MatchesWon);
     for (int i = 0; i < FreelancerSpecificStats.Count; i++)
     {
         if (i < StatsToBeMerged.FreelancerSpecificStats.Count)
         {
             FreelancerSpecificStats[i].CombineStats(StatsToBeMerged.FreelancerSpecificStats[i]);
         }
     }
 }
Ejemplo n.º 3
0
        public object Clone()
        {
            PersistedStats persistedStats = new PersistedStats();

            persistedStats.TotalDeaths                               = TotalDeaths.GetCopy();
            persistedStats.TotalPlayerKills                          = TotalPlayerKills.GetCopy();
            persistedStats.TotalPlayerAssists                        = TotalPlayerAssists.GetCopy();
            persistedStats.TotalPlayerDamage                         = TotalPlayerDamage.GetCopy();
            persistedStats.TotalPlayerHealing                        = TotalPlayerHealing.GetCopy();
            persistedStats.TotalPlayerAbsorb                         = TotalPlayerAbsorb.GetCopy();
            persistedStats.TotalPlayerDamageReceived                 = TotalPlayerDamageReceived.GetCopy();
            persistedStats.TotalBadgePoints                          = TotalBadgePoints.GetCopy();
            persistedStats.NetDamageAvoidedByEvades                  = NetDamageAvoidedByEvades.GetCopy();
            persistedStats.NetDamageAvoidedByEvadesPerLife           = NetDamageAvoidedByEvadesPerLife.GetCopy();
            persistedStats.DamageDodgedByEvades                      = DamageDodgedByEvades.GetCopy();
            persistedStats.DamageInterceptedByEvades                 = DamageInterceptedByEvades.GetCopy();
            persistedStats.MyIncomingDamageReducedByCover            = MyIncomingDamageReducedByCover.GetCopy();
            persistedStats.MyIncomingDamageReducedByCoverPerLife     = MyIncomingDamageReducedByCoverPerLife.GetCopy();
            persistedStats.MyOutgoingDamageReducedByCover            = MyOutgoingDamageReducedByCover.GetCopy();
            persistedStats.MyOutgoingDamageReducedFromWeakened       = MyOutgoingDamageReducedFromWeakened.GetCopy();
            persistedStats.MyOutgoingExtraDamageFromEmpowered        = MyOutgoingExtraDamageFromEmpowered.GetCopy();
            persistedStats.TeamIncomingDamageReducedByWeakenedFromMe =
                TeamIncomingDamageReducedByWeakenedFromMe.GetCopy();
            persistedStats.TeamOutgoingDamageIncreasedByEmpoweredFromMe =
                TeamOutgoingDamageIncreasedByEmpoweredFromMe.GetCopy();
            persistedStats.MovementDeniedByMePerTurn        = MovementDeniedByMePerTurn.GetCopy();
            persistedStats.EnergyGainPerTurn                = EnergyGainPerTurn.GetCopy();
            persistedStats.DamagePerTurn                    = DamagePerTurn.GetCopy();
            persistedStats.BoostedOutgoingDamagePerTurn     = BoostedOutgoingDamagePerTurn.GetCopy();
            persistedStats.DamageEfficiency                 = DamageEfficiency.GetCopy();
            persistedStats.KillParticipation                = KillParticipation.GetCopy();
            persistedStats.EffectiveHealing                 = EffectiveHealing.GetCopy();
            persistedStats.TeamDamageAdjustedByMe           = TeamDamageAdjustedByMe.GetCopy();
            persistedStats.TeamDamageSwingByMePerTurn       = TeamDamageSwingByMePerTurn.GetCopy();
            persistedStats.TeamExtraEnergyByEnergizedFromMe = TeamExtraEnergyByEnergizedFromMe.GetCopy();
            persistedStats.TeamBoostedEnergyByMePerTurn     = TeamBoostedEnergyByMePerTurn.GetCopy();
            persistedStats.TeamDamageReceived               = TeamDamageReceived.GetCopy();
            persistedStats.DamageTakenPerLife               = DamageTakenPerLife.GetCopy();
            persistedStats.EnemiesSightedPerTurn            = EnemiesSightedPerTurn.GetCopy();
            persistedStats.TotalTurns         = TotalTurns.GetCopy();
            persistedStats.TankingPerLife     = TankingPerLife.GetCopy();
            persistedStats.TeamMitigation     = TeamMitigation.GetCopy();
            persistedStats.SupportPerTurn     = SupportPerTurn.GetCopy();
            persistedStats.DamageDonePerLife  = DamageDonePerLife.GetCopy();
            persistedStats.DamageTakenPerTurn = DamageTakenPerTurn.GetCopy();
            persistedStats.SecondsPlayed      = SecondsPlayed.GetCopy();
            persistedStats.MatchesWon         = MatchesWon.GetCopy();
            if (FreelancerSpecificStats == null)
            {
                persistedStats.FreelancerSpecificStats = null;
            }
            else
            {
                persistedStats.FreelancerSpecificStats = new List <PersistedStatEntry>();
                for (int i = 0; i < FreelancerSpecificStats.Count; i++)
                {
                    PersistedStatEntry item = new PersistedStatEntry();
                    item = (PersistedStatEntry)FreelancerSpecificStats[i].Clone();
                    persistedStats.FreelancerSpecificStats.Add(item);
                }
            }

            return(persistedStats);
        }