GetVeinFrom() public method

public GetVeinFrom ( double randomValue ) : Server.Engines.Harvest.HarvestVein
randomValue double
return Server.Engines.Harvest.HarvestVein
Esempio n. 1
0
 public HarvestBank(HarvestDefinition def, HarvestVein defaultVein)
 {
     m_Maximum     = Utility.RandomMinMax(def.MinTotal, def.MaxTotal);
     m_Current     = m_Maximum;
     m_DefaultVein = defaultVein;
     m_Vein        = m_DefaultVein;
     m_Definition  = def;
     m_Vein        = m_Definition.GetVeinFrom(Utility.RandomDouble());
 }
Esempio n. 2
0
        public void CheckRespawn()
        {
            if (m_Current == m_Maximum || m_NextRespawn > DateTime.Now)
            {
                return;
            }

            m_Current = m_Maximum;

            if (m_Definition.RandomizeVeins)
            {
                m_DefaultVein = m_Definition.GetVeinFrom(Utility.RandomDouble());
            }

            m_Vein = m_DefaultVein;
        }
Esempio n. 3
0
        public void CheckRespawn()
        {
            // Malik's random veins fix
            if (m_NextRespawn > DateTime.Now)
            {
                return;
            }
            if (m_Current == 0)
            {
                m_Vein    = m_Definition.GetVeinFrom(Utility.RandomDouble());
                m_Current = m_Maximum;
            }

            /*
             *          if ( m_Definition.RandomizeVeins )
             *          {
             *                  m_DefaultVein = m_Definition.GetVeinFrom( Utility.RandomDouble() );
             *          }
             *
             *          m_Vein = m_DefaultVein;
             */
        }
Esempio n. 4
0
 public HarvestBank(HarvestDefinition def, HarvestVein defaultVein)
 {
     m_Maximum = Utility.RandomMinMax(def.MinTotal, def.MaxTotal);
     m_Current = m_Maximum;
     m_DefaultVein = defaultVein;
     m_Vein = m_DefaultVein;
     m_Definition = def;
     m_Vein = m_Definition.GetVeinFrom(Utility.RandomDouble());
 }