summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-27 11:33:42 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-27 11:33:42 +0000
commit2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe (patch)
tree08752564dda3f1ca52b7f4b0b75eb301af4478ba /src/map/skill.c
parent7f631a0654aa1ab4d9356753c49457a0f571c58b (diff)
downloadhercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.tar.gz
hercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.tar.bz2
hercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.tar.xz
hercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.zip
Fixed bugreport:5821 GN_SLINGITEM item requirements(item throwables) should now works normally.
Fixed bugreport:5223 GN_BLOOD_SUCKER should now work like official behavior. Fixed part of bugreport:5674 Spiral Pierce is now in RE. Fixed setmadogear now it accepts optional parameter(0=unmount 1=mount). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16155 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index f373ab08f..d997f97b6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3885,7 +3885,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case GS_FLING:
case NJ_ZENYNAGE:
case GN_THORNS_TRAP:
- case GN_BLOOD_SUCKER:
case GN_HELLS_PLANT_ATK:
skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
break;
@@ -8424,12 +8423,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case GN_BLOOD_SUCKER:
- if( skill_unitsetting(src, skillid, skilllv, bl->x, bl->y, 0) ) { // Do we need this unit setting? [Xazax]
- clif_skill_nodamage(src, bl, skillid, skilllv, 1);
- sc_start2(bl, type, 100, skilllv, src->id, skill_get_time(skillid,skilllv));
- } else if( sd ) {
- clif_skill_fail(sd, skillid, USESKILL_FAIL_LEVEL, 0);
- break;
+ {
+ struct status_change *sc = status_get_sc(src);
+
+ if( sc && sc->bs_counter < skill_get_maxcount( skillid , skilllv) ) {
+ if( tsc && tsc->data[type] ){
+ (sc->bs_counter)--;
+ status_change_end(src, type, INVALID_TIMER); // the first one cancels and the last one will take effect resetting the timer
+ }
+ clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+ sc_start2(bl, type, 100, skilllv, src->id, skill_get_time(skillid,skilllv));
+ (sc->bs_counter)++;
+ } else if( sd ) {
+ clif_skill_fail(sd, skillid, USESKILL_FAIL_LEVEL, 0);
+ break;
+ }
}
break;
@@ -8461,7 +8469,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
skill_attack(BF_WEAPON,src,src,bl,GN_SLINGITEM_RANGEMELEEATK,skilllv,tick,flag);
} else //Otherwise, it fails, shows animation and removes items.
clif_skill_fail(sd,GN_SLINGITEM_RANGEMELEEATK,0xa,0);
- } else {
+ } else if( itemdb_is_GNthrowable(ammo_id) ){
struct script_code *script = sd->inventory_data[i]->script;
if( !script )
break;