/** * Updates the character panels to match the characters in the currently selected party */ public void Sync() { if (Party == null) { for (int lp = 0; lp <= 3; lp++) { CharacterPanel[lp].Character = null; } } else { for (int lp = 0; lp <= 3; lp++) { CharacterPanel[lp].Character = Party[lp]; CharacterPanel[lp].ParentPartyInfo = this; } } if (Party.Selected.CurrentMembership.IsPinned) { InfoLabel.Caption = " Pinned"; } else { int XPRequired = Party.Selected.CurrentMembership.ReqXP; if (XPRequired > 0) { InfoLabel.Caption = " " + Util.Comma(XPRequired) + "xp for level " + (Party.Selected.CurrentMembership.CurrentLevel + 1); } else { InfoLabel.Caption = " " + Util.Comma(Party.Selected.CurrentMembership.XPToPin) + "xp to pin"; } } }
private void updateStats() { stats.Caption = ""; statsValue.Caption = ""; statsBonus.Caption = ""; for (int lp = 0; lp < 6; lp++) { bool bold = (Character.BaseStats[lp] == Character.MaxStats[lp]); stats.Caption += MDRStats.SHORT_STAT_NAME[lp] + "\n"; statsValue.Caption += Util.Colorise(Character.BaseStats[lp].ToString(), bold ? boldColor : normalColor, bold) + "\n"; statsBonus.Caption += bonusStat(Character.ItemStats[lp]) + "\n"; } otherStats.Caption = string.Format("Hit: {0} Pierce: {1}\nCrit: {2} Backstab: {3}", formatPercent(Character.TotalHitBonus), formatValue((int)Character.TotalArmourPierce), formatPercent(Character.TotalCriticalHitChance), formatPercent(Character.TotalBackstabChance) ); string resistanceString = ""; foreach (string resistanceName in MDRResistance.ResistanceNames) { if (Character.Resistance[resistanceName] > 0) { resistanceString += string.Format("{0} {1}\n", resistanceName, Character.Resistance[resistanceName]); } } if (resistanceString == "") { resistanceString = "No resistances"; } resistanceInfo.Caption = resistanceString; playStatsInfo.Caption = "Play time: " + (Character.PlayTime / 60f / 60f).ToString("0.0") + " hours" + "\n" + "Deaths: " + Util.Comma(Character.Deaths) + "\n" + "Monsters Killed:" + Util.Comma(Character.MonstersKilled); }