public CCMagicDoor( DoorFacing facing )
     : base()
 {
     m_Facing = facing;
     ItemID = 0x677;
     Visible = true;
 }
        public override void Deserialize(GenericReader reader)
        {
            //base.SkipDeserialize( reader );

            base.Deserialize( reader );

            int version = reader.ReadInt();
            /*
            switch (version)
            {
                case 1:
                    m_Altar = reader.ReadItem() as CCSummoningAltar;
                    goto case 0;
                case 0:
                    // Version 0
                    PointDest = reader.ReadPoint3D();
                    Name = reader.ReadString();
                    Active = reader.ReadBool();
                    m_OneSideArea = reader.ReadRect2D();
                    break;
            }
            */
            switch (version)
            {
                case 0:
                    m_Facing = (DoorFacing)reader.ReadInt();
                    m_Altar = reader.ReadItem() as CCSummoningAltar;
                    break;
            }
        }
		public YardIronGate( Mobile from, int price, DoorFacing facing, Point3D loc) : base(facing)
		{
			m_Value = price;
			m_Placer = from;
			Movable = false;
			MoveToWorld( loc, from.Map );
			Name = from.Name + "'s Gate";
		}
 public DestroyableBarredMetalDoor(DoorFacing facing)
     : base(0x685 + (2 * (int)facing), 0x686 + (2 * (int)facing), 0xEC, 0xF3, BaseDestroyableDoor.GetOffset(facing))
 {
     Name = "Barred Metal Door";
     Weight = 1.0;
     HitsMax = 50;
     Hits = 50;
 }
Example #5
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                {
                    m_Facing = (DoorFacing)reader.ReadInt();
                    break;
                }
            }
        }
Example #6
0
        public YardGate(int itemID, Mobile placer, int price, BaseHouse house, Point3D location, DoorFacing facing)
            : base(itemID, itemID + 1, GetOpenedSound(itemID), GetClosedSound(itemID), BaseDoor.GetOffset(facing))
        {
            Placer = placer;
            Price = price;

            Movable = false;
            MoveToWorld(location, placer.Map);

            if (house == null)
            {
                FindHouseOfPlacer();
            }
            else
            {
                House = house;
            }

            SetName();
        }
Example #7
0
 public DarkWoodGate( DoorFacing facing )
     : base(0x866 + ( 2 * (int) facing ), 0x867 + ( 2 * (int) facing ), 0xEB, 0xF2, BaseDoor.GetOffset( facing ))
 {
 }
Example #8
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_Level = (SecureLevel)reader.ReadInt();
					goto case 0;
				}
				case 0:
				{
					if ( version < 1 )
						m_Level = SecureLevel.Anyone;

					m_Facing = (DoorFacing)reader.ReadInt();
					break;
				}
			}
		}
Example #9
0
		public GenericHouseDoor( DoorFacing facing, int baseItemID, int openedSound, int closedSound, bool autoAdjust )
			: base( facing, baseItemID + (autoAdjust ? (2 * (int)facing) : 0), baseItemID + 1 + (autoAdjust ? (2 * (int)facing) : 0), openedSound, closedSound, BaseDoor.GetOffset( facing ) )
		{
		}
Example #10
0
 public SecretStoneDoor2(DoorFacing facing) : base(0x324 + (2 * (int)facing), 0x325 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset(facing))
 {
 }
Example #11
0
 public SecretLightWoodDoor(DoorFacing facing) : base(0x344 + 2 * (int)facing, 0x345 + 2 * (int)facing, 0xED, 0xF4, GetOffset(facing))
 {
 }
Example #12
0
 public MediumWoodDoor( DoorFacing facing )
     : base(0x6B5 + ( 2 * (int) facing ), 0x6B6 + ( 2 * (int) facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #13
0
 public StrongWoodDoor( DoorFacing facing )
     : base(0x6E5 + ( 2 * (int) facing ), 0x6E6 + ( 2 * (int) facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #14
0
 public BaseHouseDoor(DoorFacing facing, int closedID, int openedID, int openedSound, int closedSound, Point3D offset) : base(closedID, openedID, openedSound, closedSound, offset)
 {
     m_Facing = facing;
     m_Level  = SecureLevel.Anyone;
 }
Example #15
0
 public GenericHouseDoor(DoorFacing facing, int baseItemID, int openedSound, int closedSound) : this(facing, baseItemID, openedSound, closedSound, true)
 {
 }
 public CraftableMetalHouseDoor(DoorType type, DoorFacing facing)
     : base(facing)
 {
     this.Type = type;
 }
 public CraftableStoneHouseDoor(DoorType type, DoorFacing facing)
     : base(facing, 0x324 + (2 * (int)facing), 0x325 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset(facing))
 {
     this.Type = type;
 }
Example #18
0
 public BaseHouseDoor(DoorFacing facing, int closedID, int openedID, int openedSound, int closedSound, Point3D offset) : base(closedID, openedID, openedSound, closedSound, offset)
 {
     m_Facing = facing;
 }
Example #19
0
 public DarkWoodHouseDoor(DoorFacing facing) : base(facing, 0x6A5 + 2 * (int)facing, 0x6A6 + 2 * (int)facing, 0xEA,
                                                    0xF1, GetOffset(facing))
 {
 }
Example #20
0
 public MetalHouseDoor(DoorFacing facing) : base(facing, 0x675 + 2 * (int)facing, 0x676 + 2 * (int)facing, 0xEC, 0xF3,
                                                 GetOffset(facing))
 {
 }
Example #21
0
 public SecretWoodenDoor(DoorFacing facing) : base(0x334 + 2 * (int)facing, 0x335 + 2 * (int)facing, 0xED, 0xF4, GetOffset(facing))
 {
 }
Example #22
0
 public GenericHouseDoor(DoorFacing facing, int baseItemID, int openedSound, int closedSound, bool autoAdjust)
     : base(facing, baseItemID + (autoAdjust ? (2 * (int)facing) : 0), baseItemID + 1 + (autoAdjust ? (2 * (int)facing) : 0), openedSound, closedSound, BaseDoor.GetOffset(facing))
 {
 }
Example #23
0
 public LightWoodDoor( DoorFacing facing )
     : base(0x6D5 + ( 2 * (int) facing ), 0x6D6 + ( 2 * (int) facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #24
0
            private Item GetFixtureItem(int dItemID)
            {
                int itemID = (dItemID & 0x3FFF);

                if (itemID >= 0x181D && itemID < 0x1829)
                {
                    //Ignore teleporters!
                    //HouseTeleporter tp = new HouseTeleporter(itemID);
                    //AddFixture(tp, mte);
                }
                else
                {
                    BaseDoor door = null;

                    if (itemID >= 0x675 && itemID < 0x6F5)
                    {
                        int        type   = (itemID - 0x675) / 16;
                        DoorFacing facing = (DoorFacing)(((itemID - 0x675) / 2) % 8);

                        switch (type)
                        {
                        case 0: door = new GenericHouseDoor(facing, 0x675, 0xEC, 0xF3); break;

                        case 1: door = new GenericHouseDoor(facing, 0x685, 0xEC, 0xF3); break;

                        case 2: door = new GenericHouseDoor(facing, 0x695, 0xEB, 0xF2); break;

                        case 3: door = new GenericHouseDoor(facing, 0x6A5, 0xEA, 0xF1); break;

                        case 4: door = new GenericHouseDoor(facing, 0x6B5, 0xEA, 0xF1); break;

                        case 5: door = new GenericHouseDoor(facing, 0x6C5, 0xEC, 0xF3); break;

                        case 6: door = new GenericHouseDoor(facing, 0x6D5, 0xEA, 0xF1); break;

                        case 7: door = new GenericHouseDoor(facing, 0x6E5, 0xEA, 0xF1); break;
                        }
                    }
                    else if (itemID >= 0x314 && itemID < 0x364)
                    {
                        int        type   = (itemID - 0x314) / 16;
                        DoorFacing facing = (DoorFacing)(((itemID - 0x314) / 2) % 8);

                        switch (type)
                        {
                        case 0: door = new GenericHouseDoor(facing, 0x314, 0xED, 0xF4); break;

                        case 1: door = new GenericHouseDoor(facing, 0x324, 0xED, 0xF4); break;

                        case 2: door = new GenericHouseDoor(facing, 0x334, 0xED, 0xF4); break;

                        case 3: door = new GenericHouseDoor(facing, 0x344, 0xED, 0xF4); break;

                        case 4: door = new GenericHouseDoor(facing, 0x354, 0xED, 0xF4); break;
                        }
                    }
                    else if (itemID >= 0x824 && itemID < 0x834)
                    {
                        DoorFacing facing = (DoorFacing)(((itemID - 0x824) / 2) % 8);
                        door = new GenericHouseDoor(facing, 0x824, 0xEC, 0xF3);
                    }
                    else if (itemID >= 0x839 && itemID < 0x849)
                    {
                        DoorFacing facing = (DoorFacing)(((itemID - 0x839) / 2) % 8);
                        door = new GenericHouseDoor(facing, 0x839, 0xEB, 0xF2);
                    }
                    else if (itemID >= 0x84C && itemID < 0x85C)
                    {
                        DoorFacing facing = (DoorFacing)(((itemID - 0x84C) / 2) % 8);
                        door = new GenericHouseDoor(facing, 0x84C, 0xEC, 0xF3);
                    }
                    else if (itemID >= 0x866 && itemID < 0x876)
                    {
                        DoorFacing facing = (DoorFacing)(((itemID - 0x866) / 2) % 8);
                        door = new GenericHouseDoor(facing, 0x866, 0xEB, 0xF2);
                    }
                    else if (itemID >= 0xE8 && itemID < 0xF8)
                    {
                        DoorFacing facing = (DoorFacing)(((itemID - 0xE8) / 2) % 8);
                        door = new GenericHouseDoor(facing, 0xE8, 0xED, 0xF4);
                    }
                    else if (itemID >= 0x1FED && itemID < 0x1FFD)
                    {
                        DoorFacing facing = (DoorFacing)(((itemID - 0x1FED) / 2) % 8);
                        door = new GenericHouseDoor(facing, 0x1FED, 0xEC, 0xF3);
                    }

                    if (door != null)
                    {
                        return(door);
                    }
                }

                return(null);
            }            //end of GetFixtureItem
Example #25
0
 public BarredMetalDoor2( DoorFacing facing )
     : base(0x1FED + ( 2 * (int) facing ), 0x1FEE + ( 2 * (int) facing ), 0xEC, 0xF3, BaseDoor.GetOffset( facing ))
 {
 }
Example #26
0
        public Item Construct()
        {
            if (m_Type == null)
            {
                return(null);
            }

            Item item;

            try
            {
                if (m_Type == typeofStatic)
                {
                    item = new Static(m_ItemID);
                }
                else if (m_Type == typeofLocalizedStatic)
                {
                    int labelNumber = 0;

                    for (int i = 0; i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("LabelNumber"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                labelNumber = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                                break;
                            }
                        }
                    }

                    item = new LocalizedStatic(m_ItemID, labelNumber);
                }
                else if (m_Type == typeofLocalizedSign)
                {
                    int labelNumber = 0;

                    for (int i = 0; i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("LabelNumber"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                labelNumber = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                                break;
                            }
                        }
                    }

                    item = new LocalizedSign(m_ItemID, labelNumber);
                }
                else if (m_Type == typeofAnkhWest || m_Type == typeofAnkhNorth)
                {
                    bool bloodied = false;

                    for (int i = 0; !bloodied && i < m_Params.Length; ++i)
                    {
                        bloodied = m_Params[i] == "Bloodied";
                    }

                    if (m_Type == typeofAnkhWest)
                    {
                        item = new AnkhWest(bloodied);
                    }
                    else
                    {
                        item = new AnkhNorth(bloodied);
                    }
                }
                else if (m_Type == typeofHintItem)
                {
                    int      range         = 0;
                    int      messageNumber = 0;
                    string   messageString = null;
                    int      hintNumber    = 0;
                    string   hintString    = null;
                    TimeSpan resetDelay    = TimeSpan.Zero;

                    for (int i = 0; i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("Range"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                range = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                            }
                        }
                        else if (m_Params[i].StartsWith("WarningString"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                messageString = m_Params[i].Substring(++indexOf);
                            }
                        }
                        else if (m_Params[i].StartsWith("WarningNumber"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                messageNumber = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                            }
                        }
                        else if (m_Params[i].StartsWith("HintString"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                hintString = m_Params[i].Substring(++indexOf);
                            }
                        }
                        else if (m_Params[i].StartsWith("HintNumber"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                hintNumber = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                            }
                        }
                        else if (m_Params[i].StartsWith("ResetDelay"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                resetDelay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                            }
                        }
                    }

                    HintItem hi = new HintItem(m_ItemID, range, messageNumber, hintNumber);

                    hi.WarningString = messageString;
                    hi.HintString    = hintString;
                    hi.ResetDelay    = resetDelay;

                    item = hi;
                }
                else if (m_Type == typeofWarningItem)
                {
                    int      range         = 0;
                    int      messageNumber = 0;
                    string   messageString = null;
                    TimeSpan resetDelay    = TimeSpan.Zero;

                    for (int i = 0; i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("Range"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                range = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                            }
                        }
                        else if (m_Params[i].StartsWith("WarningString"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                messageString = m_Params[i].Substring(++indexOf);
                            }
                        }
                        else if (m_Params[i].StartsWith("WarningNumber"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                messageNumber = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                            }
                        }
                        else if (m_Params[i].StartsWith("ResetDelay"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                resetDelay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                            }
                        }
                    }

                    WarningItem wi = new WarningItem(m_ItemID, range, messageNumber);

                    wi.WarningString = messageString;
                    wi.ResetDelay    = resetDelay;

                    item = wi;
                }
                else if (m_Type == typeofSerpentPillar)
                {
                    string      word        = null;
                    Rectangle2D destination = new Rectangle2D();

                    for (int i = 0; i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("Word"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                word = m_Params[i].Substring(++indexOf);
                            }
                        }
                        else if (m_Params[i].StartsWith("DestStart"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                destination.Start = Point2D.Parse(m_Params[i].Substring(++indexOf));
                            }
                        }
                        else if (m_Params[i].StartsWith("DestEnd"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                destination.End = Point2D.Parse(m_Params[i].Substring(++indexOf));
                            }
                        }
                    }

                    item = new SerpentPillar(word, destination);
                }
                else if (m_Type.IsSubclassOf(typeofBeverage))
                {
                    BeverageType content = BeverageType.Liquor;
                    bool         fill    = false;

                    for (int i = 0; !fill && i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("Content"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                content = (BeverageType)Enum.Parse(typeof(BeverageType), m_Params[i].Substring(++indexOf), true);
                                fill    = true;
                            }
                        }
                    }

                    if (fill)
                    {
                        item = (Item)Activator.CreateInstance(m_Type, new object[] { content });
                    }
                    else
                    {
                        item = (Item)Activator.CreateInstance(m_Type);
                    }
                }
                else if (m_Type.IsSubclassOf(typeofBaseDoor))
                {
                    DoorFacing facing = DoorFacing.WestCW;

                    for (int i = 0; i < m_Params.Length; ++i)
                    {
                        if (m_Params[i].StartsWith("Facing"))
                        {
                            int indexOf = m_Params[i].IndexOf('=');

                            if (indexOf >= 0)
                            {
                                facing = (DoorFacing)Enum.Parse(typeof(DoorFacing), m_Params[i].Substring(++indexOf), true);
                                break;
                            }
                        }
                    }

                    item = (Item)Activator.CreateInstance(m_Type, new object[] { facing });
                }
                else
                {
                    item = (Item)Activator.CreateInstance(m_Type);
                }
            }
            catch (Exception e)
            {
                throw new Exception(String.Format("Bad type: {0}", m_Type), e);
            }

            if (item is BaseLight)
            {
                bool unlit = false, unprotected = false;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (!unlit && m_Params[i] == "Unlit")
                    {
                        unlit = true;
                    }
                    else if (!unprotected && m_Params[i] == "Unprotected")
                    {
                        unprotected = true;
                    }

                    if (unlit && unprotected)
                    {
                        break;
                    }
                }

                if (!unlit)
                {
                    ((BaseLight)item).Ignite();
                }
                if (!unprotected)
                {
                    ((BaseLight)item).Protected = true;
                }

                if (m_ItemID > 0)
                {
                    item.ItemID = m_ItemID;
                }
            }
            else if (item is Server.Mobiles.Spawner)
            {
                Server.Mobiles.Spawner sp = (Server.Mobiles.Spawner)item;

                sp.NextSpawn = TimeSpan.Zero;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (m_Params[i].StartsWith("Spawn"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            //sp.SpawnNames.Add( m_Params[i].Substring( ++indexOf ) );
                            sp.CreaturesName.Add(m_Params[i].Substring(++indexOf)); // Use this for pre-.NET 2.0 lists
                        }
                    }
                    else if (m_Params[i].StartsWith("MinDelay"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.MinDelay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("MaxDelay"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.MaxDelay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("NextSpawn"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.NextSpawn = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Count"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.Count = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Team"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.Team = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("HomeRange"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.HomeRange = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Running"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.Running = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Group"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            sp.Group = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                }
            }
            else if (item is RecallRune)
            {
                RecallRune rune = (RecallRune)item;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (m_Params[i].StartsWith("Description"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            rune.Description = m_Params[i].Substring(++indexOf);
                        }
                    }
                    else if (m_Params[i].StartsWith("Marked"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            rune.Marked = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("TargetMap"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            rune.TargetMap = Map.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Target"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            rune.Target = Point3D.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                }
            }
            else if (item is SkillTeleporter)
            {
                SkillTeleporter tp = (SkillTeleporter)item;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (m_Params[i].StartsWith("Skill"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Skill = (SkillName)Enum.Parse(typeof(SkillName), m_Params[i].Substring(++indexOf), true);
                        }
                    }
                    else if (m_Params[i].StartsWith("RequiredFixedPoint"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Required = Utility.ToInt32(m_Params[i].Substring(++indexOf)) * 0.1;
                        }
                    }
                    else if (m_Params[i].StartsWith("Required"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Required = Utility.ToDouble(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("MessageString"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.MessageString = m_Params[i].Substring(++indexOf);
                        }
                    }
                    else if (m_Params[i].StartsWith("MessageNumber"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.MessageNumber = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("PointDest"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.PointDest = Point3D.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("MapDest"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.MapDest = Map.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Creatures"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Creatures = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("SourceEffect"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.SourceEffect = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("DestEffect"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.DestEffect = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("SoundID"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.SoundID = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Delay"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Delay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                }

                if (m_ItemID > 0)
                {
                    item.ItemID = m_ItemID;
                }
            }
            else if (item is KeywordTeleporter)
            {
                KeywordTeleporter tp = (KeywordTeleporter)item;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (m_Params[i].StartsWith("Substring"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Substring = m_Params[i].Substring(++indexOf);
                        }
                    }
                    else if (m_Params[i].StartsWith("Keyword"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Keyword = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Range"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Range = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("PointDest"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.PointDest = Point3D.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("MapDest"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.MapDest = Map.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Creatures"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Creatures = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("SourceEffect"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.SourceEffect = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("DestEffect"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.DestEffect = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("SoundID"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.SoundID = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Delay"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Delay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                }

                if (m_ItemID > 0)
                {
                    item.ItemID = m_ItemID;
                }
            }
            else if (item is Teleporter)
            {
                Teleporter tp = (Teleporter)item;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (m_Params[i].StartsWith("PointDest"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.PointDest = Point3D.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("MapDest"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.MapDest = Map.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Creatures"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Creatures = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("SourceEffect"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.SourceEffect = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("DestEffect"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.DestEffect = Utility.ToBoolean(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("SoundID"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.SoundID = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        }
                    }
                    else if (m_Params[i].StartsWith("Delay"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            tp.Delay = TimeSpan.Parse(m_Params[i].Substring(++indexOf));
                        }
                    }
                }

                if (m_ItemID > 0)
                {
                    item.ItemID = m_ItemID;
                }
            }
            else if (item is FillableContainer)
            {
                FillableContainer cont = (FillableContainer)item;

                for (int i = 0; i < m_Params.Length; ++i)
                {
                    if (m_Params[i].StartsWith("ContentType"))
                    {
                        int indexOf = m_Params[i].IndexOf('=');

                        if (indexOf >= 0)
                        {
                            cont.ContentType = (FillableContentType)Enum.Parse(typeof(FillableContentType), m_Params[i].Substring(++indexOf), true);
                        }
                    }
                }

                if (m_ItemID > 0)
                {
                    item.ItemID = m_ItemID;
                }
            }
            else if (m_ItemID > 0)
            {
                item.ItemID = m_ItemID;
            }

            item.Movable = false;

            for (int i = 0; i < m_Params.Length; ++i)
            {
                if (m_Params[i].StartsWith("Light"))
                {
                    int indexOf = m_Params[i].IndexOf('=');

                    if (indexOf >= 0)
                    {
                        item.Light = (LightType)Enum.Parse(typeof(LightType), m_Params[i].Substring(++indexOf), true);
                    }
                }
                else if (m_Params[i].StartsWith("Hue"))
                {
                    int indexOf = m_Params[i].IndexOf('=');

                    if (indexOf >= 0)
                    {
                        int hue = Utility.ToInt32(m_Params[i].Substring(++indexOf));

                        if (item is DyeTub)
                        {
                            ((DyeTub)item).DyedHue = hue;
                        }
                        else
                        {
                            item.Hue = hue;
                        }
                    }
                }
                else if (m_Params[i].StartsWith("Name"))
                {
                    int indexOf = m_Params[i].IndexOf('=');

                    if (indexOf >= 0)
                    {
                        item.Name = m_Params[i].Substring(++indexOf);
                    }
                }
                else if (m_Params[i].StartsWith("Amount"))
                {
                    int indexOf = m_Params[i].IndexOf('=');

                    if (indexOf >= 0)
                    {
                        // Must supress stackable warnings

                        bool wasStackable = item.Stackable;

                        item.Stackable = true;
                        item.Amount    = Utility.ToInt32(m_Params[i].Substring(++indexOf));
                        item.Stackable = wasStackable;
                    }
                }
            }

            return(item);
        }
Example #27
0
        public static BaseDoor AddDoor(int x, int y, int z, DoorFacing facing)
        {
            int doorZ = z;
            int doorTop = doorZ + 20;

            if (!m_Map.CanFit(x, y, z, 16, false, false))
                return null;

            if (y == 1743 && x >= 1343 && x <= 1344)
                return null;

            if (y == 1679 && x >= 1392 && x <= 1393)
                return null;

            if (x == 1320 && y >= 1618 && y <= 1640)
                return null;

            if (x == 1383 && y >= 1642 && y <= 1643)
                return null;

            BaseDoor door = new DarkWoodDoor(facing);
			WeakEntityCollection.Add("door", door);
            door.MoveToWorld(new Point3D(x, y, z), m_Map);

            ++m_Count;

            return door;
        }
Example #28
0
 public SecretStoneDoor1(DoorFacing facing) : base(0xE8 + 2 * (int)facing, 0xE9 + 2 * (int)facing, 0xED, 0xF4, GetOffset(facing))
 {
 }
Example #29
0
 public SecretDungeonDoor(DoorFacing facing) : base(0x314 + 2 * (int)facing, 0x315 + 2 * (int)facing, 0xED, 0xF4, GetOffset(facing))
 {
 }
Example #30
0
 public GargishPrisonDoor( DoorFacing facing )
     : base(0x5142 + GetIdOffset( facing ), 0x5143 + GetIdOffset( facing ), 0xF0, 0xEF, BaseDoor.GetOffset( facing ))
 {
 }
Example #31
0
 public GenericHouseDoor(DoorFacing facing, int baseItemID, int openedSound, int closedSound)
     : base(facing, baseItemID + (2 * (int)facing), baseItemID + 1 + (2 * (int)facing), openedSound, closedSound, BaseDoor.GetOffset(facing))
 {
 }
Example #32
0
 public BarredMetalDoor( DoorFacing facing )
     : base(0x685 + ( 2 * (int) facing ), 0x686 + ( 2 * (int) facing ), 0xEC, 0xF3, BaseDoor.GetOffset( facing ))
 {
 }
Example #33
0
		public GenericHouseDoor( DoorFacing facing, int baseItemID, int openedSound, int closedSound ) : this( facing, baseItemID, openedSound, closedSound, true )
		{
		}
Example #34
0
 public IronGate( DoorFacing facing )
     : base(0x824 + ( 2 * (int) facing ), 0x825 + ( 2 * (int) facing ), 0xEC, 0xF3, BaseDoor.GetOffset( facing ))
 {
 }
Example #35
0
 public DarkWoodDoor( DoorFacing facing )
     : base(0x6A5 + ( 2 * (int) facing ), 0x6A6 + ( 2 * (int) facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #36
0
 public LargeGargishQueenDoor( DoorFacing facing )
     : base(0x4D1A + GetIdOffset( facing ), 0x4D1B + GetIdOffset( facing ), -1, -1, BaseDoor.GetOffset( facing ))
 {
 }
Example #37
0
 public GargishBentasDoor( DoorFacing facing )
     : base(0x50D0 + GetIdOffset( facing ), 0x50D1 + GetIdOffset( facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #38
0
 public SecretStoneDoor2(DoorFacing facing) : base(0x324 + 2 * (int)facing, 0x325 + 2 * (int)facing, 0xED, 0xF4, GetOffset(facing))
 {
 }
Example #39
0
 public GargishProgressiveDoor( DoorFacing facing )
     : base(0x41CF + GetIdOffset( facing ), 0x41D0 + GetIdOffset( facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #40
0
 public static Point3D GetOffset(DoorFacing facing)
 {
     return(m_Offsets[(int)facing]);
 }
Example #41
0
 public GargishTraditionalDoor( DoorFacing facing )
     : base(0x409B + GetIdOffset( facing ), 0x409C + GetIdOffset( facing ), 0xEA, 0xF1, BaseDoor.GetOffset( facing ))
 {
 }
Example #42
0
 public DarkWoodGate(DoorFacing facing)
     : base(0x866 + (2 * (int)facing), 0x867 + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset(facing))
 {
 }
Example #43
0
 public IronGateShort( DoorFacing facing )
     : base(0x84c + ( 2 * (int) facing ), 0x84d + ( 2 * (int) facing ), 0xEC, 0xF3, BaseDoor.GetOffset( facing ))
 {
 }
Example #44
0
 public MetalDoor(DoorFacing facing)
     : base(0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset(facing))
 {
 }
Example #45
0
        public static int GetIdOffset( DoorFacing facing )
        {
            switch ( facing )
            {
                case DoorFacing.WestCCW: return 0;
                case DoorFacing.EastCW: return 2;
                case DoorFacing.SouthCCW: return 4;
                case DoorFacing.NorthCW: return 6;
            }

            return 0;
        }
Example #46
0
 public BarredMetalDoor(DoorFacing facing)
     : base(0x685 + (2 * (int)facing), 0x686 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset(facing))
 {
 }
Example #47
0
 public LightWoodGate( DoorFacing facing )
     : base(0x839 + ( 2 * (int) facing ), 0x83A + ( 2 * (int) facing ), 0xEB, 0xF2, BaseDoor.GetOffset( facing ))
 {
 }
Example #48
0
 public BarredMetalDoor2(DoorFacing facing)
     : base(0x1FED + (2 * (int)facing), 0x1FEE + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset(facing))
 {
 }
Example #49
0
 public MetalDoor2( DoorFacing facing )
     : base(0x6C5 + ( 2 * (int) facing ), 0x6C6 + ( 2 * (int) facing ), 0xEC, 0xF3, BaseDoor.GetOffset( facing ))
 {
 }
Example #50
0
 public RattanDoor(DoorFacing facing)
     : base(0x695 + (2 * (int)facing), 0x696 + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset(facing))
 {
 }
Example #51
0
 public RattanDoor( DoorFacing facing )
     : base(0x695 + ( 2 * (int) facing ), 0x696 + ( 2 * (int) facing ), 0xEB, 0xF2, BaseDoor.GetOffset( facing ))
 {
 }
Example #52
0
 public IronGateShort(DoorFacing facing)
     : base(0x84c + (2 * (int)facing), 0x84d + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset(facing))
 {
 }
Example #53
0
		public ExperimentalRoomDoor( Room room, DoorFacing facing ) : base(facing) {
			m_Room = room;	
		}
Example #54
0
 public DarkWoodDoor(DoorFacing facing)
     : base(0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset(facing))
 {
 }
Example #55
0
		public BaseDoor MakeDoor( bool wood, DoorFacing facing )
		{
			if ( wood )
				return new DarkWoodHouseDoor( facing );
			else
				return new MetalHouseDoor( facing );
		}
Example #56
0
 public LightWoodGate(DoorFacing facing) : base(0x839 + (2 * (int)facing), 0x83A + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset(facing))
 {
 }