예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))             // Make sure its in their pack
            {
                from.SendLocalizedMessage(1042001);    // That must be in your pack for you to use it.
                return;
            }
            if (!from.InRange(this.GetWorldLocation(), 1))
            {
                from.LocalOverheadMessage(MessageType.Regular, 906, 1019045);                 // I can't reach that.
                return;
            }

            PlayerMobile pm = from as PlayerMobile;

            if (pm == null)
            {
                return;
            }

            if (pm.TitleColorState.IsColorUnlocked(ColorIndex, ColorRarity))
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "I already know this hue...");
            }
            else
            {
                int hue = PlayerTitleColors.GetSpokenColorValue(ColorIndex, ColorRarity);
                from.LocalOverheadMessage(MessageType.Regular, hue, true, "That's a pretty hue...");
                from.SendMessage("You have unlocked a new title color");

                pm.TitleColorState.UnlockColor(ColorIndex, ColorRarity);
                this.Delete();
            }
        }
예제 #2
0
 public VeryRareTitleDye()
     : base()
 {
     ColorIndex  = Utility.Random(PlayerTitleColors.GetNumColorsForRarity(EColorRarity.VeryRare));
     ColorRarity = EColorRarity.VeryRare;
 }
예제 #3
0
 public UncommonTitleDye()
     : base()
 {
     ColorIndex  = Utility.Random(PlayerTitleColors.GetNumColorsForRarity(EColorRarity.Uncommon));
     ColorRarity = EColorRarity.Uncommon;
 }
예제 #4
0
 public static Item RandomRareTitleDye()
 {
     return(new TitleDye(Utility.Random(PlayerTitleColors.GetNumColorsForRarity(EColorRarity.Rare)), EColorRarity.Rare));
 }