本文整理汇总了C#中Server.Items.MapItem.SetDisplay方法的典型用法代码示例。如果您正苦于以下问题:C# MapItem.SetDisplay方法的具体用法?C# MapItem.SetDisplay怎么用?C# MapItem.SetDisplay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.MapItem
的用法示例。
在下文中一共展示了MapItem.SetDisplay方法的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);
}
}