Run UO 1.1.0 4322
public void AddFixtures( Mobile from, MultiTileEntry[] list )
{
if ( m_Fixtures == null )
m_Fixtures = new ArrayList();
uint keyValue = 0;
for ( int i = 0; i < list.Length; ++i )
{
MultiTileEntry mte = list[i];
int itemID = mte.m_ItemID & 0x3FFF;
if ( itemID >= 0x181D && itemID < 0x1829 )
{
HouseTeleporter tp = new HouseTeleporter( itemID );
AddFixture( tp, mte );
}
else
{
BaseDoor door = null;
// MINE
//crystal and shadow
if (itemID >= 0x367B && itemID < 0x369B)
{
int type = (itemID - 0x367B) / 16;
DoorFacing facing = (DoorFacing)(((itemID - 0x367B) / 2) % 8);
switch (type)
{
case 0: door = new GenericHouseDoor(facing, 0x367B, 0xEC, 0xF3); break;
case 1: door = new GenericHouseDoor(facing, 0x368B, 0xEC, 0xF3); break;
}
}
// add else to if on next line
[COLOR=red]}[/COLOR]
[COLOR=red]else if (itemID == 0x2D46)///ML Doors Begin[/COLOR]
[COLOR=red]{[/COLOR]
[COLOR=red]door = new GenericHouseDoor(DoorFacing.NorthCW, 0x2D46, 0xEA, 0xF1, false);[/COLOR]
[COLOR=red]}[/COLOR]
[COLOR=red]else if (itemID == 0x2D48 || itemID == 0x2FE2)[/COLOR]
[COLOR=red]{[/COLOR]
[COLOR=red]door = new GenericHouseDoor(DoorFacing.SouthCCW, itemID, 0xEA, 0xF1, false);[/COLOR]
[COLOR=red]}[/COLOR]
[COLOR=red]else if (itemID >= 0x2D63 && itemID < 0x2D70)[/COLOR]
[COLOR=red]{[/COLOR]
[COLOR=red]int mod = (itemID - 0x2D63) / 2 % 2;[/COLOR]
[COLOR=red]DoorFacing facing = ((mod == 0) ? DoorFacing.SouthCCW : DoorFacing.WestCCW);[/COLOR]
[COLOR=red]int type = (itemID - 0x2D63) / 4;[/COLOR]
[COLOR=red]door = new GenericHouseDoor(facing, 0x2D63 + 4 * type + mod * 2, 0xEA, 0xF1, false);[/COLOR]
[COLOR=red]}[/COLOR]
[COLOR=red]else if (itemID == 0x2FE4 || itemID == 0x31AE)[/COLOR]
[COLOR=red]{[/COLOR]
[COLOR=red]door = new GenericHouseDoor(DoorFacing.WestCCW, itemID, 0xEA, 0xF1, false);[/COLOR]
[COLOR=red]}[/COLOR]
[COLOR=red]else if (itemID >= 0x319C && itemID < 0x31AE)[/COLOR]
[COLOR=red]{[/COLOR]
[COLOR=red]//special case for 0x31aa <-> 0x31a8 (a9)[/COLOR]
[COLOR=red]int mod = (itemID - 0x319C) / 2 % 2;[/COLOR]
[COLOR=red]bool specialCase = (itemID == 0x31AA || itemID == 0x31A8);[/COLOR]
[COLOR=red]DoorFacing facing;[/COLOR]
[COLOR=red]if (itemID == 0x31AA || itemID == 0x31A8)[/COLOR]
[COLOR=red]facing = ((mod == 0) ? DoorFacing.NorthCW : DoorFacing.EastCW);[/COLOR]
[COLOR=red]else[/COLOR]
[COLOR=red]facing = ((mod == 0) ? DoorFacing.EastCW : DoorFacing.NorthCW);[/COLOR]
[COLOR=red]int type = (itemID - 0x319C) / 4;[/COLOR]
[COLOR=red]door = new GenericHouseDoor(facing, 0x319C + 4 * type + mod * 2, 0xEA, 0xF1, false);[/COLOR]
[COLOR=red]}[/COLOR]
public class GenericHouseDoor : BaseHouseDoor
{
[Constructable]
public GenericHouseDoor( DoorFacing facing, int baseItemID, int openedSound, int closedSound ) : base( facing, baseItemID + (2 * (int)facing), baseItemID + 1 + (2 * (int)facing), openedSound, closedSound, BaseDoor.GetOffset( facing ) )
{
}
[COLOR=red][Constructable][/COLOR]
[COLOR=red]public GenericHouseDoor(DoorFacing facing, int baseItemID, int openedSound, int closedSound, bool autoAdjust)[/COLOR]
[COLOR=red]: base(facing, baseItemID + (autoAdjust ? (2 * (int)facing) : 0), baseItemID + 1 + (autoAdjust ? (2 * (int)facing) : 0), openedSound, closedSound, BaseDoor.GetOffset(facing))[/COLOR]
[COLOR=red]{[/COLOR]
}
public GenericHouseDoor( Serial serial ) : base( serial )
{
}
public static bool IsFixture( int itemID )
{
itemID &= 0x3FFF;
if (itemID >= 0x367B && itemID < 0x369B)
return true;
else if ( itemID >= 0x675 && itemID < 0x6F5 )
return true;
else if ( itemID >= 0x314 && itemID < 0x364 )
return true;
else if ( itemID >= 0x824 && itemID < 0x834 )
return true;
else if ( itemID >= 0x839 && itemID < 0x849 )
return true;
else if ( itemID >= 0x84C && itemID < 0x85C )
return true;
else if ( itemID >= 0x866 && itemID < 0x876 )
return true;
else if ( itemID >= 0xE8 && itemID < 0xF8 )
return true;
else if ( itemID >= 0x1FED && itemID < 0x1FFD )
return true;
else if ( itemID >= 0x181D && itemID < 0x1829 )
return true;
// UnrealUO - Samurai Empire doors
else if ( itemID >= 0x2a05 && itemID < 0x2a0d )
return true;
else if ( itemID >= 0x2a0d && itemID < 0x2a15 )
return true;
else if ( itemID >= 0x2a15 && itemID < 0x2a1d )
return true;
else if ( itemID >= 0x241f && itemID < 0x2425 )
return true;
else if( itemID >= 0x319C && itemID < 0x31B0 )
return true;
// Start of ML Doors
else if( itemID == 0x2D46 ||itemID == 0x2D48 || itemID == 0x2FE2 || itemID == 0x2FE4 ) //ML doors begin here. Note funkyness.
return true;
else if( itemID >= 0x2D63 && itemID < 0x2D70 )
return true;
else if( itemID >= 0x319C && itemID < 0x31AF )
return true;