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


C# Container.GetWorldLocation方法代碼示例

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


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

示例1: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (1.0 > Utility.RandomDouble() && reg.Name == "Crimson Veins")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePrecision());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }

            if (1.0 > Utility.RandomDouble() && reg.Name == "Fire Temple Ruins")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceOrder());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }
            if (1.0 > Utility.RandomDouble() && reg.Name == "Lava Caldera")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePassion());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:28,代碼來源:FireDaemon.cs

示例2: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Fairy Dragon Lair")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceDiligence()); break;
                    case 1: c.DropItem(new FaeryDust()); break;
                }
            }
            if (Utility.RandomDouble() <= 0.25)
            {
                switch (Utility.Random(2))
                {
                    case 0:
                        c.DropItem(new FeyWings());
                        break;
                    case 1:
                        c.DropItem(new FairyDragonWing());
                        break;

                }
            }

            if (Utility.RandomDouble() < 0.10)
            {
                c.DropItem(new DraconicOrb());

            }
        }
開發者ID:Tukaramdas,項目名稱:ServUO-EC-Test-Fork,代碼行數:33,代碼來源:FairyDragon.cs

示例3: OnDeath

 public override void OnDeath(Container c)
 {
     base.OnDeath(c);
     var reg = Region.Find(c.GetWorldLocation(), c.Map);
     if (0.4 > Utility.RandomDouble() && reg.Name == "Ariel Writ Disaster")
         c.DropItem(new ArielHavenWritofMembership());
     c.DropItem(new BonePile());
 }
開發者ID:rokann,項目名稱:JustUO,代碼行數:8,代碼來源:RotWorm.cs

示例4: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Cavern of the Discarded")
            {
                c.DropItem(new ReflectiveWolfEye());
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:10,代碼來源:ClanSSW.cs

示例5: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Abyssal Lair Entrance")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceAchievement());
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:11,代碼來源:GreaterMongbat.cs

示例6: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "The Lands of the Lich")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceDirection());
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:11,代碼來源:Shade.cs

示例7: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Passage of Tears")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceSingularity());

            }
        }
開發者ID:Ziden,項目名稱:ServUO-EC-Test-Fork,代碼行數:12,代碼來源:InterredGrizzle+.cs

示例8: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (1.0 > Utility.RandomDouble() && reg.Name == "Skeletal Dragon")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePersistence());

            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:12,代碼來源:PatchworkSkeleton.cs

示例9: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Passage of Tears")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceSingularity()); break;
                    case 1: c.DropItem(new VialOfVitriol()); break;

                }
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:15,代碼來源:AcidSlug.cs

示例10: OnDeath

 public override void OnDeath(Container c)
 {
     base.OnDeath(c);
     Region reg = Region.Find(c.GetWorldLocation(), c.Map);
     if (0.25 > Utility.RandomDouble() && reg.Name == "The Secret Gardens")
     {
         switch (Utility.Random(2))
         {
             case 0: c.DropItem(new EssenceFeeling()); break;
             case 1: c.DropItem(new FaeryDust()); break;
         }
         #region Mondain's Legacy
         if (Utility.RandomDouble() < 0.3)
             c.DropItem(new PixieLeg());
         #endregion
     }
 }
開發者ID:Ziden,項目名稱:ServUO-EC-Test-Fork,代碼行數:17,代碼來源:SAPixie.cs

示例11: Container_Snoop

		public static void Container_Snoop( Container cont, Mobile from )
		{

            if (from.BeginAction(typeof(IAction)))
            {
                bool releaseLock = true;
                bool canSnoop = true;

                if (from.AccessLevel > AccessLevel.Player || from.InRange(cont.GetWorldLocation(), 1))
                {
                    Mobile root = cont.RootParent as Mobile;

                    if (root != null && !root.Alive)
                        canSnoop = false;
                    else if (root != null && root.AccessLevel > AccessLevel.Player && from.AccessLevel == AccessLevel.Player)
                    {
                        from.SendLocalizedMessage(500209); // You can not peek into the container.
                        canSnoop = false;
                    }
                    else if (root != null && from.AccessLevel == AccessLevel.Player && !CheckSnoopAllowed(from, root))
                    {
                        from.SendLocalizedMessage(1001018); // You cannot perform negative acts on your target.
                        canSnoop = false;
                    }

                    if (canSnoop)
                    {
                        if (from.AccessLevel > AccessLevel.Player)
                            cont.DisplayTo(from);
                        else
                        {
                            new InternalTimer(from, cont).Start();
                            releaseLock = false;
                        }
                    }
                }
                else
                    from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.

                if (releaseLock && from is PlayerMobile)
                    ((PlayerMobile)from).EndPlayerAction();
            }
            else
                from.SendAsciiMessage("You must wait to perform another action.");
		}
開發者ID:FreeReign,項目名稱:imaginenation,代碼行數:45,代碼來源:Snooping.cs

示例12: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
			if (0.25 > Utility.RandomDouble() && reg.Name == "Crimson Veins")
			{
				if (Utility.RandomDouble() < 0.6)
				{
					switch (Utility.Random(2))
					{
						case 0: c.DropItem(new EssencePrecision()); break;
						case 1: c.DropItem(new LavaSerpentCrust()); break;
					}
				}
			}

			if (0.25 > Utility.RandomDouble() && reg.Name == "Fire Temple Ruins")
			{
				if (Utility.RandomDouble() < 0.6)
				{
					switch (Utility.Random(2))
					{
						case 0: c.DropItem(new EssenceOrder()); break;
						case 1: c.DropItem(new LavaSerpentCrust()); break;
					}
				}
			}
			if (0.25 > Utility.RandomDouble() && reg.Name == "Lava Caldera")
			{
				if (Utility.RandomDouble() < 0.6)
				{
					switch (Utility.Random(2))
					{
						case 0: c.DropItem(new EssencePassion()); break;
						case 1: c.DropItem(new LavaSerpentCrust()); break;
					}
				}
			}
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:40,代碼來源:LavaElemental.cs

示例13: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Cavern of the Discarded")
            {
                switch (Utility.Random(10))
                {
                    case 0: c.DropItem(new AbyssalCloth()); break;
                    case 1: c.DropItem(new PowderedIron()); break;
                    case 2: c.DropItem(new CrystallineBlackrock()); break;
                    case 3: c.DropItem(new EssenceBalance()); break;
                    case 4: c.DropItem(new CrystalShards()); break;
                    case 5: c.DropItem(new ArcanicRuneStone()); break;
                    case 6: c.DropItem(new DelicateScales()); break;
                    case 7: c.DropItem(new SeedRenewal()); break;
                    case 8: c.DropItem(new CrushedGlass()); break;
                    case 9: c.DropItem(new ElvenFletchings()); break;
                }
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:22,代碼來源:ClanSS.cs

示例14: OnDeath

        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Enslaved Goblins")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceControl()); break;
                    case 1: c.DropItem(new GoblinBlood()); break;

                }
            }
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:15,代碼來源:EnslavedGoblinKeeper.cs

示例15: GetSADrop

        public static void GetSADrop(Container c)
        {
            if (Utility.RandomDouble() <= 0.90) // 10% chance to move forward and drop 
                return;

            var reg = Region.Find(c.GetWorldLocation(), c.Map);

            if (reg == null || reg.Name == null)
                return;
            
            var regionname = reg.Name;

            switch (regionname)
            {
                case "Crimson Veins":
                {
                    c.DropItem(new EssencePrecision());
                    break;
                }
                case "Fire Temple Ruins":
                {
                    c.DropItem(new EssenceOrder());
                    break;
                }
                case "Lava Caldera":
                {
                    c.DropItem(new EssencePassion());
                    break;
                }
                case "Secret Garden":
                {
                    switch (Utility.Random(2))
                    {
                        case 0:
                            c.DropItem(new EssenceFeeling());
                            break;
                        case 1:
                            c.DropItem(new FaeryDust());
                            break;
                    }
                    break;
                }
                case "Cavern of the Discarded":
                {
                    switch (Utility.Random(12))
                    {
                        case 0:
                            c.DropItem(new AbyssalCloth());
                            break;
                        case 1:
                            c.DropItem(new PowderedIron());
                            break;
                        case 2:
                            c.DropItem(new CrystallineBlackrock());
                            break;
                        case 3:
                            c.DropItem(new EssenceBalance());
                            break;
                        case 4:
                            c.DropItem(new CrystalShards());
                            break;
                        case 5:
                            c.DropItem(new ArcanicRuneStone());
                            break;
                        case 6:
                            c.DropItem(new DelicateScales());
                            break;
                        case 7:
                            c.DropItem(new SeedRenewal());
                            break;
                        case 8:
                            c.DropItem(new CrushedGlass());
                            break;
                        case 9:
                            c.DropItem(new ElvenFletchings());
                            break;
                        case 10:
                            c.DropItem(new Lodestone());
                            break;
                        case 11:
                            c.DropItem(new ReflectiveWolfEye());
                            break;
                    }
                    break;
                }
                case "Abyssal Lair":
                {
                    c.DropItem(new EssenceAchievement());
                    break;
                }
                case "StygianDragonLair":
                {
                    c.DropItem(new EssenceDiligence());
                    break;
                }
                case "Skeletal Dragon":
                {
                    c.DropItem(new EssencePersistence());
                    break;
                }
//.........這裏部分代碼省略.........
開發者ID:Crome696,項目名稱:ServUO,代碼行數:101,代碼來源:SARegionDrops.cs


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