diff options
author | MadCamel <madcamel@gmail.com> | 2009-04-23 16:29:46 -0400 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-25 12:56:31 -0600 |
commit | e86bcd984545b3b48ba1ee887e32c15715cfe521 (patch) | |
tree | 9c2c758ba013be432b12db4130a3f90a64449f08 | |
parent | 1b83fe68a58fc7d19ed8557e2b363290732d4231 (diff) | |
download | tmwa-e86bcd984545b3b48ba1ee887e32c15715cfe521.tar.gz tmwa-e86bcd984545b3b48ba1ee887e32c15715cfe521.tar.bz2 tmwa-e86bcd984545b3b48ba1ee887e32c15715cfe521.tar.xz tmwa-e86bcd984545b3b48ba1ee887e32c15715cfe521.zip |
Fixed crash when picking up items while in a party
-rw-r--r-- | src/map/pc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c5d2e62..71554c8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2979,7 +2979,8 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) static int can_pick_item_up_from(struct map_session_data *self, int other_id) { - struct party *p; + struct party *p = party_search(self->status.party_id); + /* From ourselves or from no-one? */ if (!self || self->bl.id == other_id @@ -2993,11 +2994,11 @@ can_pick_item_up_from(struct map_session_data *self, int other_id) return 1; /* From our partner? */ - if (other && self->status.partner_id == other->status.char_id) + if (self->status.partner_id == other->status.char_id) return 1; /* From a party member? */ - if (other && self->status.party_id == other->status.party_id && p->item != 0) + if (self->status.party_id == other->status.party_id && p && p->item != 0) return 1; /* From someone who is far away? */ |