예제 #1
0
        public override void OnSingleClick(Mobile from)
        {
            HueableSpellDetail hueableSpellDetails = SpellHue.GetHueableSpellDetail(m_HueableSpell);
            SpellHueTypeDetail spellHueTypeDetails = SpellHue.GetSpellHueTypeDetail(m_HueType);

            string text = "(" + hueableSpellDetails.m_SpellName + ": " + spellHueTypeDetails.m_Name + ")";

            base.OnSingleClick(from);

            LabelTo(from, text);
        }
예제 #2
0
        public virtual void Activate(PlayerMobile player)
        {
            SpellHueEntry entry = PlayerEnhancementPersistance.GetSpellHueEntry(player, m_HueableSpell);

            if (entry == null)
            {
                return;
            }

            HueableSpellDetail hueableSpellDetails = SpellHue.GetHueableSpellDetail(m_HueableSpell);
            SpellHueTypeDetail spellHueTypeDetails = SpellHue.GetSpellHueTypeDetail(m_HueType);

            if (hueableSpellDetails == null || spellHueTypeDetails == null)
            {
                return;
            }

            string displayName = hueableSpellDetails.m_SpellName + ": " + spellHueTypeDetails.m_Name;

            if (entry.m_UnlockedHues.Contains(m_HueType))
            {
                player.SendMessage("You have already unlocked the spell hue for " + displayName + ".");
                return;
            }

            else
            {
                entry.m_UnlockedHues.Add(m_HueType);
                entry.m_ActiveHue = m_HueType;

                player.SendMessage("You unlock the spell hue for " + displayName + ".");

                player.PlaySound(0x0F5);
                player.FixedParticles(0x375A, 10, 15, 5012, 2587, 0, EffectLayer.Waist);

                player.CloseGump(typeof(PlayerSpellHuesGump));

                Delete();

                return;
            }
        }