// 1 在PlayAbility状态时增加经验 static void AddExpInBattle(WuxiaUnit unit, string skillId) { SkillData skillDataLearned = unit.LearnedSkills[skillId]; if (skillDataLearned.Item.RequireValue > 0 && skillExpRate.Value > 0f) { int num = CalculateNurturanceExp(unit.info, skillDataLearned.Item.RequireAttribute, skillDataLearned.Item.RequireValue); num = Math.Max(1, (int)(num * skillExpRate.Value)); try { unit.info.AddSkillExp(skillId, num); } catch { Console.WriteLine("出招者的Info有问题:" + unit.CharacterInfoId); } skillDataLearned.AddExp(num); } }