- Misc HouseFoundation cleanup and optimization.

- Allowing the sectioning of stair components can now be turned on or off using AllowStairSectioning.
- Added missing SA stair IDs.

Athena's patch:
- Updated the component tables.
- Updated FeatureFlags.
- Added support for the Gothic and Rustic theme house tiles.
This commit is contained in:
eos 2012-08-26 23:03:36 +00:00
parent 2938db753b
commit f36ac813ed
6 changed files with 612 additions and 489 deletions

View file

@ -84,8 +84,10 @@ Category Style TID Piece1 Piece2 Piece3 Piece4 Piece5 Piece6 Piece7 Piece8 Featu
28 0 1112092 16800 16801 16803 16804 16809 16810 16811 16812 65536 Green Marble Arches
29 0 1112093 16754 16755 16752 16753 16756 16750 16751 0 65536 Blue Marble Arches
30 0 1112094 16714 16715 16716 16717 16727 16726 16728 16729 65536 Two-Tone Stone Archways
30 1 0 0 0 0 16746 16747 0 0 0 65536 Two-Tone Stone Archways 2
30 1 0 0 0 0 16746 16747 0 0 0 65536 Two-Tone Stone Archways
31 0 1112095 16672 16671 16673 16674 16667 16668 16669 16670 65536 Gold Stone Battlement
32 0 1112096 20771 20772 20773 20774 20728 20729 20731 20732 65536 Gargish Marble Arches
33 0 1112097 18401 18402 18403 18407 18408 18409 0 0 65536 Gargish Ruined Arches
34 0 1112098 18600 18601 18602 18603 18604 18605 0 0 65536 Gargish Stone Heads
35 0 1150613 0 30705 30706 30707 30708 30709 0 30710 524288 Board and Batten Arches
36 0 1150624 0 19248 19192 19261 19249 19198 0 0 262144 Gothic Arches

View file

@ -15,3 +15,5 @@ Category Block North East South West Squared1 Squared2 Rounded1 Rounded2 MultiNo
12 17175 17248 17249 17247 17246 17261 17260 17257 17256 7648 7649 7650 7651 65536 Gargish 1
13 17175 17244 17253 17243 17250 0 0 0 0 7652 7653 7654 7655 65536 Gargish 2
14 17176 17252 17245 17251 17242 0 0 0 0 7656 7657 7658 7659 65536 Gargish 3
15 19207 19205 19251 19252 19204 19202 19201 19262 19263 7660 7661 7662 7663 262144 Gothic
16 30727 30729 30731 30730 30728 30733 30732 30739 30738 7664 7665 7666 7667 524288 Board and Batten

File diff suppressed because it is too large Load diff

View file

@ -162,3 +162,12 @@ Category Style TID South1 South2 South3 Corner East1 East2 East3 Post WindowS Al
41 1 0 16764 16767 16768 16769 16770 16771 16772 16773 0 0 0 0 0 0 65536 Gargish Blue Marble Half Walls
41 2 0 16751 16750 16748 16749 0 0 0 0 0 0 0 0 0 0 65536 Gargish Blue Marble Half Walls 2
42 0 1112080 17184 17349 17350 17347 17348 17351 17352 17353 0 0 0 0 0 0 65536 Gargish Wall Set 3
43 0 1150629 19246 19189 19190 19213 19196 19195 19247 19214 0 19191 19197 0 0 0 262144 Gothic Walls 1
43 1 0 19255 19254 19193 19209 19199 19253 19211 19210 0 0 0 0 0 0 262144 Gothic Walls 2
43 2 0 19259 19257 19194 19208 19200 19260 19256 19206 0 0 0 0 0 0 262144 Gothic Walls 3
43 3 0 0 19258 19243 19212 19245 0 19215 19244 0 0 0 0 0 0 262144 Gothic Walls 4
43 4 0 0 19216 19217 19218 19219 19220 19221 0 0 0 0 0 0 0 262144 Rose Window 1
43 5 0 0 19222 19223 19224 19225 19226 19227 0 0 0 0 0 0 0 262144 Rose Window 2
44 0 1150630 0 30694 30724 30700 30723 30697 0 30710 0 30703 30704 0 0 0 524288 Board and Batten Walls 1
44 1 0 0 30695 30726 30701 30725 30698 0 30711 0 0 0 0 0 0 524288 Board and Batten Walls 2
44 2 0 0 30696 30737 30702 30736 30699 0 30712 0 0 0 0 0 0 524288 Board and Batten Walls 3

View file

@ -305,7 +305,7 @@ namespace Server.Multis
{
int mod = (itemID - 0x2D63)/2%2;
DoorFacing facing = ( ( mod == 0 ) ? DoorFacing.SouthCCW : DoorFacing.WestCCW );
int type = (itemID - 0x2D63) / 4;
door = new GenericHouseDoor( facing, 0x2D63 + 4*type + mod*2, 0xEA, 0xF1, false );
@ -769,7 +769,7 @@ namespace Server.Multis
public bool IsHiddenToCustomizer( Item item )
{
return (item == m_Signpost || item == m_SignHanger || item == Sign || (m_Fixtures != null && m_Fixtures.Contains( item )));
return ( item == m_Signpost || item == m_SignHanger || item == Sign || IsFixture( item ) );
}
public static void Initialize()
@ -1123,24 +1123,43 @@ namespace Server.Multis
return Verification.IsItemValid( itemID );
}
public const bool AllowStairSectioning = true;
/* Stair block IDs
* (sorted ascending)
*/
private static int[] m_BlockIDs = new int[]
{
0x3EE, 0x709, 0x71E, 0x721,
0x738, 0x750, 0x76C, 0x788,
0x7A3, 0x7BA, 0x35D2, 0x3609
0x7A3, 0x7BA, 0x35D2, 0x3609,
0x4317, 0x4318, 0x4B07, 0x7807
};
/* Stair sequence IDs
* (sorted ascending)
* Use this for stairs in the proper N,W,S,E sequence
*/
private static int[] m_StairSeqs = new int[]
{
0x3EF, 0x70A, 0x722, 0x739,
0x751, 0x76D, 0x789, 0x7A4
};
/* Other stair IDs
* Listed in order: north, west, south, east
* Use this for stairs not in the proper sequence
*/
private static int[] m_StairIDs = new int[]
{
0x71F, 0x736, 0x737, 0x749,
0x35D4, 0x35D3, 0x35D6, 0x35D5,
0x360B, 0x360A, 0x360D, 0x360C,
0x4360, 0x435E, 0x435F, 0x4361,
0x435C, 0x435A, 0x435B, 0x435D,
0x4364, 0x4362, 0x4363, 0x4365,
0x4B05, 0x4B04, 0x4B34, 0x4B33,
0x7809, 0x7808, 0x780A, 0x780B,
0x7BB, 0x7BC
};
@ -1152,8 +1171,6 @@ namespace Server.Multis
delta = (m_BlockIDs[i] - id);
return (delta == 0);
//if ID matches one of the the items in m_BlockIDs, return true
}
public static bool IsStair( int id, ref int dir )
@ -1170,15 +1187,16 @@ namespace Server.Multis
return true;
}
delta = -1;
for( int i = 0; ( delta < 0 || delta > 0 ) && i < m_StairIDs.Length; ++i )
for( int i = 0; i < m_StairIDs.Length; ++i )
{
delta = (m_StairIDs[i] - id);
dir = i % 4;
if( m_StairIDs[i] == id )
{
dir = i % 4;
return true;
}
}
return (delta == 0);
return false;
}
public static bool DeleteStairs( MultiComponentList mcl, int id, int x, int y, int z )
@ -1213,6 +1231,9 @@ namespace Server.Multis
if( !IsStair( id, ref dir ) )
return false;
if ( AllowStairSectioning )
return true; // skip deletion
int height = ((z - 7) % 20) / 5;
int xStart, yStart;
@ -1324,12 +1345,21 @@ namespace Server.Multis
return;
}
mcl.Remove( itemID, x, y, z );
int dir = 0;
bool fixState = false;
if( IsStair( itemID, ref dir ) || IsStairBlock( itemID ) )
design.SendGeneralInfoTo( state );
// Remove the component
if( AllowStairSectioning )
{
if( DeleteStairs( mcl, itemID, x, y, z ) )
fixState = true; // The client removes the entire set of stairs locally, resend state
mcl.Remove( itemID, x, y, z );
}
else
{
if( !DeleteStairs( mcl, itemID, x, y, z ) )
mcl.Remove( itemID, x, y, z );
}
// If needed, replace removed component with a dirt tile
if( ax >= 1 && ax < mcl.Width && ay >= 1 && ay < mcl.Height - 1 )
@ -1350,6 +1380,10 @@ namespace Server.Multis
// Update revision
design.OnRevised();
// Resend design state
if( fixState )
design.SendDetailedInfoTo( state );
}
}
@ -1521,7 +1555,7 @@ namespace Server.Multis
* - Update design context with new level
* - Teleport mobile to new level
* - Update client
*
*
*/
// Read data detailing the target level
@ -1959,7 +1993,7 @@ namespace Server.Multis
DesignContext d;
m_Table.TryGetValue( from, out d );
return d;
}
@ -2007,10 +2041,10 @@ namespace Server.Multis
if( foundation.Signpost != null )
state.Send( foundation.Signpost.RemovePacket );
if( foundation.SignHanger != null )
state.Send( foundation.SignHanger.RemovePacket );
if( foundation.Sign != null )
state.Send( foundation.Sign.RemovePacket );
}
@ -2048,10 +2082,10 @@ namespace Server.Multis
if( context.Foundation.Signpost != null )
context.Foundation.Signpost.SendInfoTo( state );
if( context.Foundation.SignHanger != null )
context.Foundation.SignHanger.SendInfoTo( state );
if( context.Foundation.Sign != null )
context.Foundation.Sign.SendInfoTo( state );
}

View file

@ -70,8 +70,10 @@ namespace Server
Unk5 = 0x00002000,
Unk6 = 0x00004000,
Unk7 = 0x00008000,
SA = 0x00010000,
SA = 0x00010000,
HS = 0x00020000,
Gothic = 0x00040000,
Rustic = 0x00080000,
ExpansionNone = None,
ExpansionT2A = T2A,
@ -81,7 +83,7 @@ namespace Server
ExpansionAOS = ExpansionLBR | AOS | Unk7,
ExpansionSE = ExpansionAOS | SE,
ExpansionML = ExpansionSE | ML | Unk2,
ExpansionSA = ExpansionML | SA
ExpansionSA = ExpansionML | SA | Gothic | Rustic
}
[Flags]
@ -127,7 +129,7 @@ namespace Server
new ExpansionInfo( 5, "Age of Shadows", ClientFlags.Malas, FeatureFlags.ExpansionAOS, CharacterListFlags.ExpansionAOS, 0x0000 ),
new ExpansionInfo( 6, "Samurai Empire", ClientFlags.Tokuno, FeatureFlags.ExpansionSE, CharacterListFlags.ExpansionSE, 0x00C0 ), // 0x20 | 0x80
new ExpansionInfo( 7, "Mondain's Legacy", new ClientVersion( "5.0.0a" ), FeatureFlags.ExpansionML, CharacterListFlags.ExpansionML, 0x02C0 ), // 0x20 | 0x80 | 0x200
new ExpansionInfo( 8, "Stygian Abyss", ClientFlags.TerMur, FeatureFlags.ExpansionSA, CharacterListFlags.ExpansionSA, 0x102C0 ) // 0x20 | 0x80 | 0x200 | 0x10000
new ExpansionInfo( 8, "Stygian Abyss", ClientFlags.TerMur, FeatureFlags.ExpansionSA, CharacterListFlags.ExpansionSA, 0xD02C0 ) // 0x20 | 0x80 | 0x200 | 0x10000 | 0x40000 | 0x80000
};
private string m_Name;