diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/skill.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 848422f3c..2c255ffb7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6635,18 +6635,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case NPC_EMOTION_ON: case NPC_EMOTION: - //va[0] is the emotion to use. + //val[0] is the emotion to use. //NPC_EMOTION & NPC_EMOTION_ON can change a mob's mode 'permanently' [Skotlex] //val[1] 'sets' the mode //val[2] adds to the current mode //val[3] removes from the current mode //val[4] if set, asks to delete the previous mode change. - if(md && md->skill_idx >= 0 && tsc) - { + if(md && md->skill_idx >= 0 && tsc) { clif->emotion(bl, md->db->skill[md->skill_idx].val[0]); if(md->db->skill[md->skill_idx].val[4] && tsce) status_change_end(bl, type, INVALID_TIMER); + //If mode gets set by NPC_EMOTION then the target should be reset [Playtester] + if(skill_id == NPC_EMOTION && md->db->skill[md->skill_idx].val[1]) + mob_unlocktarget(md,tick); + if(md->db->skill[md->skill_idx].val[1] || md->db->skill[md->skill_idx].val[2]) sc_start4(src, type, 100, skill_lv, md->db->skill[md->skill_idx].val[1], |