public static Image GetPreview(int id) { var powerConfig = ConfigData.GetHeroPowerConfig(id); ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(powerConfig.Name, "White", 20); tipData.AddLine(); tipData.AddTextNewLine("英雄技能", "Red"); tipData.AddTextLines(powerConfig.Des, "Lime", 15, true); tipData.AddLine(); var cost = CardConfigManager.GetCardConfig(powerConfig.CardId).Cost; tipData.AddTextNewLine("消耗:", "White"); if (powerConfig.Type == (int)CardTypes.Monster) { tipData.AddText(cost + "LP", "Yellow"); } else if (powerConfig.Type == (int)CardTypes.Weapon) { tipData.AddText(cost + "PP", "Red"); } else { tipData.AddText(cost + "MP", "Blue"); } return(tipData.Image); }
public static Image GetPreview(int id) { HItemConfig hItemConfig = ConfigData.GetHItemConfig(id); if (hItemConfig.Id <= 0) { return(DrawTool.GetImageByString("unknown", 100)); } ControlPlus.TipImage tipData = new ControlPlus.TipImage(PaintTool.GetTalkColor); tipData.AddTextNewLine(hItemConfig.Name, HSTypes.I2RareColor(hItemConfig.Rare), 20); if (hItemConfig.IsUsable) { if (hItemConfig.SubType == (int)HItemTypes.Fight) { tipData.AddTextNewLine(" 战斗中双击使用", "Red"); } else if (hItemConfig.SubType == (int)HItemTypes.Seed) { tipData.AddTextNewLine(" 农场中双击使用", "Red"); } else { tipData.AddTextNewLine(" 双击使用", "Green"); } } if (hItemConfig.Type == (int)HItemTypes.Task) { tipData.AddTextNewLine(" 任务物品", "DarkBlue"); } else if (hItemConfig.Type == (int)HItemTypes.Material) { tipData.AddTextNewLine(string.Format(" 材料(稀有度:{0})", hItemConfig.Rare), "White"); } if (hItemConfig.Attributes != null && hItemConfig.Attributes.Length > 0) { tipData.AddTextNewLine(string.Format(" 特性:{0}", string.Join(",", hItemConfig.Attributes)), "Lime"); } tipData.AddTextNewLine(string.Format(" 等级:{0}", hItemConfig.Level), "White"); tipData.AddTextNewLine("", "White", 8); if (!string.IsNullOrEmpty(hItemConfig.Descript)) { tipData.AddTextLines(hItemConfig.Descript, "White", 20, true); } tipData.AddTextNewLine(string.Format("出售价格:{0}", GameResourceBook.InGoldSellItem(hItemConfig.Rare, hItemConfig.ValueFactor)), "Yellow"); tipData.AddImage(HSIcons.GetIconsByEName("res1")); tipData.AddImageXY(GetHItemImage(id), 8, 8, 48, 48, 7, 24, 32, 32); return(tipData.Image); }
static public Image GetSkillPreview(int id) { HeroSkillConfig heroSkillConfig = ConfigData.GetHeroSkillConfig(id); ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(heroSkillConfig.Name, "White", 20); tipData.AddLine(); tipData.AddTextNewLine("英雄技能", "Red"); tipData.AddTextLines(heroSkillConfig.Des, "Lime",15,true); tipData.AddLine(); var cost = CardConfigManager.GetCardConfig(heroSkillConfig.CardId).Cost; tipData.AddTextNewLine("消耗:", "White"); if (heroSkillConfig.Type == (int)CardTypes.Monster) { tipData.AddText(cost + "AP", "Red"); } else { tipData.AddText(cost + "MP", "Blue"); } return tipData.Image; }
public override Image GetPreview(CardPreviewType type, int[] parms) { const string stars = "★★★★★★★★★★"; ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(CardId).Quality; tipData.AddTextNewLine(spell.SpellConfig.Name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddText(string.Format("Lv{0}({1})", card.Level, spell.SpellConfig.Ename), "MediumAquamarine"); tipData.AddTextNewLine(stars.Substring(10 - spell.SpellConfig.Star), "Yellow", 20); tipData.AddLine(); if (spell.SpellConfig.JobId > 0) { var jobConfig = ConfigData.GetJobConfig(spell.SpellConfig.JobId); tipData.AddTextNewLine(string.Format("(限定职业:{0})", jobConfig.Name), "Red"); } tipData.AddTextNewLine("类型/属性", "Gray"); tipData.AddImage(HSIcons.GetIconsByEName("spl" + (spell.SpellConfig.Type - 200 + 1))); tipData.AddImage(HSIcons.GetIconsByEName("atr" + spell.SpellConfig.Attr)); string des = spell.Descript; tipData.AddTextLines(des, "Cyan", 15, true); if (type == CardPreviewType.Shop) { tipData.AddLine(); tipData.AddTextNewLine("价格", "White"); for (int i = 0; i < 7; i++) { if (parms[i] > 0) { tipData.AddText(" " + parms[i].ToString(), HSTypes.I2ResourceColor(i)); tipData.AddImage(HSIcons.GetIconsByEName("res" + (i + 1))); } } } return(tipData.Image); }
public override Image GetPreview(CardPreviewType type, int[] parms) { const string stars = "★★★★★★★★★★"; ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(CardId).Quality; tipData.AddTextNewLine(monster.Name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddText(string.Format("({0})",monster.MonsterConfig.Ename), "MediumAquamarine"); tipData.AddTextNewLine(stars.Substring(10 - monster.MonsterConfig.Star), "Yellow", 20); tipData.AddLine(); if (monster.MonsterConfig.JobId > 0) { var jobConfig = ConfigData.GetJobConfig(monster.MonsterConfig.JobId); tipData.AddTextNewLine(string.Format("(限定职业:{0})",jobConfig.Name), "Red"); } tipData.AddTextNewLine("种族/属性", "Gray"); tipData.AddImage(HSIcons.GetIconsByEName("rac" + monster.MonsterConfig.Type)); tipData.AddImage(HSIcons.GetIconsByEName("atr" + monster.MonsterConfig.Attr)); tipData.AddTextNewLine(string.Format("攻击 {0,3:D} 生命 {1,3:D}", monster.Atk, monster.Hp), "White"); tipData.AddTextNewLine(string.Format("移动 {0,3:D} 射程 {1,3:D}", monster.Mov, monster.Range), "White"); if (monster.Def>0) { tipData.AddTextNewLine(string.Format("防御 +{0}", monster.Def), "Lime"); } if (monster.Mag > 0) { tipData.AddTextNewLine(string.Format("魔力 +{0}", monster.Mag), "Lime"); } if (monster.Spd > 0) { tipData.AddTextNewLine(string.Format("攻速 +{0}", monster.Spd), "Lime"); } if (monster.Hit > 0) { tipData.AddTextNewLine(string.Format("命中 +{0}", monster.Hit), "Lime"); } if (monster.Dhit > 0) { tipData.AddTextNewLine(string.Format("回避 +{0}", monster.Dhit), "Lime"); } if (monster.Crt > 0) { tipData.AddTextNewLine(string.Format("暴击 +{0}", monster.Crt), "Lime"); } if (monster.Luk > 0) { tipData.AddTextNewLine(string.Format("幸运 +{0}", monster.Luk), "Lime"); } var skillList = MonsterBook.GetSkillList(monster.MonsterConfig.Id); if (skillList.Count > 0) { tipData.AddLine(); foreach (var skill in skillList) { int skillId = skill.Id; tipData.AddTextNewLine("", "Red"); tipData.AddImage(SkillBook.GetSkillImage(skillId)); var skillConfig = ConfigData.GetSkillConfig(skillId); string des = skillConfig.GetDescript(card.Level); if (skillConfig.DescriptBuffId > 0) des += ConfigData.GetBuffConfig(skillConfig.DescriptBuffId).GetDescript(card.Level); tipData.AddTextLines(des, "Cyan", 15, false); } } if (type == CardPreviewType.Shop) { tipData.AddLine(); tipData.AddTextNewLine("价格", "White"); for (int i = 0; i < 7; i++) { if (parms[i] > 0) { tipData.AddText(" " + parms[i].ToString(), HSTypes.I2ResourceColor(i)); tipData.AddImage(HSIcons.GetIconsByEName("res" + (i + 1))); } } } return tipData.Image; }
static public Image GetPreview(int id) { TaskConfig taskConfig = ConfigData.GetTaskConfig(id); ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(taskConfig.Name, "White", 20); tipData.AddTextLines(taskConfig.Descript, "Gray", 20, true); tipData.AddLine(); tipData.AddTextNewLine("任务指导", "White"); tipData.AddTextLines(taskConfig.Hint, "Gray", 20, true); if (UserProfile.InfoTask.GetTaskStateById(id) == 1) { int addon = UserProfile.InfoTask.GetTaskAddonById(id); if (addon > 0) { tipData.AddText(string.Format("({0})", addon), "Red"); } } tipData.AddLine(); tipData.AddTextNewLine(string.Format("奖励-常规 {0}", GetMoneyReal(id)), "Gold"); tipData.AddImage(HSIcons.GetIconsByEName("res1")); tipData.AddText(string.Format(" {0}", GetExpReal(id)), "Purple"); tipData.AddImage(HSIcons.GetIconsByEName("oth5")); if (taskConfig.Card > 0 && CardConfigManager.GetCardConfig(taskConfig.Card).Id > 0) { tipData.AddTextNewLine(" -卡片 ", "Gold"); tipData.AddImage(CardAssistant.GetCardImage(taskConfig.Card, 30, 30)); } if (taskConfig.Item.Count > 0) { tipData.AddTextNewLine(" -物品 ", "Gold"); for (int i = 0; i < taskConfig.Item.Count; i++) { if (taskConfig.Item[i].Value == 1) tipData.AddImage(Items.HItemBook.GetHItemImage(taskConfig.Item[i].Id)); else tipData.AddImage(Equips.EquipBook.GetEquipImage(taskConfig.Item[i].Id)); } } return tipData.Image; }
public static Image GetPreview(int id) { HItemConfig hItemConfig = ConfigData.GetHItemConfig(id); if (hItemConfig.Id <= 0) { return(DrawTool.GetImageByString("unknown", 100)); } ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(hItemConfig.Name, HSTypes.I2RareColor(hItemConfig.Rare), 20); if (hItemConfig.IsUsable) { if (hItemConfig.SubType == HItemTypes.Fight) { tipData.AddTextNewLine(" 战斗中双击使用", "Red"); } else if (hItemConfig.SubType == HItemTypes.Seed) { tipData.AddTextNewLine(" 农场中双击使用", "Red"); } else { tipData.AddTextNewLine(" 双击使用", "Green"); } } else if (hItemConfig.SubType == HItemTypes.Task) { tipData.AddTextNewLine(" 任务物品", "DarkBlue"); } else if (hItemConfig.SubType == HItemTypes.Material) { tipData.AddTextNewLine(string.Format(" 材料(稀有度:{0})", hItemConfig.Rare), "White"); } else { tipData.AddTextNewLine("", "White"); } tipData.AddTextNewLine(string.Format(" 等级:{0}", hItemConfig.Level), "White"); tipData.AddTextNewLine("", "White"); tipData.AddTextLines(hItemConfig.Descript, "White", 20, true); if (hItemConfig.SubType == HItemTypes.RandomCard) { var consumerConfig = ConfigData.GetItemConsumerConfig(hItemConfig.Id); int totalRate = 0; foreach (var rate in consumerConfig.RandomCardRate) { totalRate += rate; } tipData.AddLine(); tipData.AddTextNewLine("抽卡概率", "White"); tipData.AddTextNewLine("", "White"); tipData.AddImage(HSIcons.GetIconsByEName("gem5")); tipData.AddText(string.Format("{0:0}% ", (float)consumerConfig.RandomCardRate[3] * 100 / totalRate), "White"); tipData.AddImage(HSIcons.GetIconsByEName("gem4")); tipData.AddText(string.Format("{0:0}% ", (float)consumerConfig.RandomCardRate[2] * 100 / totalRate), "White"); tipData.AddLine(); } tipData.AddTextNewLine(string.Format("出售价格:{0}", GameResourceBook.InGoldSellItem(hItemConfig.Rare, hItemConfig.ValueFactor)), "Yellow"); tipData.AddImage(HSIcons.GetIconsByEName("res1")); tipData.AddImageXY(GetHItemImage(id), 8, 8, 48, 48, 7, 24, 32, 32); return(tipData.Image); }
public override Image GetPreview(CardPreviewType type, int[] parms) { const string stars = "★★★★★★★★★★"; ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(CardId).Quality; tipData.AddTextNewLine(spell.SpellConfig.Name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddText(string.Format("({0})",spell.SpellConfig.Ename), "MediumAquamarine"); tipData.AddTextNewLine(stars.Substring(10 - spell.SpellConfig.Star), "Yellow", 20); tipData.AddLine(); if (spell.SpellConfig.JobId > 0) { var jobConfig = ConfigData.GetJobConfig(spell.SpellConfig.JobId); tipData.AddTextNewLine(string.Format("(限定职业:{0})", jobConfig.Name), "Red"); } tipData.AddTextNewLine("类型/属性", "Gray"); tipData.AddImage(HSIcons.GetIconsByEName("spl" + (spell.SpellConfig.Type - 200+1))); tipData.AddImage(HSIcons.GetIconsByEName("atr" + spell.SpellConfig.Attr)); string des = spell.Descript; tipData.AddTextLines(des, "Cyan", 15, true); if (type == CardPreviewType.Shop) { tipData.AddLine(); tipData.AddTextNewLine("价格", "White"); for (int i = 0; i < 7; i++) { if (parms[i] > 0) { tipData.AddText(" " + parms[i].ToString(), HSTypes.I2ResourceColor(i)); tipData.AddImage(HSIcons.GetIconsByEName("res" + (i + 1))); } } } return tipData.Image; }
public override Image GetPreview(CardPreviewType type, int[] parms) { const string stars = "★★★★★★★★★★"; ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(CardId).Quality; tipData.AddTextNewLine(monster.Name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddText(string.Format("Lv{0}({1})", card.Level, monster.MonsterConfig.Ename), "MediumAquamarine"); tipData.AddTextNewLine(stars.Substring(10 - monster.MonsterConfig.Star), "Yellow", 20); tipData.AddLine(); if (monster.MonsterConfig.JobId > 0) { var jobConfig = ConfigData.GetJobConfig(monster.MonsterConfig.JobId); tipData.AddTextNewLine(string.Format("(限定职业:{0})", jobConfig.Name), "Red"); } tipData.AddTextNewLine("种族/属性", "Gray"); tipData.AddImage(HSIcons.GetIconsByEName("rac" + monster.MonsterConfig.Type)); tipData.AddImage(HSIcons.GetIconsByEName("atr" + monster.MonsterConfig.Attr)); tipData.AddTextNewLine(string.Format("攻击 {0,3:D} 生命 {1,3:D}", monster.Atk, monster.Hp), "White"); tipData.AddTextNewLine(string.Format("移动 {0,3:D} 射程 {1,3:D}", monster.Mov, monster.Range), "White"); if (monster.Def > 0) { tipData.AddTextNewLine(string.Format("防御 +{0}", monster.Def), "Lime"); } if (monster.Mag > 0) { tipData.AddTextNewLine(string.Format("魔力 +{0}", monster.Mag), "Lime"); } if (monster.Spd > 0) { tipData.AddTextNewLine(string.Format("攻速 +{0}", monster.Spd), "Lime"); } if (monster.Hit > 0) { tipData.AddTextNewLine(string.Format("命中 +{0}", monster.Hit), "Lime"); } if (monster.Dhit > 0) { tipData.AddTextNewLine(string.Format("回避 +{0}", monster.Dhit), "Lime"); } if (monster.Crt > 0) { tipData.AddTextNewLine(string.Format("暴击 +{0}", monster.Crt), "Lime"); } if (monster.Luk > 0) { tipData.AddTextNewLine(string.Format("幸运 +{0}", monster.Luk), "Lime"); } var skillList = MonsterBook.GetSkillList(monster.MonsterConfig.Id); if (skillList.Count > 0) { tipData.AddLine(); foreach (var skill in skillList) { int skillId = skill.Id; tipData.AddTextNewLine("", "Red"); tipData.AddImage(SkillBook.GetSkillImage(skillId)); var skillConfig = ConfigData.GetSkillConfig(skillId); string des = skillConfig.GetDescript(card.Level); if (skillConfig.DescriptBuffId > 0) { des += ConfigData.GetBuffConfig(skillConfig.DescriptBuffId).GetDescript(card.Level); } tipData.AddTextLines(des, "Cyan", 15, false); } } if (type == CardPreviewType.Shop) { tipData.AddLine(); tipData.AddTextNewLine("价格", "White"); for (int i = 0; i < 7; i++) { if (parms[i] > 0) { tipData.AddText(" " + parms[i].ToString(), HSTypes.I2ResourceColor(i)); tipData.AddImage(HSIcons.GetIconsByEName("res" + (i + 1))); } } } return(tipData.Image); }
public override Image GetPreview(CardPreviewType type, int[] parms) { const string stars = "★★★★★★★★★★"; ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(CardId).Quality; tipData.AddTextNewLine(weapon.WeaponConfig.Name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddText(string.Format("Lv{0}({1})", card.Level, weapon.WeaponConfig.Ename), "MediumAquamarine"); tipData.AddTextNewLine(stars.Substring(10 - weapon.WeaponConfig.Star), "Yellow", 20); tipData.AddLine(); if (weapon.WeaponConfig.JobId > 0) { var jobConfig = ConfigData.GetJobConfig(weapon.WeaponConfig.JobId); tipData.AddTextNewLine(string.Format("(限定职业:{0})", jobConfig.Name), "Red"); } tipData.AddTextNewLine("类型/属性", "Gray"); tipData.AddImage(HSIcons.GetIconsByEName("wep" + (weapon.WeaponConfig.Type - 100 + 1))); tipData.AddImage(HSIcons.GetIconsByEName("atr" + weapon.WeaponConfig.Attr)); if (weapon.Atk > 0) { tipData.AddTextNewLine(string.Format("攻击 +{0}", weapon.Atk), "White"); } if (weapon.PArmor > 0) { tipData.AddTextNewLine(string.Format("物甲 +{0}", weapon.PArmor), "White"); } if (weapon.MArmor > 0) { tipData.AddTextNewLine(string.Format("魔甲 +{0}", weapon.PArmor), "White"); } if (weapon.Range > 0) { tipData.AddTextNewLine(string.Format("射程 ={0}", weapon.Range), "White"); } if (weapon.Mov > 0) { tipData.AddTextNewLine(string.Format("移动 ={0}", weapon.Mov), "White"); } if (weapon.Def > 0) { tipData.AddTextNewLine(string.Format("防御 +{0}", weapon.Def), "Lime"); } if (weapon.Mag > 0) { tipData.AddTextNewLine(string.Format("魔力 +{0}", weapon.Mag), "Lime"); } if (weapon.Spd > 0) { tipData.AddTextNewLine(string.Format("攻速 +{0}", weapon.Spd), "Lime"); } if (weapon.Hit > 0) { tipData.AddTextNewLine(string.Format("命中 +{0}", weapon.Hit), "Lime"); } if (weapon.Dhit > 0) { tipData.AddTextNewLine(string.Format("回避 +{0}", weapon.Dhit), "Lime"); } if (weapon.Crt > 0) { tipData.AddTextNewLine(string.Format("暴击 +{0}", weapon.Crt), "Lime"); } if (weapon.Luk > 0) { tipData.AddTextNewLine(string.Format("幸运 +{0}", weapon.Luk), "Lime"); } tipData.AddTextNewLine(string.Format("耐久 {0}", weapon.Dura), "Lime"); if (weapon.WeaponConfig.SkillId > 0) { tipData.AddLine(); tipData.AddTextNewLine("", "Red"); var skillId = weapon.WeaponConfig.SkillId; tipData.AddImage(SkillBook.GetSkillImage(skillId)); var skillConfig = ConfigData.GetSkillConfig(skillId); string des = skillConfig.GetDescript(card.Level); if (skillConfig.DescriptBuffId > 0) { des += ConfigData.GetBuffConfig(skillConfig.DescriptBuffId).GetDescript(card.Level); } tipData.AddTextLines(des, "Cyan", 15, false); } if (type == CardPreviewType.Shop) { tipData.AddLine(); tipData.AddTextNewLine("价格", "White"); for (int i = 0; i < 7; i++) { if (parms[i] > 0) { tipData.AddText(" " + parms[i].ToString(), HSTypes.I2ResourceColor(i)); tipData.AddImage(HSIcons.GetIconsByEName("res" + (i + 1))); } } } return(tipData.Image); }
public override Image GetPreview(CardPreviewType type, int[] parms) { const string stars = "★★★★★★★★★★"; ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(CardId).Quality; tipData.AddTextNewLine(weapon.WeaponConfig.Name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddText(string.Format("({0})",weapon.WeaponConfig.Ename), "MediumAquamarine"); tipData.AddTextNewLine(stars.Substring(10 - weapon.WeaponConfig.Star), "Yellow", 20); tipData.AddLine(); if (weapon.WeaponConfig.JobId > 0) { var jobConfig = ConfigData.GetJobConfig(weapon.WeaponConfig.JobId); tipData.AddTextNewLine(string.Format("(限定职业:{0})", jobConfig.Name), "Red"); } tipData.AddTextNewLine("类型/属性", "Gray"); tipData.AddImage(HSIcons.GetIconsByEName("wep" + (weapon.WeaponConfig.Type - 100+1))); tipData.AddImage(HSIcons.GetIconsByEName("atr" + weapon.WeaponConfig.Attr)); if (weapon.Atk > 0) { tipData.AddTextNewLine(string.Format("攻击 +{0}", weapon.Atk), "White"); } if (weapon.Hp > 0) { tipData.AddTextNewLine(string.Format("生命 +{0}", weapon.Hp), "White"); } if (weapon.Range > 0) { tipData.AddTextNewLine(string.Format("射程 ={0}", weapon.Range), "White"); } if (weapon.Mov > 0) { tipData.AddTextNewLine(string.Format("移动 ={0}", weapon.Mov), "White"); } if (weapon.Def > 0) { tipData.AddTextNewLine(string.Format("防御 +{0}", weapon.Def), "Lime"); } if (weapon.Mag > 0) { tipData.AddTextNewLine(string.Format("魔力 +{0}", weapon.Mag), "Lime"); } if (weapon.Spd > 0) { tipData.AddTextNewLine(string.Format("攻速 +{0}", weapon.Spd), "Lime"); } if (weapon.Hit > 0) { tipData.AddTextNewLine(string.Format("命中 +{0}", weapon.Hit), "Lime"); } if (weapon.Dhit > 0) { tipData.AddTextNewLine(string.Format("回避 +{0}", weapon.Dhit), "Lime"); } if (weapon.Crt > 0) { tipData.AddTextNewLine(string.Format("暴击 +{0}", weapon.Crt), "Lime"); } if (weapon.Luk > 0) { tipData.AddTextNewLine(string.Format("幸运 +{0}", weapon.Luk), "Lime"); } tipData.AddTextNewLine(string.Format("耐久 {0}", weapon.Dura), "Lime"); if (weapon.WeaponConfig.SkillId > 0) { tipData.AddLine(); tipData.AddTextNewLine("", "Red"); var skillId = weapon.WeaponConfig.SkillId; tipData.AddImage(SkillBook.GetSkillImage(skillId)); var skillConfig = ConfigData.GetSkillConfig(skillId); string des = skillConfig.GetDescript(card.Level); if (skillConfig.DescriptBuffId > 0) des += ConfigData.GetBuffConfig(skillConfig.DescriptBuffId).GetDescript(card.Level); tipData.AddTextLines(des,"Cyan",15,false); } if (type == CardPreviewType.Shop) { tipData.AddLine(); tipData.AddTextNewLine("价格", "White"); for (int i = 0; i < 7; i++) { if (parms[i] > 0) { tipData.AddText(" " + parms[i].ToString(), HSTypes.I2ResourceColor(i)); tipData.AddImage(HSIcons.GetIconsByEName("res" + (i + 1))); } } } return tipData.Image; }
public static Image GetPreview(int id) { HItemConfig hItemConfig = ConfigData.GetHItemConfig(id); ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(hItemConfig.Name, HSTypes.I2RareColor(hItemConfig.Rare), 20); if (hItemConfig.IsUsable) { if (hItemConfig.SubType == HItemTypes.Fight) { tipData.AddTextNewLine(" 战斗中双击使用", "Red"); } else if (hItemConfig.SubType == HItemTypes.Seed) { tipData.AddTextNewLine(" 农场中双击使用", "Red"); } else { tipData.AddTextNewLine(" 双击使用", "Green"); } } else if (hItemConfig.SubType == HItemTypes.Task) { tipData.AddTextNewLine(" 任务物品", "DarkBlue"); } else if (hItemConfig.SubType == HItemTypes.Material) { tipData.AddTextNewLine(string.Format(" 材料(稀有度:{0})", hItemConfig.Rare), "White"); } else { tipData.AddTextNewLine("", "White"); } tipData.AddTextNewLine(string.Format(" 等级:{0}", hItemConfig.Level), "White"); tipData.AddTextNewLine("", "White"); tipData.AddTextLines(hItemConfig.Descript, "White",20,true); if (hItemConfig.SubType == HItemTypes.RandomCard) { var consumerConfig = ConfigData.GetItemConsumerConfig(hItemConfig.Id); int totalRate = 0; foreach (var rate in consumerConfig.RandomCardRate) totalRate += rate; tipData.AddLine(); tipData.AddTextNewLine("抽卡概率", "White"); tipData.AddTextNewLine("", "White"); tipData.AddImage(HSIcons.GetIconsByEName("gem5")); tipData.AddText(string.Format("{0:0}% ", (float)consumerConfig.RandomCardRate[3]*100/ totalRate), "White"); tipData.AddImage(HSIcons.GetIconsByEName("gem4")); tipData.AddText(string.Format("{0:0}% ", (float)consumerConfig.RandomCardRate[2] * 100 / totalRate), "White"); tipData.AddLine(); } tipData.AddTextNewLine(string.Format("出售价格:{0}", hItemConfig.Value), "Yellow"); tipData.AddImage(HSIcons.GetIconsByEName("res1")); tipData.AddImageXY(GetHItemImage(id), 8, 8, 48, 48, 7, 24, 32, 32); return tipData.Image; }