From 6f618da64a31933954f3f5cbe8b3608d16681ed1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 26 Mar 2007 20:21:56 +0000 Subject: - Cleaned up some the mob skill use code. The skill re-use delay is set at the time the skill is used rather than when it finishes casting. The invalid target check was also moved to the mob skill db reading function. - Skills can be used now when the autoskill menu is open (since there's no packet sent by the client when you hit on cancel) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10074 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index 66b923a62..91c7b327f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5678,17 +5678,8 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) md->last_thinktime=tick +md->status.amotion; else md->last_thinktime=tick +md->status.adelay; - if(battle_config.mob_ai&0x200) { //pass on delay to same skill. - int i; - for (i = 0; i < md->db->maxskill; i++) - if (md->db->skill[i].skill_id == ud->skillid) - md->skilldelay[i]=tick; - } else - if(md->skillidx >= 0) { - md->skilldelay[md->skillidx]=tick; - if (md->db->skill[md->skillidx].emotion >= 0) - clif_emotion(src, md->db->skill[md->skillidx].emotion); - } + if(md->skillidx >= 0 && md->db->skill[md->skillidx].emotion >= 0) + clif_emotion(src, md->db->skill[md->skillidx].emotion); } if(src != target && battle_config.skill_add_range && @@ -5864,17 +5855,8 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data) md->last_thinktime=tick +md->status.amotion; else md->last_thinktime=tick +md->status.adelay; - if(battle_config.mob_ai&0x200) { //pass on delay to same skill. - int i; - for (i = 0; i < md->db->maxskill; i++) - if (md->db->skill[i].skill_id == ud->skillid) - md->skilldelay[i]=tick; - } else - if(md->skillidx >= 0) { - md->skilldelay[md->skillidx]=tick; - if (md->db->skill[md->skillidx].emotion >= 0) - clif_emotion(src, md->db->skill[md->skillidx].emotion); - } + if(md->skillidx >= 0 && md->db->skill[md->skillidx].emotion >= 0) + clif_emotion(src, md->db->skill[md->skillidx].emotion); } if(battle_config.skill_log && battle_config.skill_log&src->type) -- cgit v1.2.3-60-g2f50