diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-24 20:40:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-12-12 21:18:06 +0300 |
commit | 2d33d766bd7ea81eb40c15fe45d59ab155b16fde (patch) | |
tree | 962849821b8f1bd7b62c4209756005ef7f903ce3 /src/map/clif.c | |
parent | c76f8ded8743966abe10a15a3a03604d76d2d5df (diff) | |
download | hercules-2d33d766bd7ea81eb40c15fe45d59ab155b16fde.tar.gz hercules-2d33d766bd7ea81eb40c15fe45d59ab155b16fde.tar.bz2 hercules-2d33d766bd7ea81eb40c15fe45d59ab155b16fde.tar.xz hercules-2d33d766bd7ea81eb40c15fe45d59ab155b16fde.zip |
Add script command for insert cards into equipped items.
enchantitem(<equip_pos>, <card_slot>, <card_id>)
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 00d3d8908..4d298f520 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -21992,17 +21992,20 @@ static void clif_item_preview(struct map_session_data *sd, int n) } // insert cardId into equipped item in pos equipment slot into slot cardSlot. -static void clif_enchant_equipment(struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId) +static bool clif_enchant_equipment(struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId) { #if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO) - nullpo_retv(sd); - Assert_retv(cardSlot >= 0 && cardSlot <= 3); + nullpo_ret(sd); + Assert_ret(cardSlot >= 0 && cardSlot < MAX_SLOTS); struct PACKET_ZC_ENCHANT_EQUIPMENT p; p.packetType = HEADER_ZC_ENCHANT_EQUIPMENT; p.wearState = pos; p.cardSlot = cardSlot; p.itemId = cardId; clif->send(&p, sizeof(p), &sd->bl, SELF); + return true; +#else + return false; #endif } |