コード例 #1
0
            public StumpTimer(CocoTree Tree, FruitTreeStump Stump, Mobile from) : base(TimeSpan.FromMilliseconds(5500))
            {
                Priority = TimerPriority.TenMS;

                i_tree    = Tree;
                i_stump   = Stump;
                m_chopper = from;
            }
コード例 #2
0
        public static void init(CocoTree plant, bool full)
        {
            plant.LastPick    = DateTime.Now;
            plant.regrowTimer = new FruitTimer(plant);

            if (full)
            {
                plant.Yield = plant.Capacity;
            }
            else
            {
                plant.Yield = 0;
                plant.regrowTimer.Start();
            }
        }
コード例 #3
0
 public FruitTimer(CocoTree plant) : base(TimeSpan.FromSeconds(900), TimeSpan.FromSeconds(30))
 {
     Priority = TimerPriority.OneSecond;
     i_plant  = plant;
 }
コード例 #4
0
			public StumpTimer( CocoTree Tree, FruitTreeStump Stump, Mobile from ) : base( TimeSpan.FromMilliseconds( 5500 ) )
			{
				Priority = TimerPriority.TenMS;

				i_tree = Tree;
				i_stump = Stump;
				m_chopper = from;
			}
コード例 #5
0
			public FruitTimer( CocoTree plant ) : base( TimeSpan.FromSeconds( 900 ), TimeSpan.FromSeconds( 30 ) )
			{
				Priority = TimerPriority.OneSecond;
				i_plant = plant;
			}
コード例 #6
0
		public static void init ( CocoTree plant, bool full )
		{
			plant.LastPick = DateTime.Now;
			plant.regrowTimer = new FruitTimer( plant );

			if ( full )
			{
				plant.Yield = plant.Capacity;
			}
			else
			{
				plant.Yield = 0;
				plant.regrowTimer.Start();
			}
		}
コード例 #7
0
        public void OnChop(Mobile from)
        {
            int testID = ((Item)i_leaves).ItemID;

            switch (testID)
            {
            case 0xD96:
            case 0xD9A:
            {
                AppleTree thistree = i_leaves as AppleTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }

            case 0xDAA:
            case 0xDA6:
            {
                PearTree thistree = i_leaves as PearTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }

            case 0xD9E:
            case 0xDA2:
            {
                PeachTree thistree = i_leaves as PeachTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }

            case 0xCAA:
            case 0xCA8:
            {
                BananaTree thistree = i_leaves as BananaTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }

            case 0xC96:
            case 0xC95:
            {
                CocoTree thistree = i_leaves as CocoTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }

            case 0xC9E:
                //case 0xC9E:
            {
                OnaxTree thistree = i_leaves as OnaxTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }

            case 0xD37:
            case 0xD38:
            {
                KatylTree thistree = i_leaves as KatylTree;
                if (thistree != null)
                {
                    thistree.Chop(from);
                }
                break;
            }
            }
        }