Procházet zdrojové kódy

Added optional 'dragon color' parameter to @mount. (tid:79844)
http://rathena.org/board/topic/79844-mount/

Signed-off-by: Euphy <euphy.raliel@rathena.org>

Euphy před 11 roky
rodič
revize
877af1cfab
3 změnil soubory, kde provedl 16 přidání a 7 odebrání
  1. 3 3
      doc/atcommands.txt
  2. 1 1
      doc/script_commands.txt
  3. 12 3
      src/map/atcommand.c

+ 3 - 3
doc/atcommands.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //===== By: ==================================================
 //= rAthena Dev Team
 //= rAthena Dev Team
 //===== Last Updated: ========================================
 //===== Last Updated: ========================================
-//= 20140126
+//= 20140211
 //===== Description: =========================================
 //===== Description: =========================================
 //= List of available atcommands and their functions.
 //= List of available atcommands and their functions.
 //============================================================
 //============================================================
@@ -923,10 +923,10 @@ Summons the specified amount of spirit spheres around you.
 
 
 ---------------------------------------
 ---------------------------------------
 
 
-@mount
+@mount {<dragon color 1-5>}
 @mount2
 @mount2
 
 
-Toggles mounting/unmounting a peco (@mount) or cash mount (@mount2).
+Toggles mounting/unmounting a job mount (@mount) or cash mount (@mount2).
 
 
 ---------------------------------------
 ---------------------------------------
 
 

+ 1 - 1
doc/script_commands.txt

@@ -2904,7 +2904,7 @@ Example:
 
 
 *getguildmember <guild id>{,<type>};
 *getguildmember <guild id>{,<type>};
 
 
-This command will find all members of a specified guildand returns their names 
+This command will find all members of a specified guild and returns their names 
 (or character id or account id depending on the value of "type") into an array
 (or character id or account id depending on the value of "type") into an array
 of temporary global variables.
 of temporary global variables.
 
 

+ 12 - 3
src/map/atcommand.c

@@ -4074,12 +4074,21 @@ ACMD_FUNC(mount_peco)
 	}
 	}
 
 
 	if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc_checkskill(sd,RK_DRAGONTRAINING) > 0 ) {
 	if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc_checkskill(sd,RK_DRAGONTRAINING) > 0 ) {
-		if( !(sd->sc.option&OPTION_DRAGON1) ) {
+		if( !(sd->sc.option&OPTION_DRAGON) ) {
+			unsigned int option = OPTION_DRAGON1;
+			if( message[0] ) {
+				int color = atoi(message);
+				option = ( color == 2 ? OPTION_DRAGON2 :
+				           color == 3 ? OPTION_DRAGON3 :
+				           color == 4 ? OPTION_DRAGON4 :
+				           color == 5 ? OPTION_DRAGON5 :
+				                        OPTION_DRAGON1 );
+			}
 			clif_displaymessage(sd->fd,msg_txt(sd,1119)); // You have mounted your Dragon.
 			clif_displaymessage(sd->fd,msg_txt(sd,1119)); // You have mounted your Dragon.
-			pc_setoption(sd, sd->sc.option|OPTION_DRAGON1);
+			pc_setoption(sd, sd->sc.option|option);
 		} else {
 		} else {
 			clif_displaymessage(sd->fd,msg_txt(sd,1120)); // You have released your Dragon.
 			clif_displaymessage(sd->fd,msg_txt(sd,1120)); // You have released your Dragon.
-			pc_setoption(sd, sd->sc.option&~OPTION_DRAGON1);
+			pc_setoption(sd, sd->sc.option&~OPTION_DRAGON);
 		}
 		}
 		return 0;
 		return 0;
 	}
 	}