diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-26 20:21:56 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-26 20:21:56 +0000 |
commit | 6f618da64a31933954f3f5cbe8b3608d16681ed1 (patch) | |
tree | 7988eabfe90c65ec567d27c35127389954f97c8c /src/map/skill.c | |
parent | 7663ec43d2d64f7690e70f49cf66765b9a41f11e (diff) | |
download | hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.tar.gz hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.tar.bz2 hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.tar.xz hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.zip |
- 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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 26 |
1 files changed, 4 insertions, 22 deletions
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) |