public InternalTarget( PetParrot parrot ) : base(3, true, TargetFlags.None) { m_Parrot = parrot; CheckLOS = false; }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_Parrot = reader.ReadMobile() as PetParrot; }
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. } }
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; } }
public ParrotPerchAddon(PetParrot parrot) { this.AddComponent(new AddonComponent(0x2FB6), 0, 0, 0); this.m_Parrot = parrot; }
public ParrotPerchAddonDeed(PetParrot parrot) { this.LootType = LootType.Blessed; this.m_Parrot = parrot; }
public ParrotPerchAddonDeed( PetParrot parrot ) { ItemValue = ItemValue.Common; LootType = LootType.Blessed; m_Parrot = parrot; }