Explorar o código

- Added blocking of @me when muted or in berserk status.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7822 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex %!s(int64=19) %!d(string=hai) anos
pai
achega
8c8732ede2
Modificáronse 2 ficheiros con 5 adicións e 0 borrados
  1. 1 0
      Changelog-Trunk.txt
  2. 4 0
      src/map/atcommand.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.
 
 2006/07/21
+	* Added blocking of @me when muted or in berserk status. [Skotlex]
 	* Corrected the @follow timer not being deleted on logout. [Skotlex]
 	* Applied the homunculus code fixes provided by Toms. [Skotlex]
 	* battle_check_target will now tag homunculus as invalid target when the

+ 4 - 0
src/map/atcommand.c

@@ -9961,6 +9961,10 @@ int atcommand_me(
 	memset(tempmes, '\0', sizeof(tempmes));    
 	memset(atcmd_output, '\0', sizeof(atcmd_output));
 
+	if (sd->sc.count && //no "chatting" while muted.
+		(sd->sc.data[SC_BERSERK].timer!=-1 || sd->sc.data[SC_NOCHAT].timer != -1))
+		return -1;
+
 	if (!message || !*message) {
 		clif_displaymessage(fd, "Please, enter a message (usage: @me <message>).");
 		return -1;