コード例 #1
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;
            }
            }
        }