summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-13 22:28:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-13 22:28:03 +0300
commitc2d3e2125124836e7cc329f3a782e3a42336c501 (patch)
tree13bd1d74576019df0bd6ce8254d5fd2844107ae4
parentde47c77935c26213feb507efdede31954ef92b4f (diff)
downloadhercules-c2d3e2125124836e7cc329f3a782e3a42336c501.tar.gz
hercules-c2d3e2125124836e7cc329f3a782e3a42336c501.tar.bz2
hercules-c2d3e2125124836e7cc329f3a782e3a42336c501.tar.xz
hercules-c2d3e2125124836e7cc329f3a782e3a42336c501.zip
Return actual result from pc_insert_card.
-rw-r--r--src/map/pc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ffe43ab8f..fe339c457 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4112,7 +4112,10 @@ bool pc_can_insert_card(struct map_session_data* sd, int idx_card)
}
/*==========================================
- * Append a card to an item ?
+ * Attempt to insert card into item.
+ * Return:
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
{
@@ -4143,6 +4146,7 @@ int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
sd->status.inventory[idx_equip].card[i] = nameid;
logs->pick_pc(sd, LOG_TYPE_OTHER, 1, &sd->status.inventory[idx_equip],sd->inventory_data[idx_equip]);
clif->insert_card(sd,idx_equip,idx_card,0);
+ return 1;
}
return 0;