summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/char/int_party.c28
-rw-r--r--src/char_sql/int_party.c23
-rw-r--r--src/map/status.c2
4 files changed, 40 insertions, 18 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 11f7f11af..ad4fea1ec 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,11 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/08/13
+ * 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.
+ [Skotlex]
2006/08/11
* Fixed Kagebunshin no Jutsu crashing for dyes > 0; though this solution
might seem hackish (changing clothes colour to 0 when it starts while
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 62fc1ca7f..7f09095d9 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -620,8 +620,8 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) {
return 0;
}
-// パ?ティマップ更新要求
-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;
}
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) {
diff --git a/src/map/status.c b/src/map/status.c
index f5b0d4c97..40d9351c9 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -407,7 +407,7 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_SPEEDUP1] = SI_SPEEDPOTION2;
StatusIconChangeTable[SC_INCSTR] = SI_INCSTR;
StatusIconChangeTable[SC_MIRACLE] = SI_SPIRIT;
-
+
//Other SC which are not necessarily associated to skills.
StatusChangeFlagTable[SC_ASPDPOTION0] = SCB_ASPD;
StatusChangeFlagTable[SC_ASPDPOTION1] = SCB_ASPD;