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


C# Corpse.IsCriminalAction方法代码示例

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


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

示例1: CanUseWithDeed

 public static bool CanUseWithDeed(Mobile from, Corpse corpse)
 {
     if (corpse.IsCriminalAction(from))
     {
         from.SendMessage("You did not earn the right to use this creature in the deed.");
         return false;
     }
     else return true;
 }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:9,代码来源:HuntBodUtility.cs

示例2: OnCarve


//.........这里部分代码省略.........
				new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

				if ( feathers != 0 )
				{
					corpse.AddCarvedItem( new Feather( feathers ), from );
					from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
				}

				if ( wool != 0 )
				{
					corpse.AddCarvedItem( new TaintedWool( wool ), from );
					from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
				}

				if ( meat != 0 )
				{
					if ( MeatType == MeatType.Ribs )
						corpse.AddCarvedItem( new RawRibs( meat ), from );
					else if ( MeatType == MeatType.Bird )
						corpse.AddCarvedItem( new RawBird( meat ), from );
					else if ( MeatType == MeatType.LambLeg )
						corpse.AddCarvedItem( new RawLambLeg( meat ), from );

					from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
				}

				if ( hides != 0 )
				{
					Item holding = from.Weapon as Item;
					if ( Core.AOS && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) )
					{
						Item leather = null;

						switch ( HideType )
						{
							case HideType.Regular: leather = new Leather( hides ); break;
							case HideType.Spined: leather = new SpinedLeather( hides ); break;
							case HideType.Horned: leather = new HornedLeather( hides ); break;
							case HideType.Barbed: leather = new BarbedLeather( hides ); break;
						}

						if ( leather != null )
						{
							if ( !from.PlaceInBackpack( leather ) )
							{
								corpse.DropItem( leather );
								from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
							}
							else
								from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
						}
					}
					else
					{
						if ( HideType == HideType.Regular )
							corpse.DropItem( new Hides( hides ) );
						else if ( HideType == HideType.Spined )
							corpse.DropItem( new SpinedHides( hides ) );
						else if ( HideType == HideType.Horned )
							corpse.DropItem( new HornedHides( hides ) );
						else if ( HideType == HideType.Barbed )
							corpse.DropItem( new BarbedHides( hides ) );

						from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
					}
				}

				if ( scales != 0 )
				{
					ScaleType sc = this.ScaleType;

					switch ( sc )
					{
						case ScaleType.Red:     corpse.AddCarvedItem( new RedScales( scales ), from ); break;
						case ScaleType.Yellow:  corpse.AddCarvedItem( new YellowScales( scales ), from ); break;
						case ScaleType.Black:   corpse.AddCarvedItem( new BlackScales( scales ), from ); break;
						case ScaleType.Green:   corpse.AddCarvedItem( new GreenScales( scales ), from ); break;
						case ScaleType.White:   corpse.AddCarvedItem( new WhiteScales( scales ), from ); break;
						case ScaleType.Blue:    corpse.AddCarvedItem( new BlueScales( scales ), from ); break;
						case ScaleType.All:
						{
							corpse.AddCarvedItem( new RedScales( scales ), from );
							corpse.AddCarvedItem( new YellowScales( scales ), from );
							corpse.AddCarvedItem( new BlackScales( scales ), from );
							corpse.AddCarvedItem( new GreenScales( scales ), from );
							corpse.AddCarvedItem( new WhiteScales( scales ), from );
							corpse.AddCarvedItem( new BlueScales( scales ), from );
							break;
						}
					}

					from.SendMessage( "You cut away some scales, but they remain on the corpse." );
				}

				corpse.Carved = true;

				if ( corpse.IsCriminalAction( from ) )
					from.CriminalAction( true );
			}
		}
开发者ID:greeduomacro,项目名称:uotitan,代码行数:101,代码来源:BaseCreature.cs

示例3: OnCarve


//.........这里部分代码省略.........
                from.SendAsciiMessage( "You see nothing useful to carve from the corpse." );
            }
            else
            {
                if ( corpse.Map == Map.Felucca )
                {
                    feathers *= 2;
                    wool *= 2;
                    hides *= 2;
                }

                new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

                if ( feathers != 0 )
                {
                    corpse.DropItem( new Feather( feathers ) );
                    from.SendAsciiMessage( "You pluck the bird. The feathers are now on the corpse." );
                }

                if ( wool != 0 )
                {
                    corpse.DropItem( new Wool( wool ) );
                    from.SendAsciiMessage( "You shear it, and the wool is now on the corpse." );
                }

                if ( meat != 0 )
                {
                    if ( MeatType == MeatType.Ribs )
                        corpse.DropItem( new RawRibs( meat ) );
                    else if ( MeatType == MeatType.Bird )
                        corpse.DropItem( new RawBird( meat ) );
                    else if ( MeatType == MeatType.LambLeg )
                        corpse.DropItem( new RawLambLeg( meat ) );

                    from.SendAsciiMessage( "You carve some meat, which remains on the corpse." );
                }

                if ( lightfur != 0 )
                {
                    if ( LightFurType == LightFurType.LightFur )
                        corpse.DropItem( new LightFur( lightfur ) );

                    from.SendAsciiMessage ( "You skin it, and the fur is now on the corpse." );
                }

                if ( darkfur != 0 )
                {
                    if ( DarkFurType == DarkFurType.DarkFur )
                        corpse.DropItem( new DarkFur( darkfur ) );

                    from.SendAsciiMessage ( "You skin it, and the fur is now on the corpse." );
                }

                if ( hides != 0 )
                {
                    if ( HideType == HideType.Regular )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Spined )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Horned )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Barbed )
                        corpse.DropItem( new Hides( hides ) );

                    from.SendAsciiMessage( "You skin it, and the hides are now on the corpse." );
                }

                if ( scales != 0 )
                {
                    ScaleType sc = this.ScaleType;

                    switch ( sc )
                    {
                        case ScaleType.Red:		corpse.DropItem( new RedScales( scales ) ); break;
                        case ScaleType.Yellow:	corpse.DropItem( new YellowScales( scales ) ); break;
                        case ScaleType.Black:	corpse.DropItem( new BlackScales( scales ) ); break;
                        case ScaleType.Green:	corpse.DropItem( new GreenScales( scales ) ); break;
                        case ScaleType.White:	corpse.DropItem( new WhiteScales( scales ) ); break;
                        case ScaleType.Blue:	corpse.DropItem( new BlueScales( scales ) ); break;
                        case ScaleType.All:
                        {
                            corpse.DropItem( new RedScales( scales ) );
                            corpse.DropItem( new YellowScales( scales ) );
                            corpse.DropItem( new BlackScales( scales ) );
                            corpse.DropItem( new GreenScales( scales ) );
                            corpse.DropItem( new WhiteScales( scales ) );
                            corpse.DropItem( new BlueScales( scales ) );
                            break;
                        }
                    }

                    from.SendAsciiMessage( "You cut away some scales, but they remain on the corpse." );
                }

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:101,代码来源:BaseCreature.cs

示例4: OnCarve


//.........这里部分代码省略.........
                        else if ( HideType == HideType.Spined )
                            item = new SpinedLeather( hides );
                        else if ( HideType == HideType.Horned )
                            item = new HornedLeather( hides );
                        else if ( HideType == HideType.Barbed )
                            item = new BarbedLeather( hides );

                        if ( item != null )
                        {
                            if ( from.AddToBackpack( item ) )
                            {
                                from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
                            }
                            else
                            {
                                corpse.AddCarvedItem( item, from );
                                from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
                            }
                        }
                    }
                    else
                    {
                        if ( HideType == HideType.Regular )
                            corpse.AddCarvedItem( new Hides( hides ), from );
                        else if ( HideType == HideType.Spined )
                            corpse.AddCarvedItem( new SpinedHides( hides ), from );
                        else if ( HideType == HideType.Horned )
                            corpse.AddCarvedItem( new HornedHides( hides ), from );
                        else if ( HideType == HideType.Barbed )
                            corpse.AddCarvedItem( new BarbedHides( hides ), from );

                        from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
                    }
                }

                if ( scales != 0 )
                {
                    ScaleType sc = this.ScaleType;

                    switch ( sc )
                    {
                        case ScaleType.Red:
                            corpse.AddCarvedItem( new RedScales( scales ), from );
                            break;
                        case ScaleType.Yellow:
                            corpse.AddCarvedItem( new YellowScales( scales ), from );
                            break;
                        case ScaleType.Black:
                            corpse.AddCarvedItem( new BlackScales( scales ), from );
                            break;
                        case ScaleType.Green:
                            corpse.AddCarvedItem( new GreenScales( scales ), from );
                            break;
                        case ScaleType.White:
                            corpse.AddCarvedItem( new WhiteScales( scales ), from );
                            break;
                        case ScaleType.Blue:
                            corpse.AddCarvedItem( new BlueScales( scales ), from );
                            break;
                        case ScaleType.All:
                            {
                                corpse.AddCarvedItem( new RedScales( scales ), from );
                                corpse.AddCarvedItem( new YellowScales( scales ), from );
                                corpse.AddCarvedItem( new BlackScales( scales ), from );
                                corpse.AddCarvedItem( new GreenScales( scales ), from );
                                corpse.AddCarvedItem( new WhiteScales( scales ), from );
                                corpse.AddCarvedItem( new BlueScales( scales ), from );
                                break;
                            }
                    }

                    from.SendLocalizedMessage( 1079284 ); // You cut away some scales, but they remain on the corpse.
                }

                if ( blood != 0 )
                {
                    corpse.AddCarvedItem( new DragonsBlood( blood ), from );
                    from.SendLocalizedMessage( 1094946 ); // Some blood is left on the corpse.
                }

                if ( fur != 0 )
                {
                    if ( FurType == FurType.Green )
                        corpse.AddCarvedItem( new GreenFur( fur ), from );
                    else if ( FurType == FurType.Red )
                        corpse.AddCarvedItem( new RedFur( fur ), from );
                    else if ( FurType == FurType.Yellow )
                        corpse.AddCarvedItem( new YellowFur( fur ), from );
                    else if ( FurType == FurType.DarkGreen )
                        corpse.AddCarvedItem( new DarkGreenFur( fur ), from );

                    from.SendLocalizedMessage( 1112765 ); // You shear it, and the fur is now on the corpse.
                }

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:BaseCreature.cs

示例5: OnCarve

        public virtual void OnCarve( Mobile from, Corpse corpse )
        {
            int feathers = Feathers;
            int wool = Wool;
            int meat = Meat;
            int hides = Hides;
            int scales = Scales;

            if ( (feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned || IsBonded )
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
            else
            {
                if( Core.ML && from.Race == Race.Human )
                {
                    hides = (int)Math.Ceiling( hides * 1.1 );	//10% Bonus Only applies to Hides, Ore & Logs
                }

                if ( corpse.Map == Map.Felucca )
                {
                    feathers *= 2;
                    wool *= 2;
                    hides *= 2;
                }

                new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

                if ( feathers != 0 )
                {
                    corpse.DropItem( new Feather( feathers ) );
                    from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
                }

                if ( wool != 0 )
                {
                    corpse.DropItem( new Wool( wool ) );
                    from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
                }

                if ( meat != 0 )
                {
                    if ( MeatType == MeatType.Ribs )
                        corpse.DropItem( new RawRibs( meat ) );
                    else if ( MeatType == MeatType.Bird )
                        corpse.DropItem( new RawBird( meat ) );
                    else if ( MeatType == MeatType.LambLeg )
                        corpse.DropItem( new RawLambLeg( meat ) );

                    from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
                }

                if ( hides != 0 )
                {
                    if ( HideType == HideType.Regular )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Spined )
                        corpse.DropItem( new SpinedHides( hides ) );
                    else if ( HideType == HideType.Horned )
                        corpse.DropItem( new HornedHides( hides ) );
                    else if ( HideType == HideType.Barbed )
                        corpse.DropItem( new BarbedHides( hides ) );

                    from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
                }

                if ( scales != 0 )
                {
                    ScaleType sc = this.ScaleType;

                    switch ( sc )
                    {
                        case ScaleType.Red:		corpse.DropItem( new RedScales( scales ) ); break;
                        case ScaleType.Yellow:	corpse.DropItem( new YellowScales( scales ) ); break;
                        case ScaleType.Black:	corpse.DropItem( new BlackScales( scales ) ); break;
                        case ScaleType.Green:	corpse.DropItem( new GreenScales( scales ) ); break;
                        case ScaleType.White:	corpse.DropItem( new WhiteScales( scales ) ); break;
                        case ScaleType.Blue:	corpse.DropItem( new BlueScales( scales ) ); break;
                        case ScaleType.All:
                        {
                            corpse.DropItem( new RedScales( scales ) );
                            corpse.DropItem( new YellowScales( scales ) );
                            corpse.DropItem( new BlackScales( scales ) );
                            corpse.DropItem( new GreenScales( scales ) );
                            corpse.DropItem( new WhiteScales( scales ) );
                            corpse.DropItem( new BlueScales( scales ) );
                            break;
                        }
                    }

                    from.SendMessage( "You cut away some scales, but they remain on the corpse." );
                }

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
开发者ID:greeduomacro,项目名称:aediliszeta,代码行数:99,代码来源:BaseCreature.cs

示例6: isCorpseLootable

		private bool isCorpseLootable(PlayerMobile player, Corpse corpse)
		{
			if ( corpse.Owner == null || corpse.Deleted || corpse.Owner is PlayerMobile 
				|| (corpse.Owner is BaseCreature && ((BaseCreature)corpse.Owner).IsBonded) 
				|| !Daat99MasterLootersUtils.CheckLoot(corpse, player) || corpse.IsCriminalAction(player)
				)
					return false;
			return true;
		}
开发者ID:Jascen,项目名称:UOSmart,代码行数:9,代码来源:MasterLooterBackpack.cs

示例7: OnCarve

		public virtual void OnCarve( Mobile from, Corpse corpse, Item with )
		{
			int feathers = Feathers;
			int wool = Wool;
			int meat = Meat;
			int hides = Hides;

			if ( ( feathers == 0 && wool == 0 && meat == 0 && hides == 0 ) || Summoned || IsBonded || corpse.Animated )
			{
				if ( corpse.Animated )
					corpse.SendLocalizedMessageTo( from, 500464 ); // Use this on corpses to carve away meat and hide
				else
					from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
			else
			{
				if ( corpse.Map == Map.Felucca )
				{
					feathers *= 2;
					wool *= 2;
					hides *= 2;
				}

				new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

				if ( feathers != 0 )
				{
					corpse.AddCarvedItem( new Feather( feathers ), from );
					from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
				}

				if ( wool != 0 )
				{
					corpse.AddCarvedItem( new TaintedWool( wool ), from );
					from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
				}

				if ( meat != 0 )
				{
					if ( MeatType == MeatType.Ribs )
						corpse.AddCarvedItem( new RawRibs( meat ), from );
					else if ( MeatType == MeatType.Bird )
						corpse.AddCarvedItem( new RawBird( meat ), from );
					else if ( MeatType == MeatType.LambLeg )
						corpse.AddCarvedItem( new RawLambLeg( meat ), from );

					from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
				}

				if ( hides != 0 )
				{
					Item holding = from.Weapon as Item;

					if ( false && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) )
					{
						Item leather = null;

						switch ( HideType )
						{
							case HideType.Regular: leather = new Leather( hides ); break;
							case HideType.Spined: leather = new SpinedLeather( hides ); break;
							case HideType.Horned: leather = new HornedLeather( hides ); break;
							case HideType.Barbed: leather = new BarbedLeather( hides ); break;
						}

						if ( leather != null )
						{
							if ( !from.PlaceInBackpack( leather ) )
							{
								corpse.DropItem( leather );
								from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
							}
							else
							{
								from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
							}
						}
					}
					else
					{
						if ( HideType == HideType.Regular )
							corpse.DropItem( new Hides( hides ) );
						else if ( HideType == HideType.Spined )
							corpse.DropItem( new SpinedHides( hides ) );
						else if ( HideType == HideType.Horned )
							corpse.DropItem( new HornedHides( hides ) );
						else if ( HideType == HideType.Barbed )
							corpse.DropItem( new BarbedHides( hides ) );

						from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
					}
				}

				corpse.Carved = true;

				if ( corpse.IsCriminalAction( from ) )
					from.CriminalAction( true );
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:99,代码来源:BaseCreature.cs

示例8: OnCarve

		public virtual void OnCarve( Mobile from, Corpse corpse )
		{
			int feathers = Feathers;
			int wool = Wool;
			int meat = Meat;
			int hides = Hides;
			int scales = Scales;

			if ( (feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned || IsBonded )
			{
				from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
			}
			else
			{
				//	6/8/2004 - Pulse
				//		No longer doubles the resources from corpses if in Felucca, to re-add double resources
				//		un-comment the 6 lines of code below.
				//				if ( corpse.Map == Map.Felucca )
				//				{
				//					feathers *= 2;
				//					wool *= 2;
				//					hides *= 2;
				//				}

				new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

				if ( feathers != 0 )
				{
					corpse.DropItem( new Feather( feathers ) );
					from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
				}

				if ( wool != 0 )
				{
					corpse.DropItem( new Wool( wool ) );
					from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
				}

				if ( meat != 0 )
				{
					if ( MeatType == MeatType.Ribs )
						corpse.DropItem( new RawRibs( meat ) );
					else if ( MeatType == MeatType.Bird )
						corpse.DropItem( new RawBird( meat ) );
					else if ( MeatType == MeatType.LambLeg )
						corpse.DropItem( new RawLambLeg( meat ) );

					from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
				}

				if ( hides != 0 )
				{
					if ( HideType == HideType.Regular )
						corpse.DropItem( new Hides( hides ) );
					else if ( HideType == HideType.Spined )
						corpse.DropItem( new SpinedHides( hides ) );
					else if ( HideType == HideType.Horned )
						corpse.DropItem( new HornedHides( hides ) );
					else if ( HideType == HideType.Barbed )
						corpse.DropItem( new BarbedHides( hides ) );

					from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
				}

				if ( scales != 0 )
				{
					ScaleType sc = this.ScaleType;

					switch ( sc )
					{
						case ScaleType.Red:		corpse.DropItem( new RedScales( scales ) ); break;
						case ScaleType.Yellow:	corpse.DropItem( new YellowScales( scales ) ); break;
						case ScaleType.Black:	corpse.DropItem( new BlackScales( scales ) ); break;
						case ScaleType.Green:	corpse.DropItem( new GreenScales( scales ) ); break;
						case ScaleType.White:	corpse.DropItem( new WhiteScales( scales ) ); break;
						case ScaleType.Blue:	corpse.DropItem( new BlueScales( scales ) ); break;
						case ScaleType.All:
						{
							corpse.DropItem( new RedScales( scales ) );
							corpse.DropItem( new YellowScales( scales ) );
							corpse.DropItem( new BlackScales( scales ) );
							corpse.DropItem( new GreenScales( scales ) );
							corpse.DropItem( new WhiteScales( scales ) );
							corpse.DropItem( new BlueScales( scales ) );
							break;
						}
					}

					from.SendMessage( "You cut away some scales, but they remain on the corpse." );
				}

				corpse.Carved = true;

				if ( corpse.IsCriminalAction( from ) )
					from.CriminalAction( true );
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:97,代码来源:BaseCreature.cs

示例9: CorpseIsLootable

		//    determine if the corpse is ok to loot
		private static bool CorpseIsLootable( Mobile from, Corpse corpse, bool notify )
		{
			if ( null == corpse )
				return false;

			bool result = false;
			string notification = "";

			if ( corpse.Owner == from )
				notification = "You may not claim your own corpses.";
			else if ( corpse.Owner is PlayerMobile && !LootPlayers )
				notification = "You may not loot player corpses.";
			else
			{
				BaseCreature creature = corpse.Owner as BaseCreature;

				if ( null != creature && creature.IsBonded )
					notification = "You may not loot the corpses of bonded pets.";
				else if ( null != creature && creature.Fame <= FreelyLootableFame )
					result = true;
				else
					result = corpse.CheckLoot( from, null ) && !( corpse.IsCriminalAction( from ) );
			}

			if ( false == result && notify )
			{
				from.PlaySound( 1074 );		// no
				from.SendMessage( notification );
			}

			return result;
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:33,代码来源:XmlGrab.cs

示例10: OnCarve

        public virtual void OnCarve( Mobile from, Corpse corpse )
        {
            int feathers = Feathers;
            int wool = Wool;
            int meat = Meat;
            int hides = Hides;
            int scales = 0;//Scales;
            int furs = GenerateFurs( corpse );

            if ( (feathers == 0 && furs == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned )
            {
                from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
            }
            else
            {
                new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map );

                if ( feathers != 0 )
                {
                    corpse.DropItem( new Feather( feathers ) );
                    //from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse.
                }

                if ( wool != 0 )
                {
                    corpse.DropItem( new Wool( wool ) );
                    //from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse.
                }

                if ( meat != 0 )
                {
                    if ( MeatType == MeatType.Ribs )
                        corpse.DropItem( new RawRibs( meat ) );
                    else if ( MeatType == MeatType.Bird )
                        corpse.DropItem( new RawBird( meat ) );
                    else if ( MeatType == MeatType.LambLeg )
                        corpse.DropItem( new RawLambLeg( meat ) );

                    //from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse.
                }

                if ( hides != 0 )
                {
                    if ( HideType == HideType.Regular )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Spined )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Horned )
                        corpse.DropItem( new Hides( hides ) );
                    else if ( HideType == HideType.Barbed )
                        corpse.DropItem( new Hides( hides ) );
                }

                //if ( hides != 0 || furs != 0 )
                //	from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.

                corpse.Carved = true;

                if ( corpse.IsCriminalAction( from ) )
                    from.CriminalAction( true );
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:62,代码来源:BaseCreature.cs

示例11: CheckStealing

			public bool CheckStealing(Corpse corpse)
			{
				if (!corpse.IsCriminalAction(m_Thief))
					return true;

				try
				{
					if (m_Thief.AccessLevel == AccessLevel.Player)
					{
						RegionControl regstone = null;
						CustomRegion reg = null;
						if (corpse.Deleted == false)
							reg = CustomRegion.FindDRDTRegion(corpse);
						if (reg != null)
							regstone = reg.GetRegionControler();

						// if this region does not allow looting, fail
						if (regstone != null && regstone.BlockLooting == true)
							return false;
					}

				}
				catch (Exception ex)
				{
					Scripts.Commands.LogHelper.LogException(ex);
				}

				return true;
			}
开发者ID:zerodowned,项目名称:angelisland,代码行数:29,代码来源:Stealing.cs


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