diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-01 18:16:09 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-01 18:16:09 +0000 |
commit | 2f3928c61a4b13eeb29a0a66802b7d334f319af3 (patch) | |
tree | 4ee808ecf0be9f63f81f220b34f9b1493d219c1e /src/char | |
parent | 78cfbc99e7ecfdc31687009fe33e551b5c852110 (diff) | |
download | hercules-2f3928c61a4b13eeb29a0a66802b7d334f319af3.tar.gz hercules-2f3928c61a4b13eeb29a0a66802b7d334f319af3.tar.bz2 hercules-2f3928c61a4b13eeb29a0a66802b7d334f319af3.tar.xz hercules-2f3928c61a4b13eeb29a0a66802b7d334f319af3.zip |
- When when a party-member levels up, the level change is sent to the char-server to update the even-share range values.
- When joining a gvg_dungeon, the pvp packet will be sent to signal versus.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9759 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/int_party.c | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/src/char/int_party.c b/src/char/int_party.c index 8f8e22583..5b04467b2 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -637,43 +637,46 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id if (p == NULL) return 0; - for(i = 0; i < MAX_PARTY; i++) { - if(p->party.member[i].account_id == account_id && - p->party.member[i].char_id == char_id) + for(i = 0; i < MAX_PARTY && + (p->party.member[i].account_id != account_id || + p->party.member[i].char_id != char_id); i++); + + if (i == MAX_PARTY) return 0; + + if (p->party.member[i].online != online) + { + p->party.member[i].online = online; + if (online) + p->party.count++; + else + p->party.count--; + // Even share check situations: Family state (always breaks) + // character logging on/off is max/min level (update level range) + // or character logging on/off has a different level (update level range using new level) + if (p->family || + (p->party.member[i].lv <= p->min_lv || p->party.member[i].lv >= p->max_lv) || + (p->party.member[i].lv != lv && (lv <= p->min_lv || lv >= p->max_lv)) + ) { - p->party.member[i].map = map; - if (p->party.member[i].online != online) - { - p->party.member[i].online = online; - if (online) - p->party.count++; - else - p->party.count--; - // Even share check situations: Family state (always breaks) - // character logging on/off is max/min level (update level range) - // or character logging on/off has a different level (update level range using new level) - if (p->family || - (p->party.member[i].lv <= p->min_lv || p->party.member[i].lv >= p->max_lv) || - (p->party.member[i].lv != lv && (lv <= p->min_lv || lv >= p->max_lv)) - ) - { - p->party.member[i].lv = lv; - int_party_check_lv(p); - } - } - if (p->party.member[i].lv != lv) { - if(p->party.member[i].lv == p->min_lv || - p->party.member[i].lv == p->max_lv) - { - p->party.member[i].lv = lv; - int_party_check_lv(p); - } else - p->party.member[i].lv = lv; - } - mapif_party_membermoved(&p->party, i); - break; + p->party.member[i].lv = lv; + int_party_check_lv(p); } } + if (p->party.member[i].lv != lv) { + if(p->party.member[i].lv == p->min_lv || + p->party.member[i].lv == p->max_lv) + { + p->party.member[i].lv = lv; + int_party_check_lv(p); + } else + p->party.member[i].lv = lv; + //There is no need to send level update to map servers + //since they do nothing with it. + } + if (p->party.member[i].map != map) { + p->party.member[i].map = map; + mapif_party_membermoved(&p->party, i); + } return 0; } |