Ejemplo n.º 1
0
            public virtual void SetTubHue(Mobile from, object state, int hue)
            {
                if (state is RunebookDyeTub)
                {
                    RunebookDyeTub runebookDyeTub = state as RunebookDyeTub;

                    runebookDyeTub.DyeColor = hue;
                }

                if (state is BulkOrderBookDyeTub)
                {
                    BulkOrderBookDyeTub bulkOrderBookDyeTub = state as BulkOrderBookDyeTub;

                    bulkOrderBookDyeTub.DyeColor = hue;
                }

                if (state is DyeTub)
                {
                    DyeTub tub = state as DyeTub;

                    tub.DyedHue = hue;
                }
            }
Ejemplo n.º 2
0
 public InternalTarget(BulkOrderBookDyeTub bulkOrderBookDyeTub)
     : base(1, false, TargetFlags.None)
 {
     m_BulkOrderBookDyeTub = bulkOrderBookDyeTub;
 }
Ejemplo n.º 3
0
 public InternalBulkOrderBulkPicker(BulkOrderBookDyeTub bulkOrderBookDyeTub)
     : base(bulkOrderBookDyeTub.ItemID)
 {
     m_BulkOrderBookDyeTub = bulkOrderBookDyeTub;
 }
Ejemplo n.º 4
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is RunebookDyeTub)
                {
                    RunebookDyeTub runebookDyeTub = targeted as RunebookDyeTub;

                    if (runebookDyeTub.Redyable)
                    {
                        if (runebookDyeTub.CustomHuePicker != null)
                        {
                            from.SendGump(new CustomHuePickerGump(from, runebookDyeTub.CustomHuePicker, new CustomHuePickerCallback(SetTubHue), runebookDyeTub));
                        }

                        else
                        {
                            from.SendHuePicker(new InternalRunebookPicker(runebookDyeTub));
                        }
                    }

                    else
                    {
                        from.SendMessage("That dye tube cannot be redyed.");
                    }
                }
                else if (targeted is BulkOrderBookDyeTub)
                {
                    BulkOrderBookDyeTub bulkOrderBookDyeTub = targeted as BulkOrderBookDyeTub;

                    if (bulkOrderBookDyeTub.Redyable)
                    {
                        if (bulkOrderBookDyeTub.CustomHuePicker != null)
                        {
                            from.SendGump(new CustomHuePickerGump(from, bulkOrderBookDyeTub.CustomHuePicker, new CustomHuePickerCallback(SetTubHue), bulkOrderBookDyeTub));
                        }

                        else
                        {
                            from.SendHuePicker(new InternalBulkOrderBulkPicker(bulkOrderBookDyeTub));
                        }
                    }

                    else
                    {
                        from.SendMessage("That dye tube cannot be redyed.");
                    }
                }
                else if (targeted is DyeTub)
                {
                    DyeTub tub = (DyeTub)targeted;

                    if (tub.Redyable)
                    {
                        if (tub.MetallicHues)
                        {
                            from.SendGump(new MetallicHuePicker(from, new MetallicHuePicker.MetallicHuePickerCallback(SetTubHue), tub));
                        }

                        else if (tub.CustomHuePicker != null)
                        {
                            from.SendGump(new CustomHuePickerGump(from, tub.CustomHuePicker, new CustomHuePickerCallback(SetTubHue), tub));
                        }

                        else
                        {
                            from.SendHuePicker(new InternalPicker(tub));
                        }
                    }

                    else if (tub is BlackDyeTub)
                    {
                        from.SendLocalizedMessage(1010092); // You can not use this on a black dye tub.
                    }
                    else
                    {
                        from.SendMessage("That dye tub may not be redyed.");
                    }
                }

                else
                {
                    from.SendLocalizedMessage(500857); // Use this on a dye tub.
                }
            }
 public InternalTarget( BulkOrderBookDyeTub tub ) : base( 1, false, TargetFlags.None ) 
 { 
    m_LTub = tub; 
 }