Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,83 +1,81 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class ArcaneCircleAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed => new ArcaneCircleDeed();
|
||||
public class ArcaneCircleAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public ArcaneCircleAddon()
|
||||
{
|
||||
AddComponent(new AddonComponent(0x3083), -1, -1, 0);
|
||||
AddComponent(new AddonComponent(0x3080), -1, 0, 0);
|
||||
AddComponent(new AddonComponent(0x3082), 0, -1, 0);
|
||||
AddComponent(new AddonComponent(0x3081), 1, -1, 0);
|
||||
AddComponent(new AddonComponent(0x307D), -1, 1, 0);
|
||||
AddComponent(new AddonComponent(0x307F), 0, 0, 0);
|
||||
AddComponent(new AddonComponent(0x307E), 1, 0, 0);
|
||||
AddComponent(new AddonComponent(0x307C), 0, 1, 0);
|
||||
AddComponent(new AddonComponent(0x307B), 1, 1, 0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ArcaneCircleAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x3083 ), -1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3080 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x3082 ), 0, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x3081 ), 1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x307D ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x307F ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x307E ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x307C ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x307B ), 1, 1, 0 );
|
||||
}
|
||||
public ArcaneCircleAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public ArcaneCircleAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override BaseAddonDeed Deed => new ArcaneCircleDeed();
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 1 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
if ( version == 0 )
|
||||
ValidationQueue<ArcaneCircleAddon>.Add( this );
|
||||
}
|
||||
if (version == 0)
|
||||
ValidationQueue<ArcaneCircleAddon>.Add(this);
|
||||
}
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
foreach ( AddonComponent c in Components )
|
||||
{
|
||||
if ( c.ItemID == 0x3083 )
|
||||
{
|
||||
c.Offset = new Point3D( -1, -1, 0 );
|
||||
c.MoveToWorld( new Point3D( X + c.Offset.X, Y + c.Offset.Y, Z + c.Offset.Z ), Map );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Validate()
|
||||
{
|
||||
foreach (AddonComponent c in Components)
|
||||
if (c.ItemID == 0x3083)
|
||||
{
|
||||
c.Offset = new Point3D(-1, -1, 0);
|
||||
c.MoveToWorld(new Point3D(X + c.Offset.X, Y + c.Offset.Y, Z + c.Offset.Z), Map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ArcaneCircleDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon => new ArcaneCircleAddon();
|
||||
public override int LabelNumber => 1072703; // arcane circle
|
||||
public class ArcaneCircleDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public ArcaneCircleDeed()
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ArcaneCircleDeed()
|
||||
{
|
||||
}
|
||||
public ArcaneCircleDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public ArcaneCircleDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override BaseAddon Addon => new ArcaneCircleAddon();
|
||||
public override int LabelNumber => 1072703; // arcane circle
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue