MudGame commands are corrected to work with the new abstract BaseCommands class.

This commit is contained in:
Scionwest_cp 2011-09-19 19:15:51 -07:00
parent 974cc0f9b8
commit 16ef50f59a
13 changed files with 13 additions and 13 deletions

View file

@ -28,7 +28,7 @@ public class CommandCreate : BaseCommand
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <param name="player"></param> /// <param name="player"></param>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Check if the player has the proper security role in order to create content for the game world. //Check if the player has the proper security role in order to create content for the game world.
if ((player.Role != SecurityRoles.Admin) && (player.Role != SecurityRoles.GM)) if ((player.Role != SecurityRoles.Admin) && (player.Role != SecurityRoles.GM))

View file

@ -13,7 +13,7 @@ public class CommandCreateRoom : BaseCommand
Help.Add("Creates a Room within the Admin's current Realm>Zone"); Help.Add("Creates a Room within the Admin's current Realm>Zone");
} }
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
if ((player.Role == SecurityRoles.Admin) || (player.Role == SecurityRoles.GM)) if ((player.Role == SecurityRoles.Admin) || (player.Role == SecurityRoles.GM))
{ {

View file

@ -25,7 +25,7 @@ public class CommandLinkRoom : BaseCommand
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <param name="player"></param> /// <param name="player"></param>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Check if the Player has the correct privileges to Link Rooms together. //Check if the Player has the correct privileges to Link Rooms together.
//If they are not a Admin or GM then the command will bail. //If they are not a Admin or GM then the command will bail.

View file

@ -18,7 +18,7 @@ public class CommandList : BaseCommand
Help.Add("RealmName>ZoneName>Rooms"); Help.Add("RealmName>ZoneName>Rooms");
} }
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
command = command.Substring("List".Length).Trim(); command = command.Substring("List".Length).Trim();
String[] data = command.ToLower().Split('>'); String[] data = command.ToLower().Split('>');

View file

@ -10,7 +10,7 @@ public class CommandTeleport : BaseCommand
Help.Add("Example: Teleport Billy MyRealm>MyZone>MyRoom"); Help.Add("Example: Teleport Billy MyRealm>MyZone>MyRoom");
} }
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
command = command.Substring("teleport".Length).Trim(); command = command.Substring("teleport".Length).Trim();
String[] data = command.ToLower().Split(' '); String[] data = command.ToLower().Split(' ');

View file

@ -14,7 +14,7 @@ public class CommandClear : BaseCommand
/// <summary> /// <summary>
/// Constructor for the class. /// Constructor for the class.
/// </summary> /// </summary>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Call the flush method to clear the players console screen of all text. //Call the flush method to clear the players console screen of all text.
player.FlushConsole(); player.FlushConsole();

View file

@ -19,7 +19,7 @@ public class CommandExit : BaseCommand
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <param name="player"></param> /// <param name="player"></param>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Check if the game is multiplayer. //Check if the game is multiplayer.
//Multiplayer games require disconnecting from the server and letting other players in the same Room know //Multiplayer games require disconnecting from the server and letting other players in the same Room know

View file

@ -18,7 +18,7 @@ public class CommandGetTime : BaseCommand
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <param name="player"></param> /// <param name="player"></param>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Send the returned String containing the World Time to the player. //Send the returned String containing the World Time to the player.
player.Send(player.ActiveGame.WorldTime.GetCurrentWorldTime()); player.Send(player.ActiveGame.WorldTime.GetCurrentWorldTime());

View file

@ -18,7 +18,7 @@ public class CommandHelp : BaseCommand
/// <summary> /// <summary>
/// Constructor for the class. /// Constructor for the class.
/// </summary> /// </summary>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Check if we have a topic that the player wants help with. If there is nothing after the Help word //Check if we have a topic that the player wants help with. If there is nothing after the Help word
//in the command, then the user didn't supply us with a topic. //in the command, then the user didn't supply us with a topic.

View file

@ -17,7 +17,7 @@ public class CommandLook : BaseCommand
/// <summary> /// <summary>
/// Constructor for the class. /// Constructor for the class.
/// </summary> /// </summary>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//If the players Room is null, then we need to let them know that they are //If the players Room is null, then we need to let them know that they are
//currently not residing within a Room. If this occures for some reason, the player will //currently not residing within a Room. If this occures for some reason, the player will

View file

@ -14,7 +14,7 @@ public class CommandSave : BaseCommand
/// <summary> /// <summary>
/// Constructor for the class. /// Constructor for the class.
/// </summary> /// </summary>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Save the player to the hard-disk. //Save the player to the hard-disk.
player.Save(); player.Save();

View file

@ -17,7 +17,7 @@ public class CommandSay : BaseCommand
/// <summary> /// <summary>
/// Constructor for the class. /// Constructor for the class.
/// </summary> /// </summary>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Check if the user only said 'Say ' or 'Say' with no message content. //Check if the user only said 'Say ' or 'Say' with no message content.
if (command.Length <= 4) if (command.Length <= 4)

View file

@ -47,7 +47,7 @@ public class CommandWalk : BaseCommand
/// <summary> /// <summary>
/// Constructor for the class. /// Constructor for the class.
/// </summary> /// </summary>
public void Execute(String command, BaseCharacter player) public override void Execute(String command, BaseCharacter player)
{ {
//Since the walk command requires a second word (ex: walk north) //Since the walk command requires a second word (ex: walk north)
//we split the words into an array so they are seperate. //we split the words into an array so they are seperate.