summaryrefslogtreecommitdiff
path: root/src/char_sql/int_party.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-13 05:07:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-13 05:07:13 +0000
commitf54e578019d10a23338174cba8ac99441694dd95 (patch)
tree4a2a02fa7ddfa446897a2cc655db813ea87f79aa /src/char_sql/int_party.c
parent4d345ccb426e98df70bfaee2426cb331c6a73752 (diff)
downloadhercules-f54e578019d10a23338174cba8ac99441694dd95.tar.gz
hercules-f54e578019d10a23338174cba8ac99441694dd95.tar.bz2
hercules-f54e578019d10a23338174cba8ac99441694dd95.tar.xz
hercules-f54e578019d10a23338174cba8ac99441694dd95.zip
- Corrected the mapif_parse_PartyChangeMap function to correctly update level-range when someone logs on/off, fixes being unable to set even-share on once it's been broken even when the characters out of range logoff.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8254 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_party.c')
-rw-r--r--src/char_sql/int_party.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index 115c59cd2..1cfc3c74b 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -722,14 +722,23 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id
p->party.member[i].char_id == char_id)
{
p->party.member[i].map = map;
- if (p->party.member[i].online != online) {
+ if (p->party.member[i].online != online)
+ {
p->party.member[i].online = online;
- if (online) p->party.count++;
- else p->party.count--;
- if (p->family && p->party.exp && !party_check_exp_share(p))
- { //Even-share lost.
- p->party.exp = 0;
- mapif_party_optionchanged(0, &p->party, 0, 0);
+ 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) {