本文整理匯總了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 ) );
}
示例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);
}
}