summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorEr_Maqui <er_maqui@darkbolt.net>2015-10-21 14:54:40 +0200
committerEr_Maqui <er_maqui@darkbolt.net>2015-10-21 14:54:40 +0200
commit198aef7133713b47a4c4fadaac6811c9d3812d19 (patch)
tree84df335dd0ad350c20f8c2a018b2a7096907b636 /src/map/pc.c
parent6977d6d31b58afc5095c0a59e754f21ea1080054 (diff)
parent8b198db1e0ccc8209b7bcf54b4df62d4747f75b2 (diff)
downloadhercules-198aef7133713b47a4c4fadaac6811c9d3812d19.tar.gz
hercules-198aef7133713b47a4c4fadaac6811c9d3812d19.tar.bz2
hercules-198aef7133713b47a4c4fadaac6811c9d3812d19.tar.xz
hercules-198aef7133713b47a4c4fadaac6811c9d3812d19.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ffe43ab8f..4d4f41521 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -41,7 +41,7 @@
#include "common/conf.h"
#include "common/core.h" // get_svn_revision()
#include "common/HPM.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h" // NAME_LENGTH, MAX_CARTS, NEW_CARTS
#include "common/nullpo.h"
#include "common/random.h"
@@ -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;