diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-07 22:17:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-07 22:20:46 +0300 |
commit | e39a129ee298c01638913e518f8fa23fa4bbe855 (patch) | |
tree | 3bd94446f6a3fc66dbd28241d915d71d0ab19978 /src/map/pc.c | |
parent | a823dedd45238a623ab9b950f7408e59ab2c961f (diff) | |
download | hercules-e39a129ee298c01638913e518f8fa23fa4bbe855.tar.gz hercules-e39a129ee298c01638913e518f8fa23fa4bbe855.tar.bz2 hercules-e39a129ee298c01638913e518f8fa23fa4bbe855.tar.xz hercules-e39a129ee298c01638913e518f8fa23fa4bbe855.zip |
Return from pc_equipitem/pc_unequipitem 0 if cant equip item and 1 if item equipped/unequipped
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index f28a4cfdd..ffc9b77ec 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8958,6 +8958,9 @@ void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int pos /*========================================== * Equip item on player sd at req_pos from inventory index n + * Return: + * 0 = fail + * 1 = success *------------------------------------------*/ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) { @@ -9089,7 +9092,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) } sd->npc_item_flag = iflag; - return 0; + return 1; } void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) @@ -9155,6 +9158,9 @@ void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) * 0 - only unequip * 1 - calculate status after unequipping * 2 - force unequip + * Return: + * 0 = fail + * 1 = success *------------------------------------------*/ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { int i,iflag; @@ -9280,7 +9286,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { } sd->npc_item_flag = iflag; - return 0; + return 1; } /*========================================== |