diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-02 18:24:29 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-02 18:24:29 +0000 |
commit | 42c15ccde5ce27e721243afe43e3784f35c63695 (patch) | |
tree | 371349426458e5807185fd58e148739cb2af4e57 /src/map/pc.c | |
parent | 5459510af1250f4ce2032314cb970f116b84a395 (diff) | |
download | hercules-42c15ccde5ce27e721243afe43e3784f35c63695.tar.gz hercules-42c15ccde5ce27e721243afe43e3784f35c63695.tar.bz2 hercules-42c15ccde5ce27e721243afe43e3784f35c63695.tar.xz hercules-42c15ccde5ce27e721243afe43e3784f35c63695.zip |
- Corrected clif_parse_takeitem to ALWAYS return a NAK packet when it fails
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6943 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index cca92aff5..89e4a523b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2609,38 +2609,37 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) if (sd->status.party_id)
p = party_search(sd->status.party_id);
- if(fitem->first_get_id > 0 && fitem->first_get_id != sd->bl.id) {
+ if(fitem->first_get_id > 0 && fitem->first_get_id != sd->bl.id)
+ {
first_sd = map_id2sd(fitem->first_get_id);
if(DIFF_TICK(tick,fitem->first_get_tick) < 0) {
if (!(p && p->item&1 &&
first_sd && first_sd->status.party_id == sd->status.party_id
- )) {
- clif_additem(sd,0,0,6);
+ ))
return 0;
- }
}
- else if(fitem->second_get_id > 0 && fitem->second_get_id != sd->bl.id) {
+ else
+ if(fitem->second_get_id > 0 && fitem->second_get_id != sd->bl.id)
+ {
second_sd = map_id2sd(fitem->second_get_id);
if(DIFF_TICK(tick, fitem->second_get_tick) < 0) {
if(!(p && p->item&1 &&
((first_sd && first_sd->status.party_id == sd->status.party_id) ||
(second_sd && second_sd->status.party_id == sd->status.party_id))
- )) {
- clif_additem(sd,0,0,6);
+ ))
return 0;
- }
}
- else if(fitem->third_get_id > 0 && fitem->third_get_id != sd->bl.id) {
+ else
+ if(fitem->third_get_id > 0 && fitem->third_get_id != sd->bl.id)
+ {
third_sd = map_id2sd(fitem->third_get_id);
if(DIFF_TICK(tick,fitem->third_get_tick) < 0) {
if(!(p && p->item&1 &&
((first_sd && first_sd->status.party_id == sd->status.party_id) ||
(second_sd && second_sd->status.party_id == sd->status.party_id) ||
(third_sd && third_sd->status.party_id == sd->status.party_id))
- )) {
- clif_additem(sd,0,0,6);
+ ))
return 0;
- }
}
}
}
@@ -2660,7 +2659,7 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) pc_equipitem(sd, fitem->item_data.nameid, fitem->item_data.equip);
}
map_clearflooritem(fitem->bl.id);
- return 0;
+ return 1;
}
int pc_isUseitem(struct map_session_data *sd,int n)
|