diff options
author | veider <veider@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-28 21:25:11 +0000 |
---|---|---|
committer | veider <veider@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-28 21:25:11 +0000 |
commit | cb44aff61ed172eb338535078d772090b124d465 (patch) | |
tree | 68efd87328d3c019577d968833a44b588270c28b /src/char_sql/int_party.c | |
parent | 00fb4a56f6ae894e84cdd62faf6bf596a097e0e0 (diff) | |
download | hercules-cb44aff61ed172eb338535078d772090b124d465.tar.gz hercules-cb44aff61ed172eb338535078d772090b124d465.tar.bz2 hercules-cb44aff61ed172eb338535078d772090b124d465.tar.xz hercules-cb44aff61ed172eb338535078d772090b124d465.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1316 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_party.c')
-rw-r--r-- | src/char_sql/int_party.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c index 03392feb6..430385110 100644 --- a/src/char_sql/int_party.c +++ b/src/char_sql/int_party.c @@ -293,16 +293,32 @@ struct party* search_partyname(char *str) // EXP公平分配できるかチェック int party_check_exp_share(struct party *p) { - int i; - int maxlv=0,minlv=0x7fffffff; - for(i=0;i<MAX_PARTY;i++){ - int lv=p->member[i].lv; - if( p->member[i].online ){ - if( lv < minlv ) minlv=lv; - if( maxlv < lv ) maxlv=lv; - } - } - return (maxlv==0 || maxlv-minlv<=party_share_level); + int i, dudes=0; + int pl1=0,pl2=0,pl3=0; + int maxlv=0,minlv=0x7fffffff; + for(i=0;i<MAX_PARTY;i++){ + int lv=p->member[i].lv; + if (!lv) continue; + if( p->member[i].online ){ + if( lv < minlv ) minlv=lv; + if( maxlv < lv ) maxlv=lv; + if( lv >= 70 ) dudes+=1000; + dudes++; + } + } + if((dudes/1000 >= 2) && (dudes%1000 == 3) && (!strcmp(p->member[0].map,p->member[1].map)) && (!strcmp(p->member[1].map,p->member[2].map))) { + pl1=char_nick2id(p->member[0].name); + pl2=char_nick2id(p->member[1].name); + pl3=char_nick2id(p->member[2].name); + printf("PARTY: group of 3 Id1 %d lv %d name %s Id2 %d lv %d name %s Id3 %d lv %d name %s\n",pl1,p->member[0].lv,p->member[0].name,pl2,p->member[1].lv,p->member[1].name,pl3,p->member[2].lv,p->member[2].name); + if (char_married(pl1,pl2) && char_child(pl1,pl3)) + return 1; + if (char_married(pl1,pl3) && char_child(pl1,pl2)) + return 1; + if (char_married(pl2,pl3) && char_child(pl2,pl1)) + return 1; + } + return (maxlv==0 || maxlv-minlv<=party_share_level); } // Is there any member in the party? int party_check_empty(struct party *p) |