diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-11 20:44:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-11 21:01:59 +0300 |
commit | 691fe69c991503b2b00e4ece5d5cc956737e5a67 (patch) | |
tree | 46851a145435331540ce93cff78f202551cd1782 /src/map/pc.c | |
parent | f9cc60831717b91b5ab72c03283ce23f6bfd5317 (diff) | |
download | hercules-691fe69c991503b2b00e4ece5d5cc956737e5a67.tar.gz hercules-691fe69c991503b2b00e4ece5d5cc956737e5a67.tar.bz2 hercules-691fe69c991503b2b00e4ece5d5cc956737e5a67.tar.xz hercules-691fe69c991503b2b00e4ece5d5cc956737e5a67.zip |
Add n parameter to function pc_equipitem_pos.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index bc45f9184..ad32217b8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9438,7 +9438,14 @@ int pc_load_combo(struct map_session_data *sd) { return ret; } -void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int pos) +/** +* Equip item ad given position. +* @param sd the affected player structure. Must be checked before. +* @param id item structure for equip. Must be checked before. +* @param n inventory item position. Must be checked before. +* @param pos slot position. Must be checked before. +**/ +void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos) { if (pos & (EQP_HAND_R|EQP_SHADOW_WEAPON)) { if(id) @@ -9612,7 +9619,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) sd->status.inventory[n].equip=pos; - pc->equipitem_pos(sd, id, pos); + pc->equipitem_pos(sd, id, n, pos); pc->checkallowskill(sd); //Check if status changes should be halted. iflag = sd->npc_item_flag; @@ -9660,6 +9667,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) return 1; } +/** +* Unrquip item ad given position. +* @param sd the affected player structure. Must be checked before. +* @param n inventory item position. Must be checked before. +* @param pos slot position. Must be checked before. +**/ void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { if (pos & EQP_HAND_R) { |