コード例 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                if (MasteryInfo.HasLearned(from, SpellID, Skill))
                {
                    from.SendLocalizedMessage(1155884, String.Format("#{0}", MasteryInfo.GetLocalization(SpellID, Skill))); // You are already proficient in this level of ~1_MasterySkill~
                }
                //else if (MasteryInfo.CanLearn(from, SpellID))
                //    from.SendLocalizedMessage(1115709); // Your skills are not high enough to invoke this mastery ability.
                else if (MasteryInfo.LearnMastery(from, SpellID, Skill))
                {
                    from.SendLocalizedMessage(1155885, String.Format("#{0}", MasteryInfo.GetLocalization(SpellID, Skill))); // You have increased your proficiency in ~1_SkillMastery~!

                    Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);
                    Effects.PlaySound(from.Location, from.Map, 0x243);

                    Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0xAA8, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                    Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0xAA8, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                    Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0xAA8, 0, 9502, 1, 0, (EffectLayer)255, 0x100);

                    Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);

                    Delete();
                }
            }
        }
コード例 #2
0
        public void AddGumpLayout()
        {
            AddImage(0, 0, 8000);
            AddImage(20, 37, 8001);
            AddImage(20, 107, 8002);
            AddImage(20, 177, 8001);
            AddImage(20, 247, 8002);
            AddImage(20, 317, 8001);
            AddImage(20, 387, 8002);
            AddImage(20, 457, 8003);

            AddHtmlLocalized(125, 40, 345, 16, 1151948, false, false); // Switch Mastery

            int       y       = 60;
            SkillName current = User.Skills.CurrentMastery;

            foreach (SkillName skName in MasteryInfo.Skills)
            {
                Skill sk = User.Skills[skName];

                if (sk != null && sk.IsMastery && sk.VolumeLearned > 0)
                {
                    if (skName != current)
                    {
                        AddButton(30, y, 4005, 4007, (int)skName + 1, GumpButtonType.Reply, 0);
                    }

                    AddHtmlLocalized(75, y, 200, 16, MasteryInfo.GetLocalization(skName), skName == current ? Red : Blue, false, false);
                    AddHtmlLocalized(250, y, 100, 16, 1156052, MasteryInfo.GetMasteryLevel(User, skName).ToString(), 0, false, false);

                    y += 20;
                }
            }
        }
コード例 #3
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                if (MasteryInfo.HasLearned(from, Skill, Volume))
                {
                    from.SendLocalizedMessage(1155884, $"#{MasteryInfo.GetLocalization(Skill)}"); // You are already proficient in this level of ~1_MasterySkill~
                }
                else if (MasteryInfo.LearnMastery(from, Skill, Volume))
                {
                    from.SendLocalizedMessage(1155885, $"#{MasteryInfo.GetLocalization(Skill)}"); // You have increased your proficiency in ~1_SkillMastery~!

                    Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);
                    Effects.PlaySound(from.Location, from.Map, 0x243);

                    Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0xAA8, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                    Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0xAA8, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                    Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0xAA8, 0, 9502, 1, 0, (EffectLayer)255, 0x100);

                    Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);

                    Delete();

                    if (from.Skills.CurrentMastery == Skill)
                    {
                        MasteryInfo.OnMasteryChanged(from, from.Skills.CurrentMastery);
                    }
                }
            }
        }
コード例 #4
0
        public override void AddProperty(ObjectPropertyList list)
        {
            base.AddProperty(list);

            if (RootParent is Mobile)
            {
                SkillName sk = ((Mobile)RootParent).Skills.CurrentMastery;

                if (sk > 0)
                {
                    list.Add(MasteryInfo.GetLocalization(sk));
                }
            }
        }
コード例 #5
0
        public override void AddProperty(ObjectPropertyList list)
        {
            base.AddProperty(list);

            if (RootParent is Mobile)
            {
                SkillName sk = ((Mobile)RootParent).Skills.CurrentMastery;

                if (sk > 0)
                {
                    list.Add(MasteryInfo.GetLocalization(sk));

                    if (sk == SkillName.Spellweaving)
                    {
                        list.Add(1060485, ArcanistSpell.GetMasteryFocusLevel((Mobile)RootParent).ToString()); // strength bonus ~1_val~
                    }
                }
            }
        }
コード例 #6
0
        public ChooseMasteryGump(PlayerMobile user, TimeForLegendsQuest quest)
            : base(50, 50)
        {
            Quest = quest;
            User  = user;

            AddImage(0, 0, 8000);
            AddImage(20, 37, 8001);
            AddImage(20, 107, 8002);
            AddImage(20, 177, 8001);
            AddImage(20, 247, 8002);
            AddImage(20, 317, 8001);
            AddImage(20, 387, 8002);
            AddImage(20, 457, 8003);

            AddHtmlLocalized(125, 40, 345, 16, 1156340, false, false); // Choose Your Path

            int y = 60;

            foreach (SkillName skName in MasteryInfo.Skills)
            {
                Skill sk = User.Skills[skName];

                if (sk == null || skName == SkillName.Discordance || skName == SkillName.Provocation || skName == SkillName.Peacemaking)
                {
                    continue;
                }

                if (sk.IsMastery && sk.VolumeLearned == 0)
                {
                    AddButton(30, y, 4005, 4007, (int)skName + 1, GumpButtonType.Reply, 0);

                    AddHtmlLocalized(75, y, 200, 16, MasteryInfo.GetLocalization(skName), 0x000F, false, false);

                    y += 20;
                }
            }
        }
コード例 #7
0
ファイル: SelectMasteryGump.cs プロジェクト: Evad-lab/ServUOX
        public override void AddGumpLayout()
        {
            AddBackground(0, 0, 404, 550, 9380);

            AddHtmlLocalized(0, 40, 404, 16, CenterLoc, "#1151948", 0, false, false); // Switch Mastery

            int       y       = 58;
            SkillName current = User.Skills.CurrentMastery;

            foreach (SkillName skName in MasteryInfo.Skills)
            {
                Skill sk = User.Skills[skName];

                if (sk != null && sk.IsMastery && sk.VolumeLearned > 0)
                {
                    AddButton(30, y, 4005, 4007, (int)skName + 1, GumpButtonType.Reply, 0);

                    AddHtmlLocalized(72, y, 200, 16, MasteryInfo.GetLocalization(skName), skName == current ? C32216(Red) : C32216(Blue), false, false);
                    AddHtmlLocalized(265, y, 100, 16, 1156052, MasteryInfo.GetMasteryLevel(User, skName).ToString(), 0, false, false);

                    y += 24;
                }
            }
        }
コード例 #8
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     list.Add(1155882, String.Format("#{0}", MasteryInfo.GetLocalization(SpellID, Skill))); // Primer on ~1_Skill~
 }
コード例 #9
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     list.Add(1155882, $"#{MasteryInfo.GetLocalization(Skill)}"); // Primer on ~1_Skill~
 }