Server.Mobiles.CharacterStatue.InvalidatePose C# (CSharp) Метод

InvalidatePose() публичный Метод

public InvalidatePose ( ) : void
Результат void
        public void InvalidatePose()
        {
            switch ( m_Pose )
            {
                case StatuePose.Ready:
                        m_Animation = 4;
                        m_Frames = 0;
                        break;
                case StatuePose.Casting:
                        m_Animation = 16;
                        m_Frames = 2;
                        break;
                case StatuePose.Salute:
                        m_Animation = 33;
                        m_Frames = 1;
                        break;
                case StatuePose.AllPraiseMe:
                        m_Animation = 17;
                        m_Frames = 4;
                        break;
                case StatuePose.Fighting:
                        m_Animation = 31;
                        m_Frames = 5;
                        break;
                case StatuePose.HandsOnHips:
                        m_Animation = 6;
                        m_Frames = 1;
                        break;
            }

            if( Map != null )
            {
                ProcessDelta();

                Packet p = null;

                IPooledEnumerable eable = Map.GetClientsInRange( Location );

                foreach( NetState state in eable )
                {
                    state.Mobile.ProcessDelta();

                    if( p == null )
                        p = Packet.Acquire( new UpdateStatueAnimation( this, 1, m_Animation, m_Frames ) );

                    state.Send( p );
                }

                Packet.Release( p );

                eable.Free();
            }
        }

Usage Example

		protected override void OnTarget( Mobile from, object targeted )
		{
			IPoint3D p = targeted as IPoint3D;
			Map map = from.Map;

			if ( p == null || map == null || m_Maker == null || m_Maker.Deleted )
				return;
				
			if ( m_Maker.IsChildOf( from.Backpack ) )
			{
				SpellHelper.GetSurfaceTop( ref p );			
				BaseHouse house = null;
				Point3D loc = new Point3D( p );
				
				AddonFitResult result = CouldFit( loc, map, from, ref house );
								
				if ( result == AddonFitResult.Valid )
				{				
					CharacterStatue statue = new CharacterStatue( from, m_Type );
					CharacterStatuePlinth plinth = new CharacterStatuePlinth( statue );
										
					house.Addons.Add( plinth );
					
					statue.Plinth = plinth;
					plinth.MoveToWorld( loc, map );
					statue.InvalidatePose();
					
					from.SendGump( new CharacterStatueGump( m_Maker, statue ) );
				}
				else if ( result == AddonFitResult.Blocked )
					from.SendLocalizedMessage( 500269 ); // You cannot build that there.
				else if ( result == AddonFitResult.NotInHouse )
					from.SendLocalizedMessage( 1076192 ); // Statues can only be placed in houses where you are the owner or co-owner.
				else if ( result == AddonFitResult.DoorsNotClosed )
					from.SendMessage( "You must close all house doors before placing this." );
				else if ( result == AddonFitResult.DoorTooClose )
					from.SendLocalizedMessage( 500271 ); // You cannot build near the door.				
			}
			else
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
		}
All Usage Examples Of Server.Mobiles.CharacterStatue::InvalidatePose