Ejemplo n.º 1
0
        public ClaimResourceTimer(ResourceNode rn)
            : base(TimeSpan.Zero, TimeSpan.FromMinutes(1))
        {
            m_Node = rn;
            Priority = TimerPriority.FiveSeconds;

            m_StartTime = DateTime.Now;
        }
Ejemplo n.º 2
0
        public void InitialSetup(PlayerMobile from, ResourceNode n, int currentMain, int mainScroll)
        {
            m_Viewer = from;
            m_Node = n;

            Closable = true;
            Disposable = true;
            Dragable = true;
            Resizable = false;
            m_CurrentMain = currentMain;
            m_MainScroll = mainScroll;
            m_ItemsPerPage = 9;
            m_Start = m_ItemsPerPage * m_NavScroll;

            AddBackground(183, 92, 450, 406, 9270);
            AddBackground(201, 112, 412, 368, 3500);

            m_Y = 140;
            m_LineHeight = 28;

            AddLabel(235, m_Y, 2010, "Resource:");
            AddLabel(330, m_Y, 0, m_Node.Resource.ToString());
            m_Y += m_LineHeight;

            AddLabel(235, m_Y, 2010, "Production:");
            AddLabel(330, m_Y, 0, m_Node.ProductionRate.ToString() + " units per season");
            m_Y += m_LineHeight;

            AddLabel(235, m_Y, 2010, "Next Shipment:");
            AddLabel(330, m_Y, 0, m_Node.ProductionDate.ToString());
            m_Y += m_LineHeight;

            AddLabel(235, m_Y, 2010, "Owners:");
            if((m_Node.Government == null) || (m_Node.Government.Deleted))
                AddLabel(330, m_Y, 0, "Unclaimed");
            else
                AddLabel(330, m_Y, 0, m_Node.Government.Name.ToString());
            m_Y += m_LineHeight;

            if (m_Node.Government != null && m_Node.Owned && GovernmentEntity.IsGuildOfficer(m_Viewer, m_Node.Government))
            {
                AddButton(235, m_Y, 10740, 10742, (int)Buttons.Release, GumpButtonType.Reply, 0);
                AddLabel(255, m_Y, 0, "Release this resource from " + m_Node.Government.Name.ToString() + "'s control.");
                m_Y += m_LineHeight;
            }
            else
                AddMyGovernments();
        }
Ejemplo n.º 3
0
 public ResourceNodeGump(PlayerMobile from, ResourceNode n, int currentMain, int mainScroll)
     : base(0, 0)
 {
     InitialSetup(from, n, currentMain, mainScroll);
 }
Ejemplo n.º 4
0
 public ResourceNodeGump(PlayerMobile from, ResourceNode n)
     : this(from, n, 0, 0)
 {
 }
Ejemplo n.º 5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 0:
                    {
                        m_HeldCopper = reader.ReadInt();
                        m_HeldFood = reader.ReadInt();
                        m_LastPaid = reader.ReadDateTime();
                        m_Wage = reader.ReadInt();
                        m_WagesPaid = reader.ReadInt();
                        m_IsSlave = reader.ReadBool();

                        m_ToGather = (CraftResource)reader.ReadInt();
                        m_HeldResource = reader.ReadInt();
                        m_Node = (ResourceNode)reader.ReadItem();
                        bool startTimer = reader.ReadBool();
                        if (startTimer)
                        {
                            m_Timer = new EmployeeGatherTimer(this);
                            m_Timer.Start();
                        }
                        break;
                    }
            }
        }
Ejemplo n.º 6
0
 public ResourceTimer(ResourceNode n)
     : base(TimeSpan.FromMinutes(1), TimeSpan.FromHours(1))
 {
     m_Node = n;
     Priority = TimerPriority.OneMinute;
 }