public void TeachDiscipline(NWCreature teacher, int teachableIndex, int curLev) { LeaderBrain party = (LeaderBrain)fBrain; int id = StaticData.dbTeachable[teachableIndex].Id; TeachableKind kind = StaticData.dbTeachable[teachableIndex].Kind; int price = (int)Space.GetTeachablePrice(teachableIndex, curLev); SubMoney(price); teacher.AddMoney(price); switch (kind) { case TeachableKind.Ability: { SetAbility((AbilityID)id, curLev + 1); int num2 = party.Members.Count; for (int i = 1; i < num2; i++) { NWCreature j = party.Members[i]; j.SetAbility((AbilityID)id, curLev + 1); } } break; case TeachableKind.Skill: { SetSkill((SkillID)id, curLev + 1); int num = party.Members.Count; for (int i = 1; i < num; i++) { NWCreature j = party.Members[i]; j.SetSkill((SkillID)id, curLev + 1); } } break; } }