RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Setting Large BODs to be completed

GhostRiderGrey

Sorceror
this is the code from the first part of LargeBOD.cs
Code:
namespace Server.Engines.BulkOrders
{
    [TypeAlias( "Scripts.Engines.BulkOrders.LargeBOD" )]
    public abstract class LargeBOD : Item
    {
        private int m_AmountMax;
        private bool m_RequireExceptional;
        private BulkMaterialType m_Material;
        private LargeBulkEntry[] m_Entries;
 
        [CommandProperty( AccessLevel.GameMaster )]
        public int AmountMax{ get{ return m_AmountMax; } set{ m_AmountMax = value; InvalidateProperties(); } }
 
        [CommandProperty( AccessLevel.GameMaster )]
        public bool RequireExceptional{ get{ return m_RequireExceptional; } set{ m_RequireExceptional = value; InvalidateProperties(); } }
 
        [CommandProperty( AccessLevel.GameMaster )]
        public BulkMaterialType Material{ get{ return m_Material; } set{ m_Material = value; InvalidateProperties(); } }
 
        public LargeBulkEntry[] Entries{ get{ return m_Entries; } set{ m_Entries = value; InvalidateProperties(); } }
 
        [CommandProperty( AccessLevel.GameMaster )]
        public bool Complete
        {
            get
            {
                for ( int i = 0; i < m_Entries.Length; ++i )
                {
                    if ( m_Entries[i].Amount < m_AmountMax )
                        return false;
                }
 
                return true;
            }
        }
 
        public abstract List<Item> ComputeRewards( bool full );
        public abstract int ComputeGold();
        public abstract int ComputeFame();

Is there a way to change the public bool Complete section so that staff can props the large bods and set them to be completed (for testing purposes, not for all players)?
 

pooka01

Sorceror
i would take a guess an say:
Code:
[CommandProperty( AccessLevel.GameMaster )]
        public bool Complete
        {
            get
            {
                 return true;
            }
        }
(make a backup just in case.)
 

GhostRiderGrey

Sorceror
Thanks pooka01, but unfortunately that breaks the bod as it removes the calculation for completeness when a player uses it. I'm looking for a way for staff to override that in the [props windows without breaking it for the players.
 

pooka01

Sorceror
Code:
 private m_StaffCompleted = false;
 [CommandProperty( AccessLevel.GameMaster )]
         public bool Complete
         {
             get
             {
  if (!StaffCompleted)
  {
   for ( int i = 0; i < m_Entries.Length; ++i )
   {
                      if ( m_Entries[i].Amount < m_AmountMax )
                          return false;
   }
  }
  
                return true;
             }
         }
 [CommandProperty( AccessLevel.GameMaster )]
 public bool StaffComplete
 {
  get{return m_StaffCompleted;}
  set{m_StaffComplete = value;}
 }
 
Top