예제 #1
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            BOBFilter f = (m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter);

            int index = info.ButtonID;

            switch (index)
            {
            case 0:     // Apply
            {
                m_From.SendGump(new BOBGump(m_From, m_Book));

                break;
            }

            case 1:     // Set Book Filter
            {
                m_From.UseOwnFilter = false;
                m_From.SendGump(new BOBFilterGump(m_From, m_Book));

                break;
            }

            case 2:     // Set Your Filter
            {
                m_From.UseOwnFilter = true;
                m_From.SendGump(new BOBFilterGump(m_From, m_Book));

                break;
            }

            case 3:     // Clear Filter
            {
                f.Clear();
                m_From.SendGump(new BOBFilterGump(m_From, m_Book));

                break;
            }

            default:
            {
                index -= 4;

                int type = index % 4;
                index /= 4;

                int[][,] filter = BulkOrderSystem.NewSystemEnabled ? m_FiltersNew : m_Filters;

                if (type >= 0 && type < filter.Length)
                {
                    int[,] filters = filter[type];

                    if (index >= 0 && index < filters.GetLength(0))
                    {
                        if (filters[index, 0] == 0)
                        {
                            break;
                        }

                        switch (type)
                        {
                        case 0:
                            f.Type = filters[index, 1];
                            break;

                        case 1:
                            f.Quality = filters[index, 1];
                            break;

                        case 2:
                            f.Material = filters[index, 1];
                            break;

                        case 3:
                            f.Quantity = filters[index, 1];
                            break;
                        }

                        m_From.SendGump(new BOBFilterGump(m_From, m_Book));
                    }
                }

                break;
            }
            }
        }
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            BOBFilter f = (this.m_From.UseOwnFilter ? this.m_From.BOBFilter : this.m_Book.Filter);

            int index = info.ButtonID;

            switch (index)
            {
            case 0:     // Apply
            {
                this.m_From.SendGump(new BOBGump(this.m_From, this.m_Book));

                break;
            }

            case 1:     // Set Book Filter
            {
                this.m_From.UseOwnFilter = false;
                this.m_From.SendGump(new BOBFilterGump(this.m_From, this.m_Book));

                break;
            }

            case 2:     // Set Your Filter
            {
                this.m_From.UseOwnFilter = true;
                this.m_From.SendGump(new BOBFilterGump(this.m_From, this.m_Book));

                break;
            }

            case 3:     // Clear Filter
            {
                f.Clear();
                this.m_From.SendGump(new BOBFilterGump(this.m_From, this.m_Book));

                break;
            }

            default:
            {
                index -= 4;

                int type = index % 4;
                index /= 4;

                if (type >= 0 && type < m_Filters.Length)
                {
                    int[,] filters = m_Filters[type];

                    if (index >= 0 && index < filters.GetLength(0))
                    {
                        //daat99 OWLTR start - custom ores
                        if (filters[index, 0] == 0 && filters[index, 1] == 0)
                        {
                            //daat99 OWLTR end - custom ores
                            break;
                        }

                        switch (type)
                        {
                        case 0:
                            f.Type = filters[index, 1];
                            break;

                        case 1:
                            f.Quality = filters[index, 1];
                            break;

                        case 2:
                            f.Material = filters[index, 1];
                            break;

                        case 3:
                            f.Quantity = filters[index, 1];
                            break;
                        }

                        this.m_From.SendGump(new BOBFilterGump(this.m_From, this.m_Book));
                    }
                }

                break;
            }
            }
        }