summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/itemdb.h1
-rw-r--r--src/map/skill.c10
2 files changed, 5 insertions, 6 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index b595fabf6..d751451c6 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -545,6 +545,7 @@ struct item_data {
#define itemdb_iscashfood(n) ((n) >= ITEMID_STR_DISH10_ && (n) <= ITEMID_VIT_DISH10_)
#define itemdb_is_GNbomb(n) ((n) >= ITEMID_APPLE_BOMB && (n) <= ITEMID_VERY_HARD_LUMP)
#define itemdb_is_GNthrowable(n) ((n) >= ITEMID_MYSTERIOUS_POWDER && (n) <= ITEMID_BLACK_THING_TO_THROW)
+#define itemid_is_pilebunker(n) ((n) == ITEMID_PILEBUNCKER || (n) == ITEMID_PILEBUNCKER_P || (n) == ITEMID_PILEBUNCKER_S || (n) == ITEMID_PILEBUNCKER_T)
#define itemdb_is_shadowequip(n) ((n) & (EQP_SHADOW_ARMOR|EQP_SHADOW_WEAPON|EQP_SHADOW_SHIELD|EQP_SHADOW_SHOES|EQP_SHADOW_ACC_R|EQP_SHADOW_ACC_L))
#define itemdb_is_costumeequip(n) ((n) & (EQP_COSTUME_HEAD_TOP|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_LOW|EQP_COSTUME_GARMENT))
diff --git a/src/map/skill.c b/src/map/skill.c
index f9a2d0e34..d4d70d115 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -13764,13 +13764,11 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
break;
case NC_PILEBUNKER:
- if ((sd->equip_index[EQI_HAND_R] >= 0 && sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid == ITEMID_PILEBUNCKER) ||
- (sd->equip_index[EQI_HAND_R] >= 0 && sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid == ITEMID_PILEBUNCKER_S) ||
- (sd->equip_index[EQI_HAND_R] >= 0 && sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid == ITEMID_PILEBUNCKER_P) ||
- (sd->equip_index[EQI_HAND_R] >= 0 && sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid == ITEMID_PILEBUNCKER_T));
- else {
+ if (sd->equip_index[EQI_HAND_R] < 0
+ || !itemid_is_pilebunker(sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid)
+ ) {
clif->skill_fail(sd, skill_id, USESKILL_FAIL_THIS_WEAPON, 0);
- return 0;
+ return 0;
}
break;
case NC_HOVERING: