Пример #1
0
            /// <summary>
            /// 将字条串解析为类
            /// </summary>
            /// <param name="value"></param>
            public static StatueMaterial StrToClass(string value)
            {
                StatueMaterial result            = new StatueMaterial(0, "", 0);
                Dictionary <string, string> buff = All.Class.SSFile.Text2Dictionary(value);

                if (buff.ContainsKey("WorkStation"))
                {
                    result.WorkStation = All.Class.Num.ToInt(buff["WorkStation"]);
                }
                if (buff.ContainsKey("Material"))
                {
                    result.Material = buff["Material"];
                }
                if (buff.ContainsKey("MaterialNum"))
                {
                    result.MaterialNum = All.Class.Num.ToInt(buff["MaterialNum"]);
                }
                if (buff.ContainsKey("MaterialCount"))
                {
                    result.MaterialCount = All.Class.Num.ToInt(buff["MaterialCount"]);
                }
                if (buff.ContainsKey("SendTime"))
                {
                    result.SendTime = All.Class.Num.ToDateTime(buff["SendTime"]);
                }
                return(result);
            }
Пример #2
0
        private int GetMaterialNumber(StatueType type, StatueMaterial material)
        {
            switch (material)
            {
            case StatueMaterial.Antique:
            {
                switch (type)
                {
                case StatueType.Bronze: return(1076187);

                case StatueType.Jade: return(1076186);

                case StatueType.Marble: return(1076182);
                }

                return(1076187);
            }

            case StatueMaterial.Dark:
            {
                if (type == StatueType.Marble)
                {
                    return(1076183);
                }

                return(1076182);
            }

            case StatueMaterial.Medium: return(1076184);

            case StatueMaterial.Light: return(1076185);

            default: return(1076187);
            }
        }
Пример #3
0
        private string GetMaterialNumber(StatueType type, StatueMaterial material)
        {
            switch (material)
            {
            case StatueMaterial.Antique:

                switch (type)
                {
                case StatueType.Bronze: return("Bronze");

                case StatueType.Jade: return("Jade");

                case StatueType.Marble: return("Marble");
                }

                return("Bronze");

            case StatueMaterial.Dark:

                if (type == StatueType.Marble)
                {
                    return("Dark");
                }

                return("Dark");

            case StatueMaterial.Medium: return("Medium");

            case StatueMaterial.Light: return("Light");

            default: return("Bronze");
            }
        }
Пример #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            m_Type     = (StatueType)reader.ReadInt();
            m_Pose     = (StatuePose)reader.ReadInt();
            m_Material = (StatueMaterial)reader.ReadInt();

            m_SculptedBy = reader.ReadMobile();
            m_SculptedOn = reader.ReadDateTime();

            m_Plinth       = reader.ReadItem() as CharacterStatuePlinth;
            m_IsRewardItem = reader.ReadBool();

            InvalidatePose();

            Frozen = true;

            if (m_SculptedBy == null || Map == Map.Internal)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(Delete));
            }
        }
Пример #5
0
		private int GetMaterialNumber( StatueType type, StatueMaterial material )
		{
			switch ( material )
			{
				case StatueMaterial.Antique:

					switch ( type )
					{
						case StatueType.Bronze: return 1076187;
						case StatueType.Jade: return 1076186;
						case StatueType.Marble: return 1076182;
					}

					return 1076187;
				case StatueMaterial.Dark:

					if ( type == StatueType.Marble )
						return 1076183;

					return 1076182;
				case StatueMaterial.Medium: return 1076184;
				case StatueMaterial.Light: return 1076185;
				default: return 1076187;
			}
		}
Пример #6
0
        private int GetMaterialNumber(StatueType type, StatueMaterial material)
        {
            switch (material)
            {
            case StatueMaterial.Antique:

                return(type switch
                {
                    StatueType.Bronze => 1076187,
                    StatueType.Jade => 1076186,
                    StatueType.Marble => 1076182,
                    _ => 1076187
                });
Пример #7
0
        public void Restore(CharacterStatue from)
        {
            this.m_Material = from.Material;
            this.m_Pose     = from.Pose;

            this.Direction = from.Direction;

            this.CloneBody(from);
            this.CloneClothes(from);

            this.InvalidateHues();
            this.InvalidatePose();
        }
Пример #8
0
        public void Restore(CharacterStatue from)
        {
            m_Material = from.Material;
            m_Pose     = from.Pose;

            Direction = from.Direction;

            CloneBody(from);
            CloneClothes(from);

            InvalidateHues();
            InvalidatePose();
        }
        private int GetMaterialNumber(StatueMaterial material)
        {
            switch (material)
            {
            case StatueMaterial.Antique: return(1076187);

            case StatueMaterial.Dark: return(1076182);

            case StatueMaterial.Medium: return(1076184);

            case StatueMaterial.Light: return(1076185);

            default: return(1076187);
            }
        }
Пример #10
0
        public CharacterStatue(Mobile from, StatueType type) : base()
        {
            m_Type     = type;
            m_Pose     = StatuePose.Ready;
            m_Material = StatueMaterial.Antique;

            Direction   = Direction.South;
            AccessLevel = AccessLevel.Counselor;
            Hits        = HitsMax;
            Blessed     = true;
            Frozen      = true;

            CloneBody(from);
            CloneClothes(from);
            InvalidateHues();
        }
Пример #11
0
        public CharacterStatue(Mobile from, StatueType type)
            : base()
        {
            this.m_Type     = type;
            this.m_Pose     = StatuePose.Ready;
            this.m_Material = StatueMaterial.Antique;

            this.Direction   = Direction.South;
            this.AccessLevel = AccessLevel.Counselor;
            this.Hits        = this.HitsMax;
            this.Blessed     = true;
            this.Frozen      = true;

            this.CloneBody(from);
            this.CloneClothes(from);
            this.InvalidateHues();
        }
Пример #12
0
        public CharacterStatue(Mobile from, StatueType type)
            : base()
        {
            this.m_Type = type;
            this.m_Pose = StatuePose.Ready;
            this.m_Material = StatueMaterial.Antique;

            this.Direction = Direction.South;
            this.AccessLevel = AccessLevel.Counselor;
            this.Hits = this.HitsMax;
            this.Blessed = true;
            this.Frozen = true;

            this.CloneBody(from);
            this.CloneClothes(from);
            this.InvalidateHues();
        }
Пример #13
0
        public CharacterStatue( Mobile from, StatueType type )
            : base()
        {
            m_Type = type;
            m_Pose = StatuePose.Ready;
            m_Material = StatueMaterial.Antique;

            Direction = Direction.South;
            AccessLevel = AccessLevel.Counselor;
            Hits = HitsMax;
            Blessed = true;
            Frozen = true;

            CloneBody( from );
            CloneClothes( from );
            InvalidateHues();
        }
Пример #14
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            m_Type     = (StatueType)reader.ReadInt();
            m_Pose     = (StatuePose)reader.ReadInt();
            m_Material = (StatueMaterial)reader.ReadInt();

            m_SculptedBy = reader.ReadMobile();
            m_SculptedOn = reader.ReadDateTime();

            m_Plinth = reader.ReadItem() as CharacterStatuePlinth;

            InvalidatePose();

            Frozen = true;
        }
Пример #15
0
        /// <summary>
        /// 获取当前呼叫物料
        /// </summary>
        /// <param name="WorkStation"></param>
        /// <returns></returns>
        public List <StatueMaterial> GetStatueMaterial(int WorkStation)
        {
            List <StatueMaterial> result = new List <StatueMaterial>();

            using (DataTable dt = ReadData.Read(string.Format("select * from StatueMaterial Where WorkStation={0} and CallOver='False'", WorkStation)))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    StatueMaterial tmp;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        tmp               = new StatueMaterial(0, "", 0);
                        tmp.WorkStation   = All.Class.Num.ToInt(dt.Rows[i]["WorkStation"]);
                        tmp.Material      = All.Class.Num.ToString(dt.Rows[i]["Material"]);
                        tmp.MaterialNum   = All.Class.Num.ToInt(dt.Rows[i]["MaterialNum"]);
                        tmp.MaterialCount = All.Class.Num.ToInt(dt.Rows[i]["MaterialCount"]);
                        tmp.SendTime      = All.Class.Num.ToDateTime(dt.Rows[i]["SendTime"]);
                        result.Add(tmp);
                    }
                }
            }
            return(result);
        }
		public void Restore( CharacterStatue from )
		{
			m_Material = from.Material;
			m_Pose = from.Pose;

			Direction = from.Direction;

			CloneBody( from );
			CloneClothes( from );

			InvalidateHues();
			InvalidatePose();
		}
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();

			m_Type = (StatueType) reader.ReadInt();
			m_Pose = (StatuePose) reader.ReadInt();
			m_Material = (StatueMaterial) reader.ReadInt();

			m_SculptedBy = reader.ReadMobile();
			m_SculptedOn = reader.ReadDateTime();

			m_Plinth = reader.ReadItem() as CharacterStatuePlinth;
			m_IsRewardItem = reader.ReadBool();

			InvalidatePose();

			Frozen = true;

			if( m_SculptedBy == null || Map == Map.Internal )
			{
				Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
			}
		}
Пример #18
0
 private static StatueMaterialGroups GetGroup(StatueMaterial material)
 {
     for (int i = 0; i < 4; i++)
     {
         StatueMaterial[] ms = GetMaterials((StatueMaterialGroups)i);
         for (int j = 0; j < 4; j++)
         {
             if (ms[j] == material)
             {
                 return (StatueMaterialGroups)i;
             }
         }
     }
     return StatueMaterialGroups.AlltheOther;
 }
Пример #19
0
 public BaseStatueDeed(StatueMaterial material) : this( GetGroup(material) )
 {
 }
Пример #20
0
 public virtual void PlaceStatue(Mobile owner, StatueMaterial material, StatuePoses pose, Direction dir, bool plinth) 
 {
     owner.Target = new PlaceStatueTarget(this, material, pose, dir, plinth);
 }
Пример #21
0
 public PlaceStatueTarget(BaseStatueDeed deed, StatueMaterial material, StatuePoses pose, Direction dir, bool plinth)
     : base(15, true, TargetFlags.None)
 {
     m_deed = deed;
     m_Material = material;
     m_Pose = pose;
     m_Dir = dir;
     m_Plinth = plinth;
 }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();

			m_Type = (StatueType) reader.ReadInt();
			m_Pose = (StatuePose) reader.ReadInt();
			m_Material = (StatueMaterial) reader.ReadInt();

			m_SculptedBy = reader.ReadMobile();
			m_SculptedOn = reader.ReadDateTime();

			m_Plinth = reader.ReadItem() as CharacterStatuePlinth;
			m_IsRewardItem = reader.ReadBool();

			InvalidatePose();

			Frozen = true;
		}
Пример #23
0
        public void Restore(CharacterStatue from)
        {
            this.m_Material = from.Material;
            this.m_Pose = from.Pose;

            this.Direction = from.Direction;

            this.CloneBody(from);
            this.CloneClothes(from);

            this.InvalidateHues();
            this.InvalidatePose();
        }
Пример #24
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
            Pose = (StatuePoses)reader.ReadInt();
            Material = (StatueMaterial)reader.ReadInt();

            if (version >= 1)
            {
                m_Plinth = reader.ReadItem() as Plinth;
            }
            if (version >= 2)
            {
                Engraving = reader.ReadString();
            }
            if (version >= 3)
            {
                Owner = reader.ReadMobile();
            }
            if (!Statues.StatuesList.Contains(this))
            {
                Statues.StatuesList.Add(this);
            }
            StartUpdateStatue();
        }