mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-02 10:27:19 +02:00
Level 1 limitation for NPC's addition
This commit is contained in:
parent
4f2e68a369
commit
6a743b5276
4 changed files with 18 additions and 30 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue