本文整理汇总了C#中Server.Items.BaseAddon类的典型用法代码示例。如果您正苦于以下问题:C# BaseAddon类的具体用法?C# BaseAddon怎么用?C# BaseAddon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseAddon类属于Server.Items命名空间,在下文中一共展示了BaseAddon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
SelectedAddon = ( BaseAddon )reader.ReadItem();
}
示例2: AddComplexComponent
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name)
{
AddonComponent ac;
ac = new AddonComponent(item);
if (name != null)
ac.Name = name;
if (hue != 0)
ac.Hue = hue;
if (lightsource != -1)
ac.Light = (LightType) lightsource;
addon.AddComponent(ac, xoffset, yoffset, zoffset);
}
示例3: ConfirmAddonPlacementGump
public ConfirmAddonPlacementGump( Mobile from, BaseAddon addon ) : base( 50, 50 )
{
from.CloseGump( typeof(ConfirmAddonPlacementGump) );
m_Addon = addon;
AddPage( 0 );
AddBackground( 10, 10, 190, 140, 0x242C );
AddHtml( 30, 30, 150, 75, String.Format( "<div align=CENTER>{0}</div>", "Are you sure you want to place this addon here?" ), false, false );
AddButton( 40, 105, 0x81A, 0x81B, 0x1, GumpButtonType.Reply, 0 ); // Okay
AddButton( 110, 105, 0x819, 0x818, 0x2, GumpButtonType.Reply, 0 ); // Cancel
}
示例4: AddComplexComponent
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
{
AddonComponent ac;
ac = new AddonComponent(item);
if (name != null && name.Length > 0)
ac.Name = name;
if (hue != 0)
ac.Hue = hue;
if (amount > 1)
{
ac.Stackable = true;
ac.Amount = amount;
}
if (lightsource != -1)
ac.Light = (LightType) lightsource;
addon.AddComponent(ac, xoffset, yoffset, zoffset);
}
示例5: Convert2Static
public void Convert2Static(BaseAddon design)
{
if (design.Components.Count > 0)
{
for (int i = 0; i < design.Components.Count; ++i)
{
AddonComponent component = (AddonComponent)((design.Components)[i]);
Static equivalent = new Static(component.HuedItemID); //( component.ItemID );
equivalent.Location = component.Location; //component.Location;
equivalent.Map = component.Map; //component.Map;
equivalent.Hue = component.Hue; //component.Map;
}
}
design.Delete();
}
示例6: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
case 0:
{
m_Addon = reader.ReadItem() as BaseAddon;
m_Offset = reader.ReadPoint3D();
if ( m_Addon != null )
m_Addon.OnComponentLoaded( this );
ApplyLightTo( this );
break;
}
}
if ( version < 1 && Weight == 0 )
Weight = -1;
}
示例7: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 0:
{
m_Addon = reader.ReadItem() as BaseAddon;
break;
}
}
}
示例8: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Elevator = (BaseAddon)reader.ReadItem();
m_InUse = reader.ReadBool();
m_Height = reader.ReadInt();
m_Ticks = reader.ReadInt();
m_Peaked = reader.ReadBool();
m_OutOfUseID = reader.ReadInt();
m_InUseID = reader.ReadInt();
m_NorthWestEdge = reader.ReadPoint3D();
m_SizeNorthSouth = reader.ReadInt();
m_SizeEastWest = reader.ReadInt();
if( reader.ReadBool() )
BeginMove( reader.ReadDeltaTime() - DateTime.Now );
}
示例9: AddSpinningWheelS
public void AddSpinningWheelS(int xoff, int yoff, int zoff)
{
m_SpinningWheel2 = new SpinningwheelSouthAddon();
m_SpinningWheel2.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}
示例10: AddTrainingE
public void AddTrainingE(int xoff, int yoff, int zoff)
{
m_Training1 = new TrainingDummyEastAddon();
m_Training1.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}
示例11: AddSmallForge
public void AddSmallForge(int xoff, int yoff, int zoff)
{
m_SmallForge = new SmallForgeAddon();
m_SmallForge.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}
示例12: AddSpinningWheelE
public void AddSpinningWheelE(int xoff, int yoff, int zoff)
{
m_SpinningWheel1 = new SpinningwheelEastAddon();
m_SpinningWheel1.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}
示例13: AddMill
public void AddMill(int xoff, int yoff, int zoff)
{
m_Mill = new FlourMillSouthAddon();
m_Mill.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}
示例14: AddAnvil
public void AddAnvil(int xoff, int yoff, int zoff)
{
m_Anvil = new AnvilEastAddon();
m_Anvil.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}
示例15: AddLargeForge
public void AddLargeForge(int xoff, int yoff, int zoff)
{
m_LargeForge = new LargeForgeSouthHouseAddon();
m_LargeForge.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
}