Esempio n. 1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            Hold = reader.ReadItem() as GalleonHold;
        }
Esempio n. 2
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (Galleon != null && Galleon.GalleonHold != null)
            {
                GalleonHold hold = Galleon.GalleonHold;
                list.Add(1072241, string.Format("{0}\t{1}\t{2}\t{3}", hold.TotalItems, hold.MaxItems, hold.TotalWeight, hold.MaxWeight)); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones
            }
        }
Esempio n. 3
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (this.m_Deed.Deleted)
                {
                    return;
                }

                int number;

                if (this.m_Deed.Commodity != null)
                {
                    number = 1047028; // The commodity deed has already been filled.
                }
                else if (targeted is Item)
                {
                    BankBox          box  = from.FindBankNoCreate();
                    CommodityDeedBox cox  = CommodityDeedBox.Find(this.m_Deed);
                    GalleonHold      hold = ((Item)targeted).RootParent as GalleonHold;

                    // Veteran Rewards mods
                    if (box != null && this.m_Deed.IsChildOf(box) && ((Item)targeted).IsChildOf(box) ||
                        (cox != null && cox.IsSecure && ((Item)targeted).IsChildOf(cox)) ||
                        hold != null)
                    {
                        if (this.m_Deed.SetCommodity((Item)targeted))
                        {
                            this.m_Deed.Hue = 0x592;
                            number          = 1047030; // The commodity deed has been filled.
                        }
                        else
                        {
                            number = 1047027; // That is not a commodity the bankers will fill a commodity deed with.
                        }
                    }
                    else
                    {
                        if (Core.ML)
                        {
                            number = 1080526; // That must be in your bank box or commodity deed box to use it.
                        }
                        else
                        {
                            number = 1047026; // That must be in your bank box to use it.
                        }
                    }
                }
                else
                {
                    number = 1047027; // That is not a commodity the bankers will fill a commodity deed with.
                }

                from.SendLocalizedMessage(number);
            }
Esempio n. 4
0
        public TokunoGalleon()
            : base(0x30)
        {
            m_CannonCenter = new SingleCannonPlace(this, 0x91CC, new Point3D(0, -9, 0));
            m_CannonSupSx = new SingleCannonPlace(this, 0x91AA, new Point3D(-2, -3, 0));
            m_CannonSupDx = new SingleCannonPlace(this, 0x91A6, new Point3D(2, -3, 0));
            m_CannonInfSx = new SingleCannonPlace(this, 0x9187, new Point3D(-2, 2, 0));
            m_CannonInfDx = new SingleCannonPlace(this, 0x9183, new Point3D(2, 2, 0));
            m_Helm = new SingleHelm(this, 0x9316, new Point3D(0, 7, 1));
            m_Hold = new GalleonHold(this, 0x9177, new Point3D(0, 4, 0),
                new List<Tuple<int, Point3D>>() 
                {
                    new Tuple<int, Point3D>(0x9170, new Point3D(0, 1, 0)),
                    new Tuple<int, Point3D>(0x9178, new Point3D(-1, 0, 0)),
                    new Tuple<int, Point3D>(0x9171, new Point3D(-1, 1, 0)),
                    new Tuple<int, Point3D>(0x9176, new Point3D(1, 0, 0)),
                    new Tuple<int, Point3D>(0x916F, new Point3D(1, 1, 0)),                    
                }, 16000);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, -2, 6), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, -2, 6), BoatRopeSide.Port, 0); 
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, 3, 6), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, 3, 6), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
			m_TillerMan = new TillerManHS(this, 0, new Point3D(0, -2, 6) );
			Name = "a Tokuno Galleon";
			
            // make them siegable by default
            // XmlSiege( hitsmax, resistfire, resistphysical, wood, iron, stone)

            // undo the temporary hue indicator that is set when the xmlsiege attachment is added
            this.Hue = 0;			
			
        }
Esempio n. 5
0
        public override void OnDoubleClick(Mobile from)
        {
            int number;

            BankBox          box  = from.FindBankNoCreate();
            CommodityDeedBox cox  = CommodityDeedBox.Find(this);
            GalleonHold      hold = RootParent as GalleonHold;

            // Veteran Rewards mods
            if (m_Commodity != null)
            {
                if (box != null && IsChildOf(box))
                {
                    number = 1047031; // The commodity has been redeemed.

                    box.DropItem(m_Commodity);

                    m_Commodity = null;
                    Delete();
                }
                else if (cox != null)
                {
                    if (cox.IsSecure)
                    {
                        number = 1047031; // The commodity has been redeemed.

                        cox.DropItem(m_Commodity);

                        m_Commodity = null;
                        Delete();
                    }
                    else
                    {
                        number = 1080525; // The commodity deed box must be secured before you can use it.
                    }
                }
                else if (hold != null)
                {
                    number = 1047031; // The commodity has been redeemed.

                    hold.DropItem(m_Commodity);
                    m_Commodity = null;

                    Delete();
                }
                else
                {
                    if (Core.ML)
                    {
                        number = 1080526; // That must be in your bank box or commodity deed box to use it.
                    }
                    else
                    {
                        number = 1047024; // To claim the resources ....
                    }
                }
            }
            else if (cox != null && !cox.IsSecure)
            {
                number = 1080525; // The commodity deed box must be secured before you can use it.
            }
            else if ((box == null || !IsChildOf(box)) && cox == null && hold == null)
            {
                if (Core.ML)
                {
                    number = 1080526; // That must be in your bank box or commodity deed box to use it.
                }
                else
                {
                    number = 1047026; // That must be in your bank box to use it.
                }
            }
            else
            {
                number = 1047029; // Target the commodity to fill this deed with.

                from.Target = new InternalTarget(this);
            }

            from.SendLocalizedMessage(number);
        }
Esempio n. 6
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_CannonCenter = reader.ReadItem() as SingleCannonPlace;
            m_CannonSupSx = reader.ReadItem() as MultiCannonPlace;
            m_CannonSupDx = reader.ReadItem() as MultiCannonPlace;
            m_CannonMidSx = reader.ReadItem() as SingleCannonPlace;
            m_CannonMidDx = reader.ReadItem() as SingleCannonPlace;
            m_CannonInfSx = reader.ReadItem() as MultiCannonPlace;
            m_CannonInfDx = reader.ReadItem() as MultiCannonPlace;
            m_Helm = reader.ReadItem() as MultiHelm;
            m_Hold = reader.ReadItem() as GalleonHold;
        }
Esempio n. 7
0
        public OrcGalleon()
            : base(0x18)
        {
            m_CannonCenter = new SingleCannonPlace(this, 0x7924, new Point3D(0, -6, 0));
            m_CannonSupSx = new MultiCannonPlace(this, 0x793D, new Point3D(-2, -2, 0), 0x7944, 0x7936);
            m_CannonSupDx = new MultiCannonPlace(this, 0x7941, new Point3D(2, -2, 0), 0x7948, 0x793A);
            m_CannonMidSx = new SingleCannonPlace(this, 0x7959, new Point3D(-2, 2, 0));
            m_CannonMidDx = new SingleCannonPlace(this, 0x795D, new Point3D(2, 2, 0));
            m_CannonInfSx = new MultiCannonPlace(this, 0x796E, new Point3D(-2, 5, 0), 0x7975);
            m_CannonInfDx = new MultiCannonPlace(this, 0x7972, new Point3D(2, 5, 0), 0x7979);
            m_Helm = new MultiHelm(this, 0x79A5, new Point3D(0, 7, 1), 0x79A4, 0x79A6);
            m_Hold = new GalleonHold(this, 0x798D, new Point3D(0, 9, 0),
                new List<Tuple<int, Point3D>>() 
                {
                    new Tuple<int, Point3D>(0x7994, new Point3D(0, 1, 0)),
                    new Tuple<int, Point3D>(0x798B, new Point3D(-1, 0, 0)),
                    new Tuple<int, Point3D>(0x7992, new Point3D(-1, 1, 0)),
                    new Tuple<int, Point3D>(0x7990, new Point3D(1, 0, 0)),
                    new Tuple<int, Point3D>(0x7997, new Point3D(1, 1, 0)),                    
                }, 14000);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, -1, 14), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, -1, 14), BoatRopeSide.Port, 0); 
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, 3, 14), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, 3, 14), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, 7, 14), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, 7, 14), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
			m_TillerMan = new TillerManHS(this, 0, new Point3D(0, 2, 10) );
			Name = "an Orc Galleon";

            // undo the temporary hue indicator that is set when the xmlsiege attachment is added
            this.Hue = 0;	
        }
Esempio n. 8
0
        public GargoyleGalleon()
            : base(0x24)
        {
            m_CannonCenter = new SingleCannonPlace(this, 0x8516, new Point3D(0, -8, 0));
            m_CannonSupSx = new SingleCannonPlace(this, 0x84FD, new Point3D(-2, -5, 0));
            m_CannonSupDx = new SingleCannonPlace(this, 0x84FF, new Point3D(2, -5, 0));
            m_CannonMidSx = new SingleCannonPlace(this, 0x8489, new Point3D(-2, -2, 0));
            m_CannonMidDx = new SingleCannonPlace(this, 0x848E, new Point3D(2, -2, 0));
            m_CannonInfSx = new SingleCannonPlace(this, 0x84AA, new Point3D(-2, 1, 0));
            m_CannonInfDx = new SingleCannonPlace(this, 0x84AC, new Point3D(2, 1, 0));
            m_Helm = new SingleHelm(this, 0x85A0, new Point3D(0, 2, 0));
            m_Hold = new GalleonHold(this, 0x84CA, new Point3D(0, 5, 0),
                new List<Tuple<int, Point3D>>() 
                {
                    new Tuple<int, Point3D>(0x84CC, new Point3D(-2, 0, 0)), // stiva lato sx 1/4
                    new Tuple<int, Point3D>(0x84D3, new Point3D(-2, 1, 0)), // stiva lato sx 2/4
                    new Tuple<int, Point3D>(0x84DA, new Point3D(-2, 2, 0)), // stiva lato sx 3/4
                    new Tuple<int, Point3D>(0x84E1, new Point3D(-2, 3, 0)), // stiva lato sx 4/4

                    new Tuple<int, Point3D>(0x84CB, new Point3D(-1, 0, 0)), // stiva sup sx       
                    new Tuple<int, Point3D>(0x84D2, new Point3D(-1, 1, 0)), // stiva Centro sx 1/2
                    new Tuple<int, Point3D>(0x84D9, new Point3D(-1, 2, 0)), // stiva Centro sx 2/2
                    new Tuple<int, Point3D>(0x84E0, new Point3D(-1, 3, 0)), // stiva inf sx
   
                    //new Tuple<int, Point3D>(0x84CA, new Point3D(0, 0, 0)),  // stiva sup ( container )
                    new Tuple<int, Point3D>(0x84D1, new Point3D(0, 1, 0)),  // stiva Centro 1/2
                    new Tuple<int, Point3D>(0x84D8, new Point3D(0, 2, 0)),  // stiva Centro 2/2 
                    new Tuple<int, Point3D>(0x84DF, new Point3D(0, 3, 0)),  // stiva inf

                    new Tuple<int, Point3D>(0x84D0, new Point3D(1, 0, 0)), // stiva sup dx 
                    new Tuple<int, Point3D>(0x84D7, new Point3D(1, 1, 0)), // stiva Centro dx 1/2
                    new Tuple<int, Point3D>(0x84DE, new Point3D(1, 2, 0)), // stiva Centro dx 2/2
                    new Tuple<int, Point3D>(0x84E5, new Point3D(1, 3, 0)), // stiva inf dx

                    new Tuple<int, Point3D>(0x84CE, new Point3D(2, 0, 0)), // stiva lato dx 1/4
                    new Tuple<int, Point3D>(0x84D5, new Point3D(2, 1, 0)), // stiva lato dx 2/4
                    new Tuple<int, Point3D>(0x84DC, new Point3D(2, 2, 0)), // stiva lato dx 3/4
                    new Tuple<int, Point3D>(0x84E3, new Point3D(2, 3, 0)), // stiva lato dx 4/4
                }, 12000);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, -4, 14), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, -4, 14), BoatRopeSide.Port, 0); 
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, -1, 14), BoatRopeSide.Starboard, 0);
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, -1, 14), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-2, 2, 14), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(2, 2, 14), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
			m_TillerMan = new TillerManHS(this, 0, new Point3D(0, -4, 12) );
			Name = "a Gargoyle Galleon";
			
            // make them siegable by default
            // XmlSiege( hitsmax, resistfire, resistphysical, wood, iron, stone)

            // undo the temporary hue indicator that is set when the xmlsiege attachment is added
            this.Hue = 0;			
			
        }
Esempio n. 9
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_CannonCenter = reader.ReadItem() as SingleCannonPlace;
            m_CannonSupSx = reader.ReadItem() as SingleCannonPlace;
            m_CannonSupDx = reader.ReadItem() as SingleCannonPlace;
            m_CannonMidSupSx = reader.ReadItem() as SingleCannonPlace;
            m_CannonMidSupDx = reader.ReadItem() as SingleCannonPlace;
            m_CannonMidInfSx = reader.ReadItem() as SingleCannonPlace;
            m_CannonMidInfDx = reader.ReadItem() as SingleCannonPlace;
            m_CannonInfSx = reader.ReadItem() as SingleCannonPlace;
            m_CannonInfDx = reader.ReadItem() as SingleCannonPlace;
            m_Helm = reader.ReadItem() as SingleHelm;
            m_Hold = reader.ReadItem() as GalleonHold;
            m_MainMast = reader.ReadItem() as MainMast;
            m_Hull = reader.ReadItem() as BritainHull;
        }
Esempio n. 10
0
        public BritainGalleon()
            : base(0x40)
        {
            m_CannonCenter = new SingleCannonPlace(this, 0x5C06, new Point3D(0, -9, 0));
            m_CannonSupSx = new SingleCannonPlace(this, 0x5C19, new Point3D(-3, -5, 0));
            m_CannonSupDx = new SingleCannonPlace(this, 0x5C18, new Point3D(3, -5, 0));
            m_CannonMidSupSx = new SingleCannonPlace(this, 0x5C1A, new Point3D(-3, -1, 0));
            m_CannonMidSupDx = new SingleCannonPlace(this, 0x5C1C, new Point3D(3, -1, 0));
            m_CannonMidInfSx = new SingleCannonPlace(this, 0x5C21, new Point3D(-3, 3, 0));
            m_CannonMidInfDx = new SingleCannonPlace(this, 0x5C1F, new Point3D(3, 3, 0));
            m_CannonInfSx = new SingleCannonPlace(this, 0x5C25, new Point3D(-3, 7, 0));
            m_CannonInfDx = new SingleCannonPlace(this, 0x5C23, new Point3D(3, 7, 0));
            m_Helm = new SingleHelm(this, 0x5C0C, new Point3D(0, 3, 1));
            m_Hold = new GalleonHold(this, 0x5C2A, new Point3D(0, 9, 0),
                new List<Tuple<int, Point3D>>() 
                {
                    new Tuple<int, Point3D>(0x5C2C, new Point3D(-1, -1, 0)),
                    new Tuple<int, Point3D>(0x5C2F, new Point3D(-1, 0, 0)),
                    new Tuple<int, Point3D>(0x5C32, new Point3D(-1, 1, 0)),

                    new Tuple<int, Point3D>(0x5C2D, new Point3D(0, 0, 0)),
                    new Tuple<int, Point3D>(0x5C30, new Point3D(0, 1, 0)),   
                 
                    new Tuple<int, Point3D>(0x5C2B, new Point3D(1, -1, 0)),
                    new Tuple<int, Point3D>(0x5C2E, new Point3D(1, 0, 0)),
                    new Tuple<int, Point3D>(0x5C31, new Point3D(1, 1, 0)),
                }, 28000);

            m_MainMast = new MainMast(this, 0x5CE3, new Point3D(0, -3, 0));
            m_Hull = new BritainHull(this, 0x58A5);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-3, -4, 16), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(3, -4, 16), BoatRopeSide.Port, 0); 
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-3, 0, 16), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(3, 0, 16), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-3, 4, 16), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(3, 4, 16), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
            m_SRope = new BoatRope2(this, 0x14F8, new Point3D(-3, 8, 16), BoatRopeSide.Starboard, 0); 
			Ropes.Add(m_SRope);
            m_PRope = new BoatRope2(this, 0x14F8, new Point3D(3, 8, 16), BoatRopeSide.Port, 0);
			Ropes.Add(m_PRope);
			m_TillerMan = new TillerManHS(this, 0, new Point3D(0, 7, 12) );
			Name = "a Britain Galleon";
			
            // make them siegable by default
            // XmlSiege( hitsmax, resistfire, resistphysical, wood, iron, stone)

            // undo the temporary hue indicator that is set when the xmlsiege attachment is added
            this.Hue = 0;				
			
        }
Esempio n. 11
0
 public HoldItem(GalleonHold hold, int itemid) : base(itemid)
 {
     Hold    = hold;
     Movable = false;
 }
Esempio n. 12
0
 public HoldItem(GalleonHold hold, int itemid) : base(itemid)
 {
     m_Hold = hold;
     Movable = false;
 }
Esempio n. 13
0
 public override void Deserialize(GenericReader reader)
 {
     base.Deserialize(reader);
     int version = reader.ReadInt();
     m_Hold = reader.ReadItem() as GalleonHold;
 }
Esempio n. 14
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
                case 3:
                case 2:
                    m_Pole = reader.ReadItem() as BindingPole;
                    m_CapturedCaptain = reader.ReadMobile();
                    goto case 1;
                case 1:
                    m_BaseBoatHue = reader.ReadInt();
                    goto case 0;
                case 0:
                    m_GalleonPilot = reader.ReadMobile();
                    m_Hits = reader.ReadInt();
                    m_Wheel = reader.ReadItem() as ShipWheel;
                    m_GalleonHold = reader.ReadItem() as GalleonHold;

                    if (version < 3)
                    {
                        reader.ReadItem();
                        reader.ReadItem();
                    }

                    m_DamageTaken = (DamageLevel)reader.ReadInt();

                    m_BasePaintHue = reader.ReadInt();
                    m_PaintCoats = reader.ReadInt();
                    m_NextPaintDecay = reader.ReadDateTime();

                    m_SecurityEntry = new SecurityEntry(this, reader);

                    int count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        Static tile = reader.ReadItem() as Static;
                        if (tile != null && !tile.Deleted)
                            AddCannonTile(tile);
                    }

                    count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        Item cannon = reader.ReadItem();
                        if (cannon != null && !cannon.Deleted)
                            m_Cannons.Add(cannon);
                    }

                    count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        Static filler = reader.ReadItem() as Static;
                        if (filler != null && !filler.Deleted)
                            AddFillerTile(filler);
                    }

                    count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        MooringLine line = reader.ReadItem() as MooringLine;
                        if (line != null && !line.Deleted)
                            AddMooringLine(line);
                    }

                    count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        HoldItem hItem = reader.ReadItem() as HoldItem;
                        if (hItem != null && !hItem.Deleted)
                            AddHoldTile(hItem);
                    }

                    count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        Item addon = reader.ReadItem();
                        if (addon != null && !addon.Deleted)
                            AddAddon(addon);
                    }

                    count = reader.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        Static atile = reader.ReadItem() as Static;
                        if (atile != null && !atile.Deleted)
                            AddAddonTile(atile);
                    }

                    break;
            }

            if (m_Pole != null)
                m_Pole.Galleon = this;
        }
Esempio n. 15
0
 protected GalleonHold AddGalleonHold(GalleonHold hold)
 {
     hold.Name = "cargo hold";
     m_GalleonHold = hold;
     return hold;
 }