diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mob.c | 2 | ||||
-rw-r--r-- | src/map/party.c | 7 | ||||
-rw-r--r-- | src/map/party.h | 2 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 4e9ee7781..a0022ab2b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1481,7 +1481,7 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str dlist->first_sd->status.party_id? party_search(dlist->first_sd->status.party_id): NULL, - dlist->first_sd,&ditem->item_data) == 0 + dlist->first_sd,&ditem->item_data,dlist->first_sd->bl.id) == 0 ) { ers_free(item_drop_ers, ditem); return; diff --git a/src/map/party.c b/src/map/party.c index c6aebda4a..271826610 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -734,13 +734,14 @@ int party_exp_share(struct party_data *p,struct block_list *src,unsigned int bas return 0;
}
-int party_share_loot(struct party_data *p, TBL_PC *sd, struct item *item_data)
+//Does party loot. first holds the id of the player who has time priority to take the item.
+int party_share_loot(struct party_data *p, TBL_PC *sd, struct item *item_data, int first)
{
TBL_PC *target=NULL;
int i;
- if (p && p->party.item&2) {
+ if (p && p->party.item&2 && (first || !(battle_config.party_share_type&1))) {
//item distribution to party members.
- if (battle_config.party_share_type) { //Round Robin
+ if (battle_config.party_share_type&2) { //Round Robin
TBL_PC *psd;
i = p->itemc;
do {
diff --git a/src/map/party.h b/src/map/party.h index 9debe642b..a3e7cfaa0 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -40,7 +40,7 @@ int party_check_conflict(struct map_session_data *sd); int party_skill_check(struct map_session_data *sd, int party_id, int skillid, int skilllv);
int party_send_xy_clear(struct party_data *p);
int party_exp_share(struct party_data *p,struct block_list *src,unsigned int base_exp,unsigned int job_exp,int zeny);
-int party_share_loot(struct party_data *p, TBL_PC *sd, struct item *item_data);
+int party_share_loot(struct party_data *p, TBL_PC *sd, struct item *item_data, int type);
int party_send_dot_remove(struct map_session_data *sd);
int party_sub_count(struct block_list *bl, va_list ap);
int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int type,...);
diff --git a/src/map/pc.c b/src/map/pc.c index ed58ded57..730c15d88 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2759,7 +2759,7 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem) } //This function takes care of giving the item to whoever should have it //considering party-share options. - if ((flag = party_share_loot(p,sd,&fitem->item_data))) { + if ((flag = party_share_loot(p,sd,&fitem->item_data, fitem->first_get_id))) { clif_additem(sd,0,0,flag); return 1; } |