summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-09 02:19:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-09 02:19:53 +0000
commit7a13b4b39286831e4e96780f0b60b855437d2879 (patch)
treef5da321195d4079e3ab4cca8a367a646002285ef
parentef008fd94916820f82d765a48d8502cbba974ce1 (diff)
downloadhercules-7a13b4b39286831e4e96780f0b60b855437d2879.tar.gz
hercules-7a13b4b39286831e4e96780f0b60b855437d2879.tar.bz2
hercules-7a13b4b39286831e4e96780f0b60b855437d2879.tar.xz
hercules-7a13b4b39286831e4e96780f0b60b855437d2879.zip
- Fixed the char-server not invoking the party_calc_state function when the third party-member is added to a party, hence failing to check for families and disabling even share from them unless all three relog first (state is correctly calculated when party is first loaded).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8197 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/char/int_party.c9
-rw-r--r--src/char_sql/int_party.c9
3 files changed, 14 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 28206f9c5..ad9bd971c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/08
+ * Fixed the char-server not invoking the party_calc_state function when the
+ third party-member is added to a party, hence failing to check for families
+ and disabling even share from them unless all three relog first (state is
+ correctly calculated when party is first loaded). [Skotlex]
* Crash-protections in the mail-checking function. [Skotlex]
* Some additional parenthesis on equipment check in pc_equipitem, seems to
have fixed the mid/lower headgear-sprites not showing up. [Skotlex]
diff --git a/src/char/int_party.c b/src/char/int_party.c
index e26e659f6..5d9ab9123 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -554,12 +554,13 @@ int mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *member
p->party.member[i].leader = 0;
if (p->party.member[i].online) p->party.count++;
p->size++;
- if (member->lv < p->min_lv || member->lv > p->max_lv || p->family)
- {
+ if (p->size == 3) //Check family state.
+ int_party_calc_state(p);
+ else //Check even share range.
+ if (member->lv < p->min_lv || member->lv > p->max_lv || p->family) {
if (p->family) p->family = 0; //Family state broken.
int_party_check_lv(p);
- } else if (p->size == 3) //Check family state.
- int_party_calc_state(p);
+ }
mapif_party_memberadded(fd, party_id, member->account_id, member->char_id, 0);
mapif_party_info(-1, &p->party);
return 0;
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index e3056f8d5..79fb57a95 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -617,12 +617,13 @@ int mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *member
p->party.member[i].leader=0;
if (p->party.member[i].online) p->party.count++;
p->size++;
- if (member->lv < p->min_lv || member->lv > p->max_lv || p->family)
- {
+ if (p->size == 3) //Check family state.
+ int_party_calc_state(p);
+ else //Check even share range.
+ if (member->lv < p->min_lv || member->lv > p->max_lv || p->family) {
if (p->family) p->family = 0; //Family state broken.
int_party_check_lv(p);
- } else if (p->size == 3) //Check family state.
- int_party_calc_state(p);
+ }
mapif_party_memberadded(fd,party_id,member->account_id,member->char_id,0);
mapif_party_info(-1,&p->party);