Ejemplo n.º 1
0
            public InternalTarget( PetParrot parrot )
                : base(3, true, TargetFlags.None)
            {
                m_Parrot = parrot;

                CheckLOS = false;
            }
Ejemplo n.º 2
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			
			m_Parrot = reader.ReadMobile() as PetParrot;
		}
Ejemplo n.º 3
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is AddonComponent)
                {
                    var component = (AddonComponent) targeted;

                    if (component.Addon is ParrotPerchAddon)
                    {
                        var perch = (ParrotPerchAddon) component.Addon;

                        BaseHouse house = BaseHouse.FindHouseAt(perch);

                        if (house != null && house.IsCoOwner(from))
                        {
                            if (perch.Parrot == null || perch.Parrot.Deleted)
                            {
                                var parrot = new PetParrot {Hue = m_Parrot.Hue};
                                parrot.MoveToWorld(perch.Location, perch.Map);
                                parrot.Z += 12;

                                perch.Parrot = parrot;
                                m_Parrot.Delete();
                            }
                            else
                            {
                                from.SendLocalizedMessage(1072616); //That Parrot Perch already has a Parrot.
                            }
                        }
                        else
                        {
                            from.SendLocalizedMessage(1072618);
                                //Parrots can only be placed on Parrot Perches in houses where you are an owner or co-owner.	
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(1072614); //You must place the Parrot on a Parrot Perch.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1072614); //You must place the Parrot on a Parrot Perch.
                }
            }
Ejemplo n.º 4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
			
            switch ( version )
            {
                case 1:
                    this.m_Parrot = reader.ReadMobile() as PetParrot;
					
                    break;
                case 0: 
                    reader.ReadDateTime();
                    reader.ReadString();
                    reader.ReadInt();
					
                    break;
            }
        }
Ejemplo n.º 5
0
        public ParrotPerchAddon(PetParrot parrot)
        {
            this.AddComponent(new AddonComponent(0x2FB6), 0, 0, 0);
			
            this.m_Parrot = parrot;
        }
Ejemplo n.º 6
0
        public ParrotPerchAddonDeed(PetParrot parrot)
        {
            this.LootType = LootType.Blessed;
		
            this.m_Parrot = parrot;
        }
Ejemplo n.º 7
0
		public ParrotPerchAddonDeed( PetParrot parrot )
		{
			ItemValue = ItemValue.Common;

			LootType = LootType.Blessed;
		
			m_Parrot = parrot;
		}