浏览代码

- 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://svn.code.sf.net/p/rathena/svn/trunk@8197 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父节点
当前提交
9456f83ac2
共有 3 个文件被更改,包括 14 次插入8 次删除
  1. 4 0
      Changelog-Trunk.txt
  2. 5 4
      src/char/int_party.c
  3. 5 4
      src/char_sql/int_party.c

+ 4 - 0
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]

+ 5 - 4
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;

+ 5 - 4
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);