diff options
Diffstat (limited to 'src/emap/mob.c')
-rw-r--r-- | src/emap/mob.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/emap/mob.c b/src/emap/mob.c index 3391620..0da1a1a 100644 --- a/src/emap/mob.c +++ b/src/emap/mob.c @@ -210,12 +210,16 @@ static void emob_load_skillattacks(const char *type, int skill_id = 0; if (script->get_constant(type, &skill_id)) { - const int idx = skill->get_index(skill_id); - data->skillAttacks[idx] = val; + if (skill_id == ELE_ALL) { + for (int f = 0; f < ELE_MAX; f ++) + data->eleResist[f] = val; + } else { + data->eleResist[skill_id] = val; + } } else { - ShowError("Mob %d. Unknown skill name %s\n", entry->mob_id, type); + ShowError("Mob %d. Unknown elemental name %s\n", entry->mob_id, type); } } @@ -248,7 +252,7 @@ void emob_read_db_additional_fields_pre(struct mob_db **entryPtr, } } - tt = libconfig->setting_get_member(*itPtr, "SkillAttacks"); + tt = libconfig->setting_get_member(*itPtr, "EleResist"); if (tt && config_setting_is_group(tt)) { |