當前位置: 首頁>>代碼示例>>C#>>正文


C# Items.Corpse類代碼示例

本文整理匯總了C#中Server.Items.Corpse的典型用法代碼示例。如果您正苦於以下問題:C# Corpse類的具體用法?C# Corpse怎麽用?C# Corpse使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Corpse類屬於Server.Items命名空間,在下文中一共展示了Corpse類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddBodyParts

 public override void AddBodyParts( BodyPartsContainer bpc, Corpse corpse )
 {
     base.AddBodyParts( bpc, corpse );
     DragonHead head = new DragonHead();
     head.Hue = 0;
     bpc.DropItem( head );
 }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:7,代碼來源:CopperDragon.cs

示例2: OnCarve

        public override void OnCarve(Mobile from, Corpse corpse, Item with)
        {
            if (corpse != null)
                corpse.DropItem(new DragonBlood(8));

            base.OnCarve(from, corpse, with);
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:7,代碼來源:ColdDrake.cs

示例3: GenerateFurs

 public override int GenerateFurs(Corpse c)
 {
     Item i = new LightFur();
     i.Amount = 2;
     c.DropItem( i );
     return 2;
 }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:7,代碼來源:PolarBear.cs

示例4: AddBodyParts

 public override void AddBodyParts( BodyPartsContainer bpc, Corpse corpse )
 {
     base.AddBodyParts( bpc, corpse );
     bpc.DropItem( new PorkHock( 1 ) );
     bpc.DropItem( new RawHam( 1 ) );
     bpc.DropItem( new RawBaconSlab( 1 ) );
 }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:7,代碼來源:Piglet.cs

示例5: CorpseContent

		public CorpseContent( Mobile beholder, Corpse beheld ) : base( 0x3C )
		{
			ArrayList items = beheld.EquipItems;
			int count = items.Count;

			EnsureCapacity( 5 + (count * 19) );

			long pos = m_Stream.Position;

			int written = 0;

			m_Stream.Write( (ushort) 0 );

			for ( int i = 0; i < count; ++i )
			{
				Item child = (Item)items[i];

				if ( !child.Deleted && child.Parent == beheld && beholder.CanSee( child ) )
				{
					m_Stream.Write( (int) child.Serial );
					m_Stream.Write( (ushort) child.ItemID );
					m_Stream.Write( (byte) 0 ); // signed, itemID offset
					m_Stream.Write( (ushort) child.Amount );
					m_Stream.Write( (short) child.X );
					m_Stream.Write( (short) child.Y );
					m_Stream.Write( (int) beheld.Serial );
					m_Stream.Write( (ushort) child.Hue );

					++written;
				}
			}

			m_Stream.Seek( pos, SeekOrigin.Begin );
			m_Stream.Write( (ushort) written );
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:35,代碼來源:Packets.cs

示例6: OnCarve

		public override void OnCarve( Mobile from, Corpse corpse, Item with )
		{
			base.OnCarve( from, corpse, with );

			corpse.DropItem( new Bloodmoss( Utility.RandomMinMax( 8, 16 ) ) );
			from.SendMessage( "You cut some bloodmoss from between the troll's toes; it remains on the corpse." );
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:7,代碼來源:Troll.cs

示例7: 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

示例8: AddBodyParts

 public override void AddBodyParts( BodyPartsContainer bpc, Corpse corpse )
 {
     base.AddBodyParts( bpc, corpse );
     Ribs ribs = new Ribs( 3 );
     ribs.Hue = 2935;
     ribs.Name = "flesh";
     ribs.RotStage = RotStage.Rotten;
     bpc.DropItem( ribs );
 }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:9,代碼來源:LesserFleshGolem.cs

示例9: OnCarve

 public override void OnCarve(Mobile from, Corpse corpse, Item with)
 {
     if (!corpse.Carved)
     {
         corpse.DropItem(new TitanTooth());
         from.SendMessage("Vous arrachez une dent au titan");
     }
     
     base.OnCarve(from, corpse, with);
 }
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:10,代碼來源:Titan.cs

示例10: OnCarve

        public override void OnCarve(Mobile from, Corpse corpse)
        {
            if (corpse.Carved == false)
            {
                base.OnCarve(from, corpse);

                new Blood(Utility.RandomMinMax(4650, 4655)).MoveToWorld(corpse.Location, corpse.Map);
                new GoblinEars().MoveToWorld(corpse.Location, corpse.Map);
                corpse.Delete();
            }
        }
開發者ID:greeduomacro,項目名稱:annox,代碼行數:11,代碼來源:GoblinElder.cs

示例11: CheckCorpseType

            public static bool CheckCorpseType(Mobile from, Corpse corpse, SmallBOD deed)
            {
                if (corpse != null && corpse.Owner != null)
                {
                    Type corpseOwnerType = corpse.Owner.GetType();

                    if (corpseOwnerType != null && deed.Type != null && corpseOwnerType == deed.Type)
                        return true;
                    else
                        from.SendMessage("The creature is not in the request.");
                }
                return false;
            }
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:13,代碼來源:HuntBodUtility.cs

示例12: CheckUseWithDeedTime

            public static bool CheckUseWithDeedTime(Mobile from, Corpse corpse)
            {
                DateTime dtCannAdd = corpse.TimeOfDeath + TimeSpan.FromSeconds(30.0);
                if (dtCannAdd > DateTime.Now)
                {
                    TimeSpan ts = dtCannAdd - DateTime.Now;

                    if (ts < TimeSpan.Zero)
                        ts = TimeSpan.Zero;

                    from.SendMessage("This corpse cannot be added yet, try again in {0} seconds.", ts.Seconds);
                    return false;
                }
                else return true;
            }
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:15,代碼來源:HuntBodUtility.cs

示例13: OnCarve

        public override void OnCarve(Mobile from, Corpse corpse, Item with)
        {
            if (corpse.Carved)
                base.OnCarve(from, corpse, with);

            if (Utility.RandomDouble() < 0.15)
            {
                if (!from.CheckSkill(SkillName.Forensics, 30, 80))
                    from.SendMessage("Vous auriez gagné à mieux appréhender les cadavres");
                else
                {
                    corpse.DropItem(new ReptiledRelic());
                    from.SendMessage("Un pan de cuir se détache du ventre de la bête");
                }
            }
            base.OnCarve(from, corpse, with);
        }
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:17,代碼來源:GreaterDragon.cs

示例14: OnCarve

        public override void OnCarve(Mobile from, Corpse corpse, Item with)
        {
            if (corpse.Carved)
                base.OnCarve(from, corpse, with);

            if (Utility.RandomDouble() < 0.15)
            {
                if (!from.CheckSkill(SkillName.Forensics, 30, 80))
                    from.SendMessage("Vous auriez gagné à mieux appréhender les cadavres");
                else
                {
                    corpse.DropItem(new ElementalRelic());
                    from.SendMessage("L'élémental se crystallise");
                }
            }
            base.OnCarve(from, corpse, with);
        }
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:17,代碼來源:ToxicElemental.cs

示例15: OnCarve

        public override void OnCarve(Mobile from, Corpse corpse, Item with)
        {
            if (corpse.Carved)
                base.OnCarve(from, corpse, with);

            if (Utility.RandomDouble() < 0.15)
            {
                if (!from.CheckSkill(SkillName.Forensics, 30, 80))
                    from.SendMessage("Vous auriez gagné à mieux appréhender les cadavres");
                else
                {
                    corpse.DropItem(new UndeadRelic());
                    from.SendMessage("Vous arrachez un morceau de chair à la liche");
                }
            }
            base.OnCarve(from, corpse, with);
        }
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:17,代碼來源:AncientLich.cs


注:本文中的Server.Items.Corpse類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。