summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-24 19:15:27 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-24 19:15:27 +0000
commit3931d9353c6b53e9b9cd0599adc47cd041e60138 (patch)
tree784bd57cbffd8307608c47c09ceabf170c52eddd /src
parentbf34204a3920da9218d09a698b04a66041ecdf9c (diff)
downloadhercules-3931d9353c6b53e9b9cd0599adc47cd041e60138.tar.gz
hercules-3931d9353c6b53e9b9cd0599adc47cd041e60138.tar.bz2
hercules-3931d9353c6b53e9b9cd0599adc47cd041e60138.tar.xz
hercules-3931d9353c6b53e9b9cd0599adc47cd041e60138.zip
- Item sharing now shares the same rules as exp sharing (no sharing when dead, or idle, etc)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6737 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/party.c11
-rw-r--r--src/map/skill.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/map/party.c b/src/map/party.c
index d4b6d86b6..736dd55a2 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -714,7 +714,10 @@ int party_share_loot(struct party *p, TBL_PC *sd, struct item *item_data)
i++;
if (i >= MAX_PARTY)
i = 0; // reset counter to 1st person in party so it'll stop when it reaches "itemc"
- if ((psd=p->member[i].sd)==NULL || sd->bl.m != psd->bl.m)
+ if ((psd=p->member[i].sd)==NULL || sd->bl.m != psd->bl.m ||
+ pc_isdead(psd) || (battle_config.idle_no_share && (
+ psd->chatID || psd->vender_id || (psd->idletime < (last_tick - battle_config.idle_no_share)))
+ ))
continue;
if (pc_additem(psd,item_data,item_data->amount))
@@ -729,7 +732,11 @@ int party_share_loot(struct party *p, TBL_PC *sd, struct item *item_data)
int count=0;
//Collect pick candidates
for (i = 0; i < MAX_PARTY; i++) {
- if ((psd[count]=p->member[i].sd) && psd[count]->bl.m == sd->bl.m)
+ if ((psd[count]=p->member[i].sd) && psd[count]->bl.m == sd->bl.m &&
+ !pc_isdead(psd[count]) && (!battle_config.idle_no_share || (
+ !psd[count]->chatID && !psd[count]->vender_id &&
+ (psd[count]->idletime >= (last_tick - battle_config.idle_no_share)))
+ ))
count++;
}
if (count > 0) { //Pick a random member.
diff --git a/src/map/skill.c b/src/map/skill.c
index 5a3ec49c0..7c6af9178 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6008,8 +6008,6 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
md->mode = MD_CANATTACK|MD_AGGRESSIVE;
md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
}
- // To-do: ?「還されるモンスタ?[には?「還したプレ?[ヤ?[の名前が付きます
- // (attach name of player?)
}
break;
case AM_SPHEREMINE: // スフィア?マイン