private Image GetPlayerImage() { ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(string.Format("Lv{0}", player.Level), "LightBlue", 20); tipData.AddTextNewLine("能量回复比率", "White"); tipData.AddTextNewLine(string.Format("LP {0}", player.EnergyGenerator.RateLp.ToString().PadLeft(3, ' ')), "Gold"); tipData.AddBar(100, player.EnergyGenerator.RateLp, Color.Yellow, Color.Gold); tipData.AddTextNewLine(string.Format("PP {0}", player.EnergyGenerator.RatePp.ToString().PadLeft(3, ' ')), "Red"); tipData.AddBar(100, player.EnergyGenerator.RatePp, Color.Pink, Color.Red); tipData.AddTextNewLine(string.Format("MP {0}", player.EnergyGenerator.RateMp.ToString().PadLeft(3, ' ')), "Blue"); tipData.AddBar(100, player.EnergyGenerator.RateMp, Color.Cyan, Color.Blue); player.TrapHolder.GenerateImage(tipData, player is HumanPlayer); var rival = player.Rival as Player; if (rival.HasHolyWord("witcheye")) { tipData.AddLine(); tipData.AddTextNewLine("手牌", "White"); for (int i = 0; i < 10; i++) { var card = player.CardManager.GetDeckCardAt(i); if (card.CardId > 0) { var cardConfig = CardConfigManager.GetCardConfig(card.CardId); tipData.AddTextNewLine("-", "White"); tipData.AddImage(CardAssistant.GetCardImage(card.CardId, 20, 20)); tipData.AddText(string.Format("{0}({1}★)Lv{2}", cardConfig.Name, cardConfig.Star, card.Level), HSTypes.I2QualityColor(cardConfig.Quality)); } } } return(tipData.Image); }
public Image GetPreview() { EquipConfig equipConfig = ConfigData.GetEquipConfig(TemplateId); ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(equipConfig.Name, HSTypes.I2QualityColor(equipConfig.Quality), 20); tipData.AddTextNewLine(string.Format(" 装备部位:{0}", HSTypes.I2EPosition(equipConfig.Position)), "White"); tipData.AddTextNewLine(string.Format(" 装备等级:{0}", equipConfig.Level), "White"); tipData.AddTextNewLine("", "White"); if (Atk > 0) { EquipAddonConfig eAddon = ConfigData.GetEquipAddonConfig((int) (TowerAttrs.Atk+ 1)); tipData.AddTextNewLine(string.Format(eAddon.Format, Atk), HSTypes.I2EaddonColor(eAddon.Rare)); } if (Hp > 0) { EquipAddonConfig eAddon = ConfigData.GetEquipAddonConfig((int)(TowerAttrs.Hp + 1)); tipData.AddTextNewLine(string.Format(eAddon.Format, Hp), HSTypes.I2EaddonColor(eAddon.Rare)); } if (equipConfig.EnergyRate[0] + equipConfig.EnergyRate[1] + equipConfig.EnergyRate[2] > 0) { tipData.AddLine(); if (equipConfig.Job > 0)//转换职业 { var jobConfig = ConfigData.GetJobConfig(equipConfig.Job); tipData.AddTextNewLine(string.Format("转职: {0}", jobConfig.Name), "Pink"); } tipData.AddTextNewLine(string.Format("领导 {0}", equipConfig.EnergyRate[0]), "Gold"); tipData.AddBar(100, equipConfig.EnergyRate[0], Color.Yellow, Color.Gold); tipData.AddTextNewLine(string.Format("力量 {0}", equipConfig.EnergyRate[1]), "Red"); tipData.AddBar(100, equipConfig.EnergyRate[1], Color.Pink, Color.Red); tipData.AddTextNewLine(string.Format("魔力 {0}", equipConfig.EnergyRate[2]), "Blue"); tipData.AddBar(100, equipConfig.EnergyRate[2], Color.Cyan, Color.Blue); } if (equipConfig.SpecialSkill > 0) { tipData.AddLine(); tipData.AddImageNewLine(HeroSkillBook.GetHeroSkillImage(equipConfig.SpecialSkill)); HeroSkillConfig skillConfig = ConfigData.GetHeroSkillConfig(equipConfig.SpecialSkill); string tp = string.Format("{0}:{1}", skillConfig.Name, skillConfig.Des); if (tp.Length > 12) { tipData.AddText(tp.Substring(0, 11), "White"); tipData.AddTextNewLine(tp.Substring(11), "White"); } else { tipData.AddText(tp, "White"); } } tipData.AddLine(); tipData.AddTextNewLine(string.Format("需要等级:{0}", equipConfig.LvNeed), UserProfile.InfoBasic.Level < equipConfig.LvNeed ? "Red" : "Gray"); tipData.AddTextNewLine(string.Format("出售价格:{0}", equipConfig.Value), "Yellow"); tipData.AddImage(HSIcons.GetIconsByEName("res1")); tipData.AddImageXY(EquipBook.GetEquipImage(TemplateId), 8, 8, 48, 48, 7, 24, 32, 32); return tipData.Image; }