当前位置: 首页>>代码示例>>C#>>正文


C# CommandEventArgs.GetInt32方法代码示例

本文整理汇总了C#中Server.Commands.CommandEventArgs.GetInt32方法的典型用法代码示例。如果您正苦于以下问题:C# CommandEventArgs.GetInt32方法的具体用法?C# CommandEventArgs.GetInt32怎么用?C# CommandEventArgs.GetInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Commands.CommandEventArgs的用法示例。


在下文中一共展示了CommandEventArgs.GetInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Animate_OnCommand

 public static void Animate_OnCommand(CommandEventArgs e)
 {
     if (e.Length == 6)
     {
         e.Mobile.Animate(e.GetInt32(0), e.GetInt32(1), e.GetInt32(2), e.GetBoolean(3), e.GetBoolean(4), e.GetInt32(5));
     }
     else
     {
         e.Mobile.SendMessage("Format: Animate <action> <frameCount> <repeatCount> <forward> <repeat> <delay>");
     }
 }
开发者ID:FreeReign,项目名称:forkuo,代码行数:11,代码来源:Handlers.cs

示例2: Dupe_OnCommand

 private static void Dupe_OnCommand(CommandEventArgs e)
 {
     int amount = 1;
     if (e.Length >= 1)
         amount = e.GetInt32(0);
     e.Mobile.Target = new DupeTarget(false, amount > 0 ? amount : 1);
     e.Mobile.SendMessage("What do you wish to dupe?");
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:Dupe.cs

示例3: RandomTalisman_OnCommand

		public static void RandomTalisman_OnCommand(CommandEventArgs e)
		{
			Mobile m = e.Mobile;
			int count = e.GetInt32(0);

			for (int i = 0; i < count; i++)
			{
				m.AddToBackpack(Loot.RandomTalisman());
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:10,代码来源:BaseTalisman.cs

示例4: AnimateMe_OnCommand

 public static void AnimateMe_OnCommand(CommandEventArgs e)
 {
     if (e.Length == 1)
     {
         e.Mobile.Animate(e.GetInt32(0), 8, 1, true, false, 0);
     }
     else
     {
         e.Mobile.SendMessage("Format: AnimateMe <action> ");
     }
 }
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:11,代码来源:SkillUtilities.cs

示例5: Props_OnCommand

		private static void Props_OnCommand( CommandEventArgs e )
		{
			if ( e.Length == 1 )
			{
				IEntity ent = World.FindEntity( e.GetInt32( 0 ) );

				if ( ent == null )
					e.Mobile.SendMessage( "No object with that serial was found." );
				else if ( !BaseCommand.IsAccessible( e.Mobile, ent ) )
					e.Mobile.SendMessage( "That is not accessible." );
				else
					e.Mobile.SendGump( new PropertiesGump( e.Mobile, ent ) );
			}
			else
			{
				e.Mobile.Target = new PropsTarget();
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:18,代码来源:Properties.cs

示例6: SpawnEditorGo_OnCommand

		private static void SpawnEditorGo_OnCommand(CommandEventArgs e)
		{
			if (e == null)
			{
				return;
			}

			Mobile from = e.Mobile;

			// Make sure a map name was given at least
			if (from != null && e.Length >= 1)
			{
				// Get the map
				Map NewMap = null;
				string MapName = e.Arguments[0];

				// Convert the xml map value to a real map object
				if (string.Compare(MapName, Map.Trammel.Name, true) == 0)
				{
					NewMap = Map.Trammel;
				}
				else if (string.Compare(MapName, Map.Felucca.Name, true) == 0)
				{
					NewMap = Map.Felucca;
				}
				else if (string.Compare(MapName, Map.Ilshenar.Name, true) == 0)
				{
					NewMap = Map.Ilshenar;
				}
				else if (string.Compare(MapName, Map.Malas.Name, true) == 0)
				{
					NewMap = Map.Malas;
				}
				else if (string.Compare(MapName, Map.Tokuno.Name, true) == 0)
				{
					NewMap = Map.Tokuno;
				}
				else
				{
					from.SendMessage("Map '{0}' does not exist!", MapName);
					return;
				}

				// Now that the map has been determined, continue
				// Check if the request is to simply change maps
				if (e.Length == 1)
				{
					// Map Change ONLY
					from.Map = NewMap;
				}
				else if (e.Length == 3)
				{
					// Map & X Y ONLY
					if (NewMap != null)
					{
						int x = e.GetInt32(1);
						int y = e.GetInt32(2);
						int z = NewMap.GetAverageZ(x, y);
						from.Map = NewMap;
						from.Location = new Point3D(x, y, z);
					}
				}
				else if (e.Length == 4)
				{
					// Map & X Y Z
					from.Map = NewMap;
					from.Location = new Point3D(e.GetInt32(1), e.GetInt32(2), e.GetInt32(3));
				}
				else
				{
					from.SendMessage("Format: XmlGo <map> | <map> <x> <y> [z]");
				}
			}
		}
开发者ID:mtPrimo,项目名称:ServUO,代码行数:74,代码来源:XmlSpawner2.cs

示例7: OnCommand_RemoveIssue

		private static void OnCommand_RemoveIssue( CommandEventArgs e )
		{
			Mobile m = e.Mobile;

			if ( m == null )
				return;

			if ( !TrackerSystem.Enabled && m.AccessLevel == AccessLevel.Player )
			{
				m.SendMessage( "The tracker is currently offline." );
				return;
			}

			if ( e.Length == 1 )
			{
				int id = e.GetInt32( 0 );

				TrackerEntry entry = TrackerPersistance.FindIssue( id );
				if ( entry != null )
				{
					entry.Delete();
					e.Mobile.SendMessage( "The tracker entry has been removed." );
				}
				else
				{
					e.Mobile.SendMessage( "There was no tracker entry by that id." );
				}
			}
			else
			{
				e.Mobile.SendMessage( "Usage: [RemoveIssue <IssueID>" );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:33,代码来源:TrackerSystem.cs

示例8: GrantTownSilver_OnCommand

		public static void GrantTownSilver_OnCommand( CommandEventArgs e )
		{
			Town town = FromRegion( e.Mobile.Region );

			if ( town == null )
				e.Mobile.SendMessage( "You are not in a faction town." );
			else if ( e.Length == 0 )
				e.Mobile.SendMessage( "Format: GrantTownSilver <amount>" );
			else
			{
				town.Silver += e.GetInt32( 0 );
				e.Mobile.SendMessage( "You have granted {0:N0} silver to the town. It now has {1:N0} silver.", e.GetInt32( 0 ), town.Silver );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:14,代码来源:Town.cs

示例9: InternalZ_OnCommand

		private static void InternalZ_OnCommand( CommandEventArgs e, bool outline )
		{
			if ( e.Length >= 2 )
			{
				string[] subArgs = new string[e.Length - 1];

				for ( int i = 0; i < subArgs.Length; ++i )
					subArgs[i] = e.Arguments[i + 1];

				BoundingBoxPicker.Begin( e.Mobile, new BoundingBoxCallback( TileBox_Callback ), new TileState( TileZType.Fixed, e.GetInt32( 0 ), subArgs, outline ) );
			}
			else
			{
				e.Mobile.SendMessage( "Format: {0}Z <z> <type> [params] [set {{<propertyName> <value> ...}}]", outline ? "Outline" : "Tile" );
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:16,代码来源:Add.cs

示例10: InternalXYZ_OnCommand

		private static void InternalXYZ_OnCommand( CommandEventArgs e, bool outline )
		{
			if ( e.Length >= 6 )
			{
				Point3D p = new Point3D( e.GetInt32( 0 ), e.GetInt32( 1 ), e.GetInt32( 4 ) );
				Point3D p2 = new Point3D( p.X + e.GetInt32( 2 ) - 1, p.Y + e.GetInt32( 3 ) - 1, e.GetInt32( 4 ) );

				string[] subArgs = new string[e.Length - 5];

				for ( int i = 0; i < subArgs.Length; ++i )
					subArgs[i] = e.Arguments[i + 5];

				Add.Invoke( e.Mobile, p, p2, subArgs, null, outline, false );
			}
			else
			{
				e.Mobile.SendMessage( "Format: {0}XYZ <x> <y> <w> <h> <z> <type> [params] [set {{<propertyName> <value> ...}}]", outline ? "Outline" : "Tile" );
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:19,代码来源:Add.cs

示例11: IncXYZ_OnCommand

		public static void IncXYZ_OnCommand( CommandEventArgs e )
		{
			if( e.Length == 3 )
			{
				e.Mobile.Target = new IncXYZTarget( e.GetInt32( 0 ), e.GetInt32( 1 ), e.GetInt32( 2 ) );
			}
			else
			{
				e.Mobile.SendMessage( "Format: IncXYZ <x> <y> <z>" );
			}
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:11,代码来源:Handlers.cs

示例12: Control_OnCommand

        private static void Control_OnCommand( CommandEventArgs e )
        {
            Mobile from = e.Mobile;

            e.GetInt32( 0 );

            if ( from != null )
            {
                from.SendMessage( "Wybierz kogo chcesz kontrolowac" );
                //"Choose the target to control..."

                from.Target = new InternalTarget( e.Arguments );
            }
        }
开发者ID:Telm,项目名称:RunUO_EME,代码行数:14,代码来源:Control.cs

示例13: Control_OnCommand

        private static void Control_OnCommand(CommandEventArgs e)
        {
            Mobile from = e.Mobile;

            e.GetInt32(0);

            if (from != null)
            {
                from.SendMessage("Ciblez le mobile à controler ?");
                //"Choose the target to control..."

                from.Target = new ControlTarget(e.Arguments);
            }
        }
开发者ID:FreeReign,项目名称:runuo-extended,代码行数:14,代码来源:StaffCommands.cs

示例14: PrivSound_OnCommand

		public static void PrivSound_OnCommand( CommandEventArgs e )
		{
			if( e.Length == 1 )
				e.Mobile.Target = new PrivSoundTarget( e.GetInt32( 0 ) );
			else
				e.Mobile.SendMessage( "Format: PrivSound <index>" );
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:7,代码来源:Handlers.cs

示例15: Go_OnCommand

        private static void Go_OnCommand(CommandEventArgs e)
        {
            Mobile from = e.Mobile;

            if (e.Length == 0)
            {
                GoGump.DisplayTo(from);
                return;
            }

            if (e.Length == 1)
            {
                try
                {
                    int ser = e.GetInt32(0);

                    IEntity ent = World.FindEntity(ser);

                    if (ent is Item)
                    {
                        Item item = (Item)ent;

                        Map map = item.Map;
                        Point3D loc = item.GetWorldLocation();

                        Mobile owner = item.RootParent as Mobile;

                        if (owner != null && (owner.Map != null && owner.Map != Map.Internal) && !BaseCommand.IsAccessible(from, owner) /* !from.CanSee( owner )*/)
                        {
                            from.SendMessage("You can not go to what you can not see.");
                            return;
                        }
                        else if (owner != null && (owner.Map == null || owner.Map == Map.Internal) && owner.Hidden && owner.AccessLevel >= from.AccessLevel)
                        {
                            from.SendMessage("You can not go to what you can not see.");
                            return;
                        }
                        else if (!FixMap(ref map, ref loc, item))
                        {
                            from.SendMessage("That is an internal item and you cannot go to it.");
                            return;
                        }

                        from.MoveToWorld(loc, map);

                        return;
                    }
                    else if (ent is Mobile)
                    {
                        Mobile m = (Mobile)ent;

                        Map map = m.Map;
                        Point3D loc = m.Location;

                        Mobile owner = m;

                        if (owner != null && (owner.Map != null && owner.Map != Map.Internal) && !BaseCommand.IsAccessible(from, owner) /* !from.CanSee( owner )*/)
                        {
                            from.SendMessage("You can not go to what you can not see.");
                            return;
                        }
                        else if (owner != null && (owner.Map == null || owner.Map == Map.Internal) && owner.Hidden && owner.AccessLevel >= from.AccessLevel)
                        {
                            from.SendMessage("You can not go to what you can not see.");
                            return;
                        }
                        else if (!FixMap(ref map, ref loc, m))
                        {
                            from.SendMessage("That is an internal mobile and you cannot go to it.");
                            return;
                        }

                        from.MoveToWorld(loc, map);

                        return;
                    }
                    else
                    {
                        string name = e.GetString(0);
                        Map map;

                        for (int i = 0; i < Map.AllMaps.Count; ++i)
                        {
                            map = Map.AllMaps[i];

                            if (map.MapIndex == 0x7F || map.MapIndex == 0xFF)
                                continue;

                            if (Insensitive.Equals(name, map.Name))
                            {
                                from.Map = map;
                                return;
                            }
                        }

                        Dictionary<string, Region> list = from.Map.Regions;

                        foreach (KeyValuePair<string, Region> kvp in list)
                        {
                            Region r = kvp.Value;
//.........这里部分代码省略.........
开发者ID:FreeReign,项目名称:forkuo,代码行数:101,代码来源:Handlers.cs


注:本文中的Server.Commands.CommandEventArgs.GetInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。