VERGESSE <talent> Optimierung wie bei LERNE [AUTO]

Kein Grund, das in der Datenbank zu speichern.
This commit is contained in:
Enno Rehling 2020-08-12 14:31:13 +02:00
parent b4e0640c08
commit 7759f7840a
2 changed files with 4 additions and 4 deletions

View File

@ -277,7 +277,7 @@ static int forget_cmd(unit * u, order * ord)
return 0; return 0;
} }
init_order_depr(ord); (void)init_order(ord, u->faction->locale);
s = gettoken(token, sizeof(token)); s = gettoken(token, sizeof(token));
sk = get_skill(s, u->faction->locale); sk = get_skill(s, u->faction->locale);

View File

@ -260,7 +260,7 @@ static int create_data(keyword_t kwd, const char *s,
if (!s || *s == 0) { if (!s || *s == 0) {
return 0; return 0;
} }
if (kwd == K_STUDY || kwd == K_AUTOSTUDY) { if (kwd == K_STUDY || kwd == K_AUTOSTUDY || kwd == K_FORGET) {
const char * sptr = s; const char * sptr = s;
skill_t sk = get_skill(parse_token_depr(&sptr), lang); skill_t sk = get_skill(parse_token_depr(&sptr), lang);
if (sk != SK_MAGIC && sk != NOSKILL) { 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(sk < MAXSKILLS);
assert(lang); assert(lang);
assert(kwd == K_STUDY || kwd == K_AUTOSTUDY); assert(kwd == K_STUDY || kwd == K_AUTOSTUDY || kwd == K_FORGET);
str = skillname(sk, lang); str = skillname(sk, lang);
if (strchr(str, ' ') == NULL) { if (strchr(str, ' ') == NULL) {
init_tokens_str(str); init_tokens_str(str);
@ -631,7 +631,7 @@ keyword_t init_order_depr(const struct order *ord)
{ {
if (ord) { if (ord) {
keyword_t kwd = ORD_KEYWORD(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); return init_order(ord, NULL);
} }