public override void OnDoubleClick(Mobile from) { // must not be locked down if (this.IsLockedDown == true || this.IsSecure == true) { from.SendMessage("That is locked down."); return; } LogHelper Logger = new LogHelper("PlayerQuest.log", false); // Heartbeat cleanup will cleanup the prize automatically if (m_container != null && m_container.Deleted == false && Expired == false) { m_container.MoveToWorld(from.Location, from.Map); // move the the map m_container.PlayerQuest = false; // unmark as special from.SendMessage("You have completed the quest!"); string temp = String.Format("Mobile({0}) using Deed({1}) has completed the quest.", from.Serial, this.Serial); Logger.Log(LogType.Item, m_container, temp); } else { from.SendMessage("That quest item has expired."); string temp = String.Format("Quest expired for Mobile({0}) using Deed({1}) on quest Chest(0x{2:X}).", from.Serial, this.Serial, m_PrizeID); Logger.Log(LogType.Text, temp); } // cleanup Logger.Finish(); this.Delete(); }
public override void OnDoubleClick(Mobile from) { // must not be locked down if (this.IsLockedDown == true || this.IsSecure == true) { from.SendMessage("That is locked down."); return; } if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. return; } LogHelper Logger = new LogHelper("TentReimbursementDeed.log", false); if (m_container != null && m_container.Deleted == false) { m_container.MoveToWorld(from.Location, from.Map); // move the the map from.SendMessage("Your possessions have been returned."); string temp = String.Format("Mobile({0}) using Deed({1}) has recovered their possessions.", from.Serial, this.Serial); Logger.Log(LogType.Item, m_container, temp); } else { from.SendMessage("There was a problem recovering your possessions."); string temp = String.Format("Tent doods missing for Mobile({0}) using Deed({1}) on Backpack(0x{2:X}).", from.Serial, this.Serial, m_ContainerID); Logger.Log(LogType.Text, temp); } // cleanup Logger.Finish(); this.Delete(); }