Level 1 limitation for NPC's addition

This commit is contained in:
kinther 2025-12-14 14:34:26 -08:00
parent 4f2e68a369
commit 6a743b5276
4 changed files with 18 additions and 30 deletions

View file

@ -830,7 +830,11 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
if (!str_cmp(field, "level")) {
if (subfield && *subfield) {
int lev = atoi(subfield);
GET_LEVEL(c) = MIN(MAX(lev, 0), LVL_IMMORT-1);
if (IS_NPC(c)) {
if (GET_LEVEL(c) != 1)
GET_LEVEL(c) = 1;
} else
GET_LEVEL(c) = MIN(MAX(lev, 1), LVL_IMPL);
} else
snprintf(str, slen, "%d", GET_LEVEL(c));
}