From 7759f7840a24ed573542041472fdb03bdf4de999 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 12 Aug 2020 14:31:13 +0200 Subject: [PATCH] VERGESSE Optimierung wie bei LERNE [AUTO] Kein Grund, das in der Datenbank zu speichern. --- src/economy.c | 2 +- src/kernel/order.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/economy.c b/src/economy.c index 5f3bb8cbf..881614114 100644 --- a/src/economy.c +++ b/src/economy.c @@ -277,7 +277,7 @@ static int forget_cmd(unit * u, order * ord) return 0; } - init_order_depr(ord); + (void)init_order(ord, u->faction->locale); s = gettoken(token, sizeof(token)); sk = get_skill(s, u->faction->locale); diff --git a/src/kernel/order.c b/src/kernel/order.c index 96626bfc0..e82764cab 100644 --- a/src/kernel/order.c +++ b/src/kernel/order.c @@ -260,7 +260,7 @@ static int create_data(keyword_t kwd, const char *s, if (!s || *s == 0) { return 0; } - if (kwd == K_STUDY || kwd == K_AUTOSTUDY) { + if (kwd == K_STUDY || kwd == K_AUTOSTUDY || kwd == K_FORGET) { const char * sptr = s; skill_t sk = get_skill(parse_token_depr(&sptr), lang); if (sk != SK_MAGIC && sk != NOSKILL) { @@ -597,7 +597,7 @@ keyword_t init_order(const struct order *ord, const struct locale *lang) assert(sk < MAXSKILLS); assert(lang); - assert(kwd == K_STUDY || kwd == K_AUTOSTUDY); + assert(kwd == K_STUDY || kwd == K_AUTOSTUDY || kwd == K_FORGET); str = skillname(sk, lang); if (strchr(str, ' ') == NULL) { init_tokens_str(str); @@ -631,7 +631,7 @@ keyword_t init_order_depr(const struct order *ord) { if (ord) { keyword_t kwd = ORD_KEYWORD(ord); - assert(kwd != K_STUDY && kwd != K_AUTOSTUDY); + assert(kwd != K_STUDY && kwd != K_AUTOSTUDY && kwd != K_FORGET); } return init_order(ord, NULL); }