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


C# MapItem.AddWorldPin方法代碼示例

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


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

示例1: OnComplete

		public override void OnComplete()
		{
			PlayerMobile from = System.From;

			Point3D loc = WitchApprenticeQuest.RandomZeefzorpulLocation();

			MapItem mapItem = new MapItem();
			mapItem.SetDisplay( loc.X - 200, loc.Y - 200, loc.X + 200, loc.Y + 200, 200, 200 );
			mapItem.AddWorldPin( loc.X, loc.Y );
			from.AddToBackpack( mapItem );

			from.AddToBackpack( new MagicFlute() );

			from.SendLocalizedMessage( 1055061 ); // You have received a map and a magic flute.

			System.AddConversation( new ImpDeathConversation( loc ) );
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:17,代碼來源:Objectives.cs

示例2: GetRoutes_OnCommand

        public static void GetRoutes_OnCommand(CommandEventArgs e)
        {
            MapItem mapitem;

            for (int i = 0; i < SpawnDefinition.PirateTramFelCoursesJhelom.Length; i++)
            {
                mapitem = new MapItem();
                mapitem.SetDisplay(5, 5, 5120 - 32, 4096 - 10, 400, 400);

                for (int j = 0; j < SpawnDefinition.PirateTramFelCoursesJhelom[i].Length; j++)
                {
                    Point2D pnt = SpawnDefinition.PirateTramFelCoursesJhelom[i][j];
                    mapitem.AddWorldPin(pnt.X, pnt.Y);
                }

                mapitem.Name = String.Format("Pirate - Jhelom {0}", i + 1);
                e.Mobile.AddToBackpack(mapitem);
            }

            for (int i = 0; i < SpawnDefinition.PirateTramFelCoursesMoonglow.Length; i++)
            {
                mapitem = new MapItem();
                mapitem.SetDisplay(5, 5, 5120 - 32, 4096 - 10, 400, 400);

                for (int j = 0; j < SpawnDefinition.PirateTramFelCoursesJhelom[i].Length; j++)
                {
                    Point2D pnt = SpawnDefinition.PirateTramFelCoursesJhelom[i][j];
                    mapitem.AddWorldPin(pnt.X, pnt.Y);
                }

                mapitem.Name = String.Format("Pirate - Moonglow {0}", i + 1);
                e.Mobile.AddToBackpack(mapitem);
            }

            for (int i = 0; i < SpawnDefinition.PirateTokunoCourses.Length; i++)
            {
                mapitem = new MapItem();
                mapitem.SetDisplay(5, 5, 1448 - 32, 1448 - 10, 400, 400);

                for (int j = 0; j < SpawnDefinition.PirateTokunoCourses[i].Length; j++)
                {
                    Point2D pnt = SpawnDefinition.PirateTokunoCourses[i][j];
                    mapitem.AddWorldPin(pnt.X, pnt.Y);
                }

                mapitem.Name = String.Format("Pirate - tokuno {0}", i + 1);
                e.Mobile.AddToBackpack(mapitem);
            }

            for (int i = 0; i < SpawnDefinition.MerchantTokunoCourses.Length; i++)
            {
                mapitem = new MapItem();
                mapitem.SetDisplay(5, 5, 1448 - 32, 1448 - 10, 400, 400);

                for (int j = 0; j < SpawnDefinition.PirateTokunoCourses[i].Length; j++)
                {
                    Point2D pnt = SpawnDefinition.PirateTokunoCourses[i][j];
                    mapitem.AddWorldPin(pnt.X, pnt.Y);
                }

                mapitem.Name = String.Format("Merchant - tokuno {0}", i + 1);
                e.Mobile.AddToBackpack(mapitem);
            }
            for (int i = 0; i < SpawnDefinition.MerchantTramFelCourses1.Length; i++)
            {
                mapitem = new MapItem();
                mapitem.SetDisplay(5, 5, 5120 - 32, 4096 - 10, 400, 400);

                for (int j = 0; j < SpawnDefinition.MerchantTramFelCourses1[i].Length; j++)
                {
                    Point2D pnt = SpawnDefinition.MerchantTramFelCourses1[i][j];
                    mapitem.AddWorldPin(pnt.X, pnt.Y);
                }

                mapitem.Name = String.Format("Merchant - tram/fel(a) {0}", i + 1);
                e.Mobile.AddToBackpack(mapitem);
            }
            for (int i = 0; i < SpawnDefinition.MerchantTramFelCourses2.Length; i++)
            {
                mapitem = new MapItem();
                mapitem.SetDisplay(5, 5, 5120 - 32, 4096 - 10, 400, 400);

                for (int j = 0; j < SpawnDefinition.MerchantTramFelCourses2[i].Length; j++)
                {
                    Point2D pnt = SpawnDefinition.MerchantTramFelCourses2[i][j];
                    mapitem.AddWorldPin(pnt.X, pnt.Y);
                }

                mapitem.Name = String.Format("Merchant - tram/fel(b) {0}", i + 1);
                e.Mobile.AddToBackpack(mapitem);
            }

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


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