summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-01-24 09:24:28 +0100
committerHaru <haru@dotalux.com>2020-02-09 23:53:53 +0100
commit26eae1d9e811f3171078c675f233be1c0faa4109 (patch)
treedc64eeba44f9c9c00ef1dbc1a527341e688afe97 /src/map/skill.c
parent6e2e6a353ba7a0ff1a82b1e8acca6950ae3e47a1 (diff)
downloadhercules-26eae1d9e811f3171078c675f233be1c0faa4109.tar.gz
hercules-26eae1d9e811f3171078c675f233be1c0faa4109.tar.bz2
hercules-26eae1d9e811f3171078c675f233be1c0faa4109.tar.xz
hercules-26eae1d9e811f3171078c675f233be1c0faa4109.zip
Moved the WZ_EARTHSPIKE check for TK_SPTIME skill from skill_check_condition_castbegin() to pc_useitem().
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index e8cab751e..e853bcc1d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14049,7 +14049,6 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
if( (i = sd->itemindex) == -1 ||
sd->status.inventory[i].nameid != sd->itemid ||
sd->inventory_data[i] == NULL ||
- (sd->inventory_data[i]->flag.delay_consume == 0 && skill_id == WZ_EARTHSPIKE) || // TODO: See below. [Kenpachi]
sd->status.inventory[i].amount < 1
) {
//Something went wrong, item exploit?
@@ -14057,17 +14056,9 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
return 0;
}
- /**
- * [Kenpachi] TODO:
- * - No skill casting item should be of type IT_DELAYCONSUME, they are all consumed immediately, even before the skill cursor appears.
- * The WZ_EARTHSPIKE check for TK_SPTIME skill should be moved to pc_useitem(), once the type of all skill casting items is updated.
- *
- **/
//Consume
sd->itemid = sd->itemindex = -1;
- if( skill_id == WZ_EARTHSPIKE && sc && sc->data[SC_EARTHSCROLL] && rnd()%100 > sc->data[SC_EARTHSCROLL]->val2 ) // [marquis007]
- ; //Do not consume item.
- else if (sd->status.inventory[i].expire_time == 0 && sd->inventory_data[i]->flag.delay_consume == 1) // Rental usable items are not consumed until expiration
+ if (sd->status.inventory[i].expire_time == 0 && sd->inventory_data[i]->flag.delay_consume == 1) // Rental usable items are not consumed until expiration
pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME);
}
}