summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-27 06:11:18 +0000
committereuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-27 06:11:18 +0000
commit847a41f41dc4296c8c2aa42a79c23336f55e665b (patch)
tree4010b867b2060861d519babb6da86c0879825ff9 /src/map/unit.c
parentf4867954028b6c7b4d37c9860696578b27d6dbd1 (diff)
downloadhercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.tar.gz
hercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.tar.bz2
hercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.tar.xz
hercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.zip
> Follow-up r17048:
- Renamed 'useskilltopc' to 'npcskill'; - Removed cast time from NPC objects, code by mkbu95 (suspected official behavior); - Documented 'npcskill'; - Replaced all instances in scripts. * Fixed max level bypass, code by malufett (bugreport:5800). * Updated Malangdo spawns to official. * Some standardization of npc/quests/first_class/. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17049 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 07b728f47..e1e9d9690 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1276,6 +1276,10 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
casttime = skill_vfcastfix(src, casttime, skill_num, skill_lv);
#endif
+ if (src->type == BL_NPC) { // NPC-objects do not have cast time
+ casttime = 0;
+ }
+
if(!ud->state.running) //need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026
unit_stop_walking(src,1);// eventhough this is not how official works but this will do the trick. bugreport:6829
// in official this is triggered even if no cast time.
@@ -1439,6 +1443,9 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
casttime = skill_vfcastfix(src, casttime, skill_num, skill_lv );
#endif
+ if (src->type == BL_NPC) { // NPC-objects do not have cast time
+ casttime = 0;
+ }
ud->state.skillcastcancel = castcancel&&casttime>0?1:0;
if( !sd || sd->skillitem != skill_num || skill_get_cast(skill_num,skill_lv) )