diff --git a/src/academy.c b/src/academy.c index ec191fa50..f6b70873e 100644 --- a/src/academy.c +++ b/src/academy.c @@ -27,8 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. void academy_teaching_bonus(struct unit *u, skill_t sk, int academy) { if (academy && sk != NOSKILL) { - academy = academy / 30; /* anzahl gelehrter wochen, max. 10 */ - learn_skill_depr(u, sk, academy / 30.0 / TEACHNUMBER); + learn_skill(u, sk, academy / STUDYDAYS); } } diff --git a/src/study.test.c b/src/study.test.c index 5befc0eae..ad0dc7721 100644 --- a/src/study.test.c +++ b/src/study.test.c @@ -230,14 +230,12 @@ static void test_academy_building(CuTest *tc) { teach_cmd(u, u->thisorder); learn_reset(); CuAssertPtrNotNull(tc, msg = test_find_messagetype(u->faction->msgs, "teach_asgood")); - // FIXME: new injection function -#if 0 CuAssertPtrEquals(tc, u, (unit *)(msg)->parameters[0].v); CuAssertPtrEquals(tc, u2, (unit *)(msg)->parameters[3].v); + CuAssertPtrEquals(tc, u, log_learners[0].u); CuAssertIntEquals(tc, SK_CROSSBOW, log_learners[0].sk); - CuAssertIntEquals(tc, 10, log_learners[0].days); -#endif + CuAssertIntEquals(tc, 15, log_learners[0].days); test_cleanup(); }