Browse Source

- Should have fixed manner being reset to 0 on logout while muted.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8621 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 năm trước cách đây
mục cha
commit
d3b4aa4bbf
3 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 2 0
      Changelog-Trunk.txt
  2. 1 0
      src/map/atcommand.c
  3. 2 1
      src/map/status.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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/09/04
+	* Should have fixed manner being reset to 0 on logout while muted.
+	  [Skotlex]
 	* Removed status_get_sc_tick, duration and chance are now both handled by
 	  status_get_sc_def (this means status change duration and success rate
 	  both will always follow the very same formula) [Skotlex]

+ 1 - 0
src/map/atcommand.c

@@ -8767,6 +8767,7 @@ int atcommand_unmute(
 
 	if((pl_sd=map_nick2sd((char *) message)) != NULL) {
 		if(pl_sd->sc.data[SC_NOCHAT].timer!=-1) {
+			pl_sd->status.manner = 0;
 			status_change_end(&pl_sd->bl,SC_NOCHAT,-1);
 			clif_displaymessage(sd->fd,"Player unmuted");
 		}

+ 2 - 1
src/map/status.c

@@ -6015,7 +6015,8 @@ int status_change_end( struct block_list* bl , int type,int tid )
 			break;
 		case SC_NOCHAT:
 			if (sd) {
-				if (sd->status.manner < 0) sd->status.manner = 0;
+				if (sd->status.manner < 0 && tid != -1)
+				  	sd->status.manner = 0;
 				clif_updatestatus(sd,SP_MANNER);
 			}
 			break;