From 2962a442c2019a80cb370ea5ccb50209ee30307e Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Tue, 14 Apr 2020 07:51:59 +0200 Subject: Add error message for exceeding MAX_MOBSKILL in global skill assignment --- src/map/mob.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map/mob.c') 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; -- cgit v1.2.3-70-g09d2