示例#1
0
 public FirepitFireEntry(PlayerMobile player, FirepitFire fire)
 {
     m_Player = player;
     m_Fire   = fire;
     m_Start  = DateTime.UtcNow;
     m_Safe   = false;
 }
示例#2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_Items = new List <Item>();

            if (version >= 0)
            {
                m_QualityLevel = (QualityType)reader.ReadInt();
                m_InDungeon    = reader.ReadBool();
                m_Expiration   = reader.ReadDateTime();
                m_FirepitFire  = (FirepitFire)reader.ReadItem();

                int itemsCount = reader.ReadInt();
                for (int a = 0; a < itemsCount; a++)
                {
                    Item item = reader.ReadItem();

                    if (item != null)
                    {
                        m_Items.Add(item);
                    }
                }
            }

            if (m_Expiration >= DateTime.UtcNow)
            {
                m_Timer = new InternalTimer(this);
                m_Timer.Start();
            }

            else
            {
                Extinguish();
            }
        }
示例#3
0
        public void Light(Mobile from)
        {
            bool success = from.CheckSkill(SkillName.Camping, 0.0, 120.0, 1.0);

            string response = "Despite your limited knowledge of the outdoors, you fashion a crude campsite.";

            if (success)
            {
                if (from.Skills.Camping.Value >= 50)
                {
                    m_QualityLevel = QualityType.Average;
                    response       = "Leveraging your basic knowledge of the outdoors, you fashion a servicable campsite.";
                }

                if (from.Skills.Camping.Value >= 100)
                {
                    m_QualityLevel = QualityType.Good;
                    response       = "Harnessing your advanced knowledge of the outdoors, you fashion a very welcoming campsite.";
                }

                if (from.Skills.Camping.Value >= 120)
                {
                    m_QualityLevel = QualityType.Expert;
                    response       = "Utilizing your masterful knowledge of the outdoors, you fashion an exceptionally safe and secure campsite.";
                }
            }

            from.SendMessage(response);

            m_Expiration = DateTime.UtcNow + Duration;

            Effects.PlaySound(Location, Map, 0x4B9);

            Point3D location = Location;
            Map     map      = Map;

            ItemID = 10749;

            AddComponents();

            if (from.Region.IsPartOf(typeof(DungeonRegion)))
            {
                m_InDungeon = true;
            }

            FirepitFire firepitFire = new FirepitFire(this);

            m_FirepitFire = firepitFire;
            m_FirepitFire.MoveToWorld(Location, Map);

            m_Timer = new InternalTimer(this);
            m_Timer.Start();

            Timer.DelayCall(TimeSpan.FromSeconds(.5), delegate
            {
                if (this == null)
                {
                    return;
                }
                if (Deleted)
                {
                    return;
                }
                if (Location != location || map != Map)
                {
                    return;
                }

                Effects.PlaySound(location, map, 0x5CF);

                Point3D flamePoint = new Point3D(location.X, location.Y, location.Z + 5);
                Effects.SendLocationParticles(EffectItem.Create(flamePoint, map, TimeSpan.FromSeconds(0.25)), 0x3709, 10, 30, 0, 0, 5029, 0);
            });
        }