Server.Items.InteriorDecorator.InternalTarget.Turn C# (CSharp) Méthode

Turn() private static méthode

private static Turn ( Item item, Server.Mobile from ) : void
item Item
from Server.Mobile
Résultat void
			private static void Turn( Item item, Mobile from )
			{
				if ( item is AddonComponent || item is AddonContainerComponent || item is BaseAddonContainer )
				{
					object addon = null;

					if ( item is AddonComponent )
						addon = ((AddonComponent) item).Addon;
					else if ( item is AddonContainerComponent )
						addon = ((AddonContainerComponent) item).Addon;
					else if ( item is BaseAddonContainer )
						addon = (BaseAddonContainer) item;

					FlipableAddonAttribute[] aAttributes = (FlipableAddonAttribute[]) addon.GetType().GetCustomAttributes( typeof( FlipableAddonAttribute ), false );

					if ( aAttributes.Length > 0 )
					{
						aAttributes[ 0 ].Flip( from, (Item) addon );
						return;
					}
				}

				FlipableAttribute[] attributes = (FlipableAttribute[]) item.GetType().GetCustomAttributes( typeof( FlipableAttribute ), false );

				if ( attributes.Length > 0 )
					attributes[ 0 ].Flip( item );
				else
					from.SendLocalizedMessage( 1042273 ); // You cannot turn that.
			}