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
|
|
@ -2,84 +2,84 @@ using Server.Items;
|
|||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class ChampionPlatform : BaseAddon
|
||||
{
|
||||
private ChampionSpawn m_Spawn;
|
||||
public class ChampionPlatform : BaseAddon
|
||||
{
|
||||
private ChampionSpawn m_Spawn;
|
||||
|
||||
public ChampionPlatform( ChampionSpawn spawn )
|
||||
{
|
||||
m_Spawn = spawn;
|
||||
public ChampionPlatform(ChampionSpawn spawn)
|
||||
{
|
||||
m_Spawn = spawn;
|
||||
|
||||
for ( int x = -2; x <= 2; ++x )
|
||||
for ( int y = -2; y <= 2; ++y )
|
||||
AddComponent( 0x750, x, y, -5 );
|
||||
for (int x = -2; x <= 2; ++x)
|
||||
for (int y = -2; y <= 2; ++y)
|
||||
AddComponent(0x750, x, y, -5);
|
||||
|
||||
for ( int x = -1; x <= 1; ++x )
|
||||
for ( int y = -1; y <= 1; ++y )
|
||||
AddComponent( 0x750, x, y, 0 );
|
||||
for (int x = -1; x <= 1; ++x)
|
||||
for (int y = -1; y <= 1; ++y)
|
||||
AddComponent(0x750, x, y, 0);
|
||||
|
||||
for ( int i = -1; i <= 1; ++i )
|
||||
{
|
||||
AddComponent( 0x751, i, 2, 0 );
|
||||
AddComponent( 0x752, 2, i, 0 );
|
||||
for (int i = -1; i <= 1; ++i)
|
||||
{
|
||||
AddComponent(0x751, i, 2, 0);
|
||||
AddComponent(0x752, 2, i, 0);
|
||||
|
||||
AddComponent( 0x753, i, -2, 0 );
|
||||
AddComponent( 0x754, -2, i, 0 );
|
||||
}
|
||||
AddComponent(0x753, i, -2, 0);
|
||||
AddComponent(0x754, -2, i, 0);
|
||||
}
|
||||
|
||||
AddComponent( 0x759, -2, -2, 0 );
|
||||
AddComponent( 0x75A, 2, 2, 0 );
|
||||
AddComponent( 0x75B, -2, 2, 0 );
|
||||
AddComponent( 0x75C, 2, -2, 0 );
|
||||
}
|
||||
AddComponent(0x759, -2, -2, 0);
|
||||
AddComponent(0x75A, 2, 2, 0);
|
||||
AddComponent(0x75B, -2, 2, 0);
|
||||
AddComponent(0x75C, 2, -2, 0);
|
||||
}
|
||||
|
||||
public void AddComponent( int id, int x, int y, int z )
|
||||
{
|
||||
AddonComponent ac = new AddonComponent( id );
|
||||
public ChampionPlatform(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
ac.Hue = 0x497;
|
||||
public void AddComponent(int id, int x, int y, int z)
|
||||
{
|
||||
AddonComponent ac = new AddonComponent(id);
|
||||
|
||||
AddComponent( ac, x, y, z );
|
||||
}
|
||||
ac.Hue = 0x497;
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
AddComponent(ac, x, y, z);
|
||||
}
|
||||
|
||||
m_Spawn?.Delete();
|
||||
}
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
public ChampionPlatform( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
m_Spawn?.Delete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write( m_Spawn );
|
||||
}
|
||||
writer.Write(m_Spawn);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Spawn = reader.ReadItem() as ChampionSpawn;
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Spawn = reader.ReadItem() as ChampionSpawn;
|
||||
|
||||
if ( m_Spawn == null )
|
||||
Delete();
|
||||
if (m_Spawn == null)
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue