From 9a0b84c93b8098b76911b09b103602797fede9dc Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 11 Apr 2013 16:16:01 -0300 Subject: Merge ca0642a75528cac73dd3683af7ca05bb42aa7dc0 (couldn't do it automatically) Signed-off-by: shennetsind --- src/map/skill.c | 9 ++++++--- 1 file 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], -- cgit v1.2.3-70-g09d2