Finding ItemID of front stairs
Im trying to use the following code to make sure that a player is on the front steps of a home before they can place a guildstone. For some reason i dont understand, the stairs are not being recognized for their ItemID. Im assuming it has something to do with "Flag" attribute proscribed by it being part of the House Foundation. Anyone know how I can get this getitemtype to recognize a stair tile on the front oh a home?
Im trying to use the following code to make sure that a player is on the front steps of a home before they can place a guildstone. For some reason i dont understand, the stairs are not being recognized for their ItemID. Im assuming it has something to do with "Flag" attribute proscribed by it being part of the House Foundation. Anyone know how I can get this getitemtype to recognize a stair tile on the front oh a home?
Code:
public override void OnDoubleClick( Mobile from )
{
// ***** BEGIN MODS FOR GUILDSTONE
double stairs = 0;
Map map = from.Map;
if ( map == null )
return;
IPooledEnumerable eable = map.GetItemsInRange( from.Location, 0 );
foreach ( Item item in eable )
{
Type type = item.GetType();
if ( item.ItemID == 1007 || item.ItemID == 1802 || item.ItemID == 1823 || item.ItemID ==
1826 || item.ItemID == 1849 || item.ItemID == 1873 || item.ItemID == 1878 || item.ItemID == 1901 || item.ItemID == 1929 ||
item.ItemID == 1956 || item.ItemID == 1979 )
++stairs;
}
if ( stairs < 1 )
{
from.SendMessage( "You may only place a Guildstone on the front stairs." );
return;
}
eable.Free();