Browse Source

- Added a check to remove exp-even-share when someone leaves a party.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5855 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 years ago
parent
commit
34eeb7cd5b
3 changed files with 13 additions and 0 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 6 0
      src/char/int_party.c
  3. 6 0
      src/char_sql/int_party.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/04/01
 2006/04/01
+	* Added a exp-even-share check when someone leaves a party. [Skotlex]
 	* Added function clif_changetraplook to handle changing the appearance of
 	* Added function clif_changetraplook to handle changing the appearance of
 	  traps as they are triggered. Fixes all the nullpos related to trap usage.
 	  traps as they are triggered. Fixes all the nullpos related to trap usage.
 	  [Skotlex]
 	  [Skotlex]

+ 6 - 0
src/char/int_party.c

@@ -541,6 +541,12 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) {
 			{
 			{
 				mapif_party_leaved(party_id, account_id, char_id);
 				mapif_party_leaved(party_id, account_id, char_id);
 				memset(&p->member[i], 0, sizeof(struct party_member));
 				memset(&p->member[i], 0, sizeof(struct party_member));
+				//Normally unneeded except when a family is even-sharing
+				//and one of the three leaves the party.
+				if(p->exp && !party_check_exp_share(p)){
+					p->exp=0;
+					mapif_party_optionchanged(fd,p,0,0);
+				}
 				if (party_check_empty(p) == 0)
 				if (party_check_empty(p) == 0)
 					mapif_party_info(-1, p);// まだ人がいるのでデ?タ送信
 					mapif_party_info(-1, p);// まだ人がいるのでデ?タ送信
 				return 0;
 				return 0;

+ 6 - 0
src/char_sql/int_party.c

@@ -633,6 +633,12 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id)
 	} else {
 	} else {
 		inter_party_tosql(p,PS_DELMEMBER,i);
 		inter_party_tosql(p,PS_DELMEMBER,i);
 		memset(&p->member[i], 0, sizeof(struct party_member));
 		memset(&p->member[i], 0, sizeof(struct party_member));
+		//Normally unneeded except when a family is even-sharing
+		//and one of the three leaves the party.
+		if(p->exp && !party_check_exp_share(p) ){
+			p->exp=0;
+			mapif_party_optionchanged(fd,p,0,0);
+		}
 	}
 	}
 		
 		
 	if (party_check_empty(p) == 0)
 	if (party_check_empty(p) == 0)