summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-10-13 23:23:15 +0200
committerHaruna <haru@dotalux.com>2015-10-13 23:23:15 +0200
commitc35b94d29ed9d315298cdd71a2a97a135b51c5cf (patch)
tree13bd1d74576019df0bd6ce8254d5fd2844107ae4
parentde47c77935c26213feb507efdede31954ef92b4f (diff)
parentc2d3e2125124836e7cc329f3a782e3a42336c501 (diff)
downloadhercules-c35b94d29ed9d315298cdd71a2a97a135b51c5cf.tar.gz
hercules-c35b94d29ed9d315298cdd71a2a97a135b51c5cf.tar.bz2
hercules-c35b94d29ed9d315298cdd71a2a97a135b51c5cf.tar.xz
hercules-c35b94d29ed9d315298cdd71a2a97a135b51c5cf.zip
Merge pull request #797 from 4144/insertcard
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;