public override void OnDoubleClick(Mobile from) { if (this.Parent != null || !this.VerifyMove(from)) { return; } if (!from.InRange(this, 2)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. return; } //adam : if within a rectricted camping zone then don't allow camping, i.e., a ransom chest rect if (CampHelper.InRestrictedArea(from)) { from.SendMessage("You do not consider it safe to secure a camp here"); return; } if (this.ItemID == 0xA57) // rolled { Direction dir = PlayerMobile.GetDirection4(from.Location, this.Location); if (dir == Direction.North || dir == Direction.South) { this.ItemID = 0xA55; } else { this.ItemID = 0xA56; } } else // unrolled { this.ItemID = 0xA57; if (!from.HasGump(typeof(LogoutGump))) { CampfireEntry entry = Campfire.GetEntry(from); if (entry != null && entry.Safe) { from.SendGump(new LogoutGump(entry, this)); } } } }
public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } // Adam: remove assumption players region is non-null HouseRegion hr = from.Region as HouseRegion; // wea: are you in a tent? if so, 100% success if (from.CheckSkill(SkillName.Camping, 0.0, 100.0) || hr != null && hr.House is Tent) { Point3D loc; if (Parent == null) { loc = Location; } else { loc = from.Location; } Consume(); // Pla: Don't show message if in non camping zone if (!CampHelper.InRestrictedArea(from)) { from.SendLocalizedMessage(500620); // You feel it would take a few moments to secure your camp. } new Campfire(from).MoveToWorld(loc, from.Map); } else { from.SendLocalizedMessage(501696); // You fail to ignite the campfire. } }
public Campfire(Mobile owner) : base(0xDE3) { Movable = false; Light = LightType.Circle300; m_Timer = new DecayTimer(this); m_Timer.Start(); m_Owner = owner; m_Owner.Location = new Point3D(m_Owner.X, m_Owner.Y, m_Owner.Z); CampSecure = false; FirstMessageSent = true; //pla : if within a rectricted camping zone then don't start the timer if (CampHelper.InRestrictedArea(owner)) { owner.SendMessage("You do not consider it safe to secure a camp here"); } else { m_campSecureTimer = new SecureTimer(m_Owner, this); m_campSecureTimer.Start(); } }