|
@@ -620,8 +620,8 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-// ƒp?ƒeƒBƒ}ƒbƒv�X�V—v‹�
|
|
|
-int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, int lv) {
|
|
|
+int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, int lv)
|
|
|
+{
|
|
|
struct party_data *p;
|
|
|
int i;
|
|
|
|
|
@@ -634,14 +634,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) {
|
|
@@ -657,7 +666,6 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|