static public Image GetPreview(int id) { SceneConfig sceneConfig = ConfigData.GetSceneConfig(id); ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(sceneConfig.Name, "Lime", 20); tipData.AddTextNewLine(string.Format("需要等级: {0}", sceneConfig.Level), "White"); string[] icons = NPCBook.GetNPCIconsOnMap(id); if (icons.Length > 0) { tipData.AddTextNewLine("设施", "Green"); foreach (string icon in icons) { tipData.AddImage(HSIcons.GetIconsByEName(icon)); } } if (sceneConfig.Func != "") { tipData.AddTextNewLine("特色", "Pink"); string[] funcs = sceneConfig.Func.Split(';'); foreach (string fun in funcs) { tipData.AddImage(HSIcons.GetIconsByEName(string.Format("npc{0}", fun.ToLower()))); } } return tipData.Image; }
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 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); }
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 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; }
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; }
private Image GetMonsterImage() { ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(liveMonster.CardId).Quality; var name = string.Format("{0}(Lv{1})", liveMonster.Avatar.Name, liveMonster.Level); tipData.AddTextNewLine(name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddImage(HSIcons.GetIconsByEName("atr" + liveMonster.Avatar.MonsterConfig.Attr), 16, 16); tipData.AddImage(HSIcons.GetIconsByEName("rac" + liveMonster.Avatar.MonsterConfig.Type), 16, 16); tipData.AddLine(); tipData.AddTextNewLine(string.Format("生命 {0}/{1}", liveMonster.Life, liveMonster.RealMaxHp), "Lime"); AddText(tipData, "攻击", (int)liveMonster.Atk.Source, liveMonster.RealAtk, liveMonster.CanAttack ? "White" : "DarkGray", true); AddText(tipData, "移动", liveMonster.ReadMov, liveMonster.ReadMov, "White", false); AddText(tipData, "射程", liveMonster.RealRange, liveMonster.RealRange, "White", true); bool isLeft = false; if (liveMonster.RealDef != 0) { AddText(tipData, "防御", (int)liveMonster.Def.Source, liveMonster.RealDef, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealMag > 0) { AddText(tipData, "魔力", (int)liveMonster.Mag.Source, liveMonster.RealMag, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealSpd != 0) { AddText(tipData, "攻速", (int)liveMonster.Spd.Source, liveMonster.RealSpd, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealHit != 0) { AddText(tipData, "命中", (int)liveMonster.Hit.Source, liveMonster.RealHit, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealDHit != 0) { AddText(tipData, "回避", (int)liveMonster.Dhit.Source, liveMonster.RealDHit, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealCrt != 0) { AddText(tipData, "暴击", (int)liveMonster.Crt.Source, liveMonster.RealCrt, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealLuk != 0) { AddText(tipData, "幸运", (int)liveMonster.Luk.Source, liveMonster.RealLuk, "White", isLeft); isLeft = !isLeft; } foreach (var memBaseSkill in liveMonster.SkillManager.Skills) { tipData.AddImageNewLine(SkillBook.GetSkillImage(memBaseSkill.SkillId)); if (liveMonster.SkillManager.InForget && memBaseSkill.Type != SkillSourceTypes.Weapon) { tipData.AddText(string.Format("{0} X", memBaseSkill.SkillInfo.Name), "Red"); continue; } string tp = string.Format("{0}:{1}{2}", memBaseSkill.SkillInfo.Name, memBaseSkill.SkillInfo.Descript, memBaseSkill.Percent == 100 ? "" : string.Format("({0}%)", memBaseSkill.Percent)); if (tp.Length > 20) { tipData.AddText(tp.Substring(0, 19), "White"); tipData.AddTextNewLine(tp.Substring(19), "White"); } else { tipData.AddText(tp, "White"); } } if (liveMonster.Weapon != null) { tipData.AddImageNewLine(liveMonster.Weapon.GetImage(16, 16)); //todo weapon效果没有 tipData.AddText(liveMonster.Weapon.Des, "White"); } if (!liveMonster.IsGhost)//鬼不显示buff { liveMonster.BuffManager.DrawBuffToolTip(tipData); } 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)(EquipAttrs.AtkRate + 1)); tipData.AddTextNewLine(string.Format(eAddon.Format, equipConfig.AtkR), HSTypes.I2EaddonColor(eAddon.Rare)); } if (Hp > 0) { EquipAddonConfig eAddon = ConfigData.GetEquipAddonConfig((int)(EquipAttrs.HpRate + 1)); tipData.AddTextNewLine(string.Format(eAddon.Format, equipConfig.VitR), HSTypes.I2EaddonColor(eAddon.Rare)); } if (Spd > 0) { EquipAddonConfig eAddon = ConfigData.GetEquipAddonConfig((int)(EquipAttrs.Spd + 1)); tipData.AddTextNewLine(string.Format(eAddon.Format, equipConfig.Spd), HSTypes.I2EaddonColor(eAddon.Rare)); } if (Range > 0) { EquipAddonConfig eAddon = ConfigData.GetEquipAddonConfig((int)(EquipAttrs.Range + 1)); tipData.AddTextNewLine(string.Format(eAddon.Format, equipConfig.Range), HSTypes.I2EaddonColor(eAddon.Rare)); } if (equipConfig.EnergyRate[0] != 0 || equipConfig.EnergyRate[1] != 0 || equipConfig.EnergyRate[2] != 0) { tipData.AddLine(); tipData.AddTextNewLine("能量回复比率修正", "White"); tipData.AddTextNewLine(string.Format("LP {0}", equipConfig.EnergyRate[0].ToString().PadLeft(3, ' ')), "Gold"); tipData.AddBarTwo(100, equipConfig.EnergyRate[0], Color.Yellow, Color.Gold); tipData.AddTextNewLine(string.Format("PP {0}", equipConfig.EnergyRate[1].ToString().PadLeft(3, ' ')), "Red"); tipData.AddBarTwo(100, equipConfig.EnergyRate[1], Color.Pink, Color.Red); tipData.AddTextNewLine(string.Format("MP {0}", equipConfig.EnergyRate[2].ToString().PadLeft(3, ' ')), "Blue"); tipData.AddBarTwo(100, equipConfig.EnergyRate[2], Color.Cyan, Color.Blue); } if (equipConfig.HeroSkillId > 0) { tipData.AddLine(); tipData.AddImageNewLine(HeroPowerBook.GetImage(equipConfig.HeroSkillId)); var skillConfig = ConfigData.GetHeroPowerConfig(equipConfig.HeroSkillId); 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"); } } if (equipConfig.CommonSkillId > 0) { tipData.AddLine(); tipData.AddImageNewLine(SkillBook.GetSkillImage(equipConfig.CommonSkillId)); var skillConfig = ConfigData.GetSkillConfig(equipConfig.CommonSkillId); string tp = string.Format("{0}(被动)({2}%):{1}", skillConfig.Name, skillConfig.GetDescript(level), equipConfig.CommonSkillRate); if (tp.Length > 12) { tipData.AddText(tp.Substring(0, 11), "White"); tipData.AddTextNewLine(tp.Substring(11), "White"); } else { tipData.AddText(tp, "White"); } } tipData.AddLine(); if (Dura > 0)//实例化了 { tipData.AddTextNewLine(string.Format("耐久:{0}/{1}", Dura, equipConfig.Durable), "White"); } else { tipData.AddTextNewLine(string.Format("最大耐久:{0}", equipConfig.Durable), "White"); } if (ExpireTime > 0)//存在过期 { var expireTime = TimeTool.UnixTimeToDateTime(ExpireTime); if (DateTime.Now >= expireTime.AddSeconds(-60)) { tipData.AddTextNewLine("即将过期", "Red"); } else { var timeDiffer = expireTime - DateTime.Now; tipData.AddTextNewLine(string.Format("过期:{0}天{1}时{2}分", timeDiffer.Days, timeDiffer.Hours, timeDiffer.Minutes), "White"); } } tipData.AddLine(); 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); }
private Image GetPlayerImage() { ControlPlus.TipImage tipData = new ControlPlus.TipImage(); tipData.AddTextNewLine(string.Format("Lv{0}", Level), "LightBlue", 20); if (trapList.Count>0) { tipData.AddLine(); tipData.AddTextNewLine("陷阱", "White"); foreach (var trap in trapList) { var trapConfig = ConfigData.GetSpellTrapConfig(trap.Id); if (isPlayerControl) { tipData.AddTextNewLine(trapConfig.Name, "Lime"); tipData.AddText(string.Format("Lv{0} {1:0.0}%", trap.Level, trap.Rate), "White"); } else { tipData.AddTextNewLine("???", "Red"); } } } var rival = IsLeft ? BattleManager.Instance.PlayerManager.RightPlayer : BattleManager.Instance.PlayerManager.LeftPlayer; if (rival.HasHolyWord("witcheye")) { tipData.AddLine(); tipData.AddTextNewLine("手牌", "White"); for (int i = 0; i < 10; i++) { var card = 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; }
private Image GetMonsterImage() { ControlPlus.TipImage tipData = new ControlPlus.TipImage(); var cardQual = Config.CardConfigManager.GetCardConfig(liveMonster.CardId).Quality; var name = string.Format("{0}(Lv{1})", liveMonster.Avatar.Name, liveMonster.Level); tipData.AddTextNewLine(name, HSTypes.I2QualityColor(cardQual), 20); tipData.AddImage(HSIcons.GetIconsByEName("atr" + liveMonster.Avatar.MonsterConfig.Attr), 16, 16); tipData.AddImage(HSIcons.GetIconsByEName("rac" + liveMonster.Avatar.MonsterConfig.Type), 16, 16); tipData.AddLine(); tipData.AddTextNewLine(string.Format("生命 {0}/{1}", liveMonster.Life, liveMonster.RealMaxHp), "Lime"); if (liveMonster.HpBar.PArmor > 0) { AddText(tipData, "物甲", liveMonster.HpBar.PArmor, liveMonster.HpBar.PArmor, "LightGray", true); } if (liveMonster.HpBar.MArmor > 0) { AddText(tipData, "魔甲", liveMonster.HpBar.MArmor, liveMonster.HpBar.MArmor, "DodgerBlue", true); } AddText(tipData, "攻击", (int)liveMonster.Atk.Source, liveMonster.RealAtk, liveMonster.CanAttack ? "White" : "DarkGray", true); AddText(tipData, "移动", liveMonster.ReadMov, liveMonster.ReadMov, "White", false); AddText(tipData, "射程", liveMonster.RealRange, liveMonster.RealRange, "White", true); bool isLeft = false; if (liveMonster.RealDef != 0) { AddText(tipData, "防御", (int)liveMonster.Def.Source, liveMonster.RealDef, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealMag > 0) { AddText(tipData, "魔力", (int)liveMonster.Mag.Source, liveMonster.RealMag, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealSpd != 0) { AddText(tipData, "攻速", (int)liveMonster.Spd.Source, liveMonster.RealSpd, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealHit != 0) { AddText(tipData, "命中", (int)liveMonster.Hit.Source, liveMonster.RealHit, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealDHit != 0) { AddText(tipData, "回避", (int)liveMonster.Dhit.Source, liveMonster.RealDHit, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealCrt != 0) { AddText(tipData, "暴击", (int)liveMonster.Crt.Source, liveMonster.RealCrt, "White", isLeft); isLeft = !isLeft; } if (liveMonster.RealLuk != 0) { AddText(tipData, "幸运", (int)liveMonster.Luk.Source, liveMonster.RealLuk, "White", isLeft); isLeft = !isLeft; } foreach (var memBaseSkill in liveMonster.SkillManager.Skills) { tipData.AddImageNewLine(SkillBook.GetSkillImage(memBaseSkill.SkillId)); if (liveMonster.SkillManager.InForget && memBaseSkill.Type != SkillSourceTypes.Weapon) { tipData.AddText(string.Format("{0} X", memBaseSkill.SkillInfo.Name), "Red"); continue; } string tp = string.Format("{0}:{1}{2}", memBaseSkill.SkillInfo.Name, memBaseSkill.SkillInfo.Descript, memBaseSkill.Percent == 100 ? "" : string.Format("({0}%)", memBaseSkill.Percent)); if (tp.Length > 20) { tipData.AddText(tp.Substring(0, 19), "White"); tipData.AddTextNewLine(tp.Substring(19), "White"); } else { tipData.AddText(tp, "White"); } } if (liveMonster.Weapon != null) { tipData.AddImageNewLine(liveMonster.Weapon.GetImage(16, 16)); //todo weapon效果没有 tipData.AddText(liveMonster.Weapon.Des, "White"); } if (!liveMonster.IsGhost)//鬼不显示buff { liveMonster.BuffManager.DrawBuffToolTip(tipData); } 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; }