diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-04-14 07:51:59 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-04-14 07:51:59 +0200 |
commit | 2962a442c2019a80cb370ea5ccb50209ee30307e (patch) | |
tree | 88cecbe9ab270d46bdeb886d8baa657cdf3e56df /src/map/mob.c | |
parent | 4121c52ab55a72d92a33d9fc3b6c36f5ddcb8cf9 (diff) | |
download | hercules-2962a442c2019a80cb370ea5ccb50209ee30307e.tar.gz hercules-2962a442c2019a80cb370ea5ccb50209ee30307e.tar.bz2 hercules-2962a442c2019a80cb370ea5ccb50209ee30307e.tar.xz hercules-2962a442c2019a80cb370ea5ccb50209ee30307e.zip |
Add error message for exceeding MAX_MOBSKILL in global skill assignment
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 207184aca..789b9b11f 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -5655,8 +5655,11 @@ static bool mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n, continue; } ARR_FIND(0, MAX_MOBSKILL, j, mob->db_data[i]->skill[j].skill_id == 0); - if (j == MAX_MOBSKILL) + if (j == MAX_MOBSKILL) { + ShowError("mob_skill_db_libconfig_sub_skill: Too many skills for monster %d. (Global ID %d.)\n", + i, -mob_id); continue; + } memcpy(&mob->db_data[i]->skill[j], ms, sizeof(struct mob_skill)); mob->db_data[i]->maxskill = j + 1; |