public SortedList <double, double> 技能修炼PriceHandle; //999:100 1999:200 internal double GetPrice(Summon summon) { double RankPrice = -1, SkillPrice = 0, 技能修炼price = 0, SkillNumPrice = 0, 饰品price = 0; foreach (var rankName in RankPriceHandle) { if (summon.Rank.Contains(rankName.Key)) { RankPrice = rankName.Value; break; } } if (RankPrice == -1) { RankPrice = RankPriceHandle["其他"]; } var baseSkill = ""; foreach (var skill in summon.Skills) { if (SkillPriceHandle.ContainsKey(skill.Name)) { var thisPrice = SkillPriceHandle[skill.Name]; if (thisPrice > SkillPrice) { SkillPrice = thisPrice; baseSkill = skill.Name; } } } var SkillNum = summon.Skills.Count; foreach (var skillNumInfo in SkillNumPriceHandle) { if (SkillNum < skillNumInfo.Key) { break; } else { SkillNumPrice = Math.Max(SkillNumPrice, skillNumInfo.Value); } } var 饰品品质 = Convert.ToDouble(summon.饰品品质); 饰品price = 饰品品质 >= 1000 ? 饰品变色price : 饰品品质 >= 250 ? 饰品未变色price : 0; var 技能修炼 = Convert.ToDouble(summon.修炼参数2); foreach (var 修炼 in 技能修炼PriceHandle) { if (技能修炼 < 修炼.Key) { break; } else { 技能修炼price = Math.Max(技能修炼price, 修炼.Value); } } Program.setting.LogInfo(string.Format("召唤兽估价max((等级{7}({0})+技能{8}({1})+技能数量{9}({2})+基础{10}({3})+修炼{11}({4})),(觉醒技能{12}({5})+饰品{13}({6})))", RankPrice, SkillPrice, SkillNumPrice, BasePrice, 技能修炼price, summon.HaveSpecialSkill ? SpecialSkillPrice : 0, 饰品price, summon.Rank, baseSkill + "." + summon.GetAllSkill(), SkillNum, summon.ID, summon.修炼 ? summon.修炼参数2 : "无修炼", summon.HaveSpecialSkill ? "已觉醒" : "未觉醒", 饰品品质), summon.server.ServerName); return(Math.Max(RankPrice, Math.Max(SkillPrice, Math.Max(SkillNumPrice, Math.Max(BasePrice, 技能修炼price))) + (summon.HaveSpecialSkill ? SpecialSkillPrice : 0) + 饰品price)); }