コード例 #1
0
ファイル: UOACZDyes.cs プロジェクト: Pumpk1ns/outlands
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is UOACZDyeTub)
                {
                    UOACZDyeTub tub = (UOACZDyeTub)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
                    {
                        from.SendMessage("That dye tub may not be redyed.");
                    }
                }

                else
                {
                    from.SendLocalizedMessage(500857); // Use this on a dye tub.
                }
            }
コード例 #2
0
ファイル: UOACZDyes.cs プロジェクト: Pumpk1ns/outlands
            public virtual void SetTubHue(Mobile from, object state, int hue)
            {
                if (state is UOACZDyeTub)
                {
                    UOACZDyeTub tub = state as UOACZDyeTub;

                    tub.DyedHue = hue;
                }
            }
コード例 #3
0
ファイル: UOACZDyes.cs プロジェクト: Pumpk1ns/outlands
 public InternalPicker(UOACZDyeTub tub) : base(tub.ItemID)
 {
     m_Tub = tub;
 }
コード例 #4
0
 public InternalTarget(UOACZDyeTub tub)
     : base(1, false, TargetFlags.None)
 {
     m_Tub = tub;
 }