From 606ba0ed01df0bc333425048e0916460318d7820 Mon Sep 17 00:00:00 2001 From: Dexter Date: Tue, 17 Jan 2017 20:11:18 -0700 Subject: [PATCH 1/2] - Skill mastery primers volume 2 have higher chance (x3) to drop - fixed buff not appearing for chivalry passive Mastery - VvV items will not be accepted by clean up brit containers --- .../PointsSystems/CleanUpBritanniaData.cs | 3 ++ .../Skill Masteries/Core/MasteryInfo.cs | 6 ++-- .../Core/SkillMasteryPrimer.cs | 16 +++++++++++ .../Skill Masteries/Core/SkillMasterySpell.cs | 28 +++++++++++++++++++ 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/Scripts/Services/PointsSystems/CleanUpBritanniaData.cs b/Scripts/Services/PointsSystems/CleanUpBritanniaData.cs index 15967313e7..845df8cec2 100644 --- a/Scripts/Services/PointsSystems/CleanUpBritanniaData.cs +++ b/Scripts/Services/PointsSystems/CleanUpBritanniaData.cs @@ -27,6 +27,9 @@ public static double GetPoints(Item item) { double points = 0; + if (item is IVvVItem && ((IVvVItem)item).IsVvVItem) + return points; + Type type = item.GetType(); if (Entries.ContainsKey(type)) diff --git a/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs b/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs index 1616938406..652b3b0721 100644 --- a/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs +++ b/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs @@ -263,7 +263,7 @@ public static void OnMasteryChanged(Mobile m, SkillName oldMastery) } RemovePassiveBuffs(m); - + Console.WriteLine("Attempting focus: {0}", m.Skills.CurrentMastery); foreach (MasteryInfo info in Infos.Where(i => i.Passive)) { if (IsActivePassive(m, info.PassiveSpell)) @@ -271,7 +271,7 @@ public static void OnMasteryChanged(Mobile m, SkillName oldMastery) if (info.PassiveSpell == PassiveSpell.AnticipateHit) continue; - //Console.WriteLine("Toggling {0} passive spell", info.PassiveSpell.ToString()); + Console.WriteLine("Toggling {0} passive spell", info.PassiveSpell.ToString()); switch (info.PassiveSpell) { @@ -370,7 +370,7 @@ public static int GetSpellID(PassiveSpell spell) { case PassiveSpell.EnchantedSummoning: return 714; case PassiveSpell.AnticipateHit: return 715; - case PassiveSpell.Intuition: return 716; + case PassiveSpell.Intuition: return 717; case PassiveSpell.SavingThrow: return 732; case PassiveSpell.Potency: return 738; case PassiveSpell.Knockout: return 741; diff --git a/Scripts/Spells/Skill Masteries/Core/SkillMasteryPrimer.cs b/Scripts/Spells/Skill Masteries/Core/SkillMasteryPrimer.cs index f01838b776..64927cd0ef 100644 --- a/Scripts/Spells/Skill Masteries/Core/SkillMasteryPrimer.cs +++ b/Scripts/Spells/Skill Masteries/Core/SkillMasteryPrimer.cs @@ -112,6 +112,22 @@ public static SkillMasteryPrimer GetRandom(Volume volume = Volume.Three, Volume if (available.Count == 0) return null; + if (volume == Volume.Three && exclude == Volume.One) // Random loot drop, vol 2 is 3x more likely to drop + { + List copy = new List(available); + + copy.ForEach(i => + { + if (i.Volume == Volume.Two) + { + available.Add(i); + available.Add(i); + } + }); + + ColUtility.Free(copy); + } + MasteryInfo random = available[Utility.Random(available.Count)]; SkillMasteryPrimer primer = new SkillMasteryPrimer(random.SpellID, random.MasterySkill); diff --git a/Scripts/Spells/Skill Masteries/Core/SkillMasterySpell.cs b/Scripts/Spells/Skill Masteries/Core/SkillMasterySpell.cs index 0cc4c6f0ea..45326edbb7 100644 --- a/Scripts/Spells/Skill Masteries/Core/SkillMasterySpell.cs +++ b/Scripts/Spells/Skill Masteries/Core/SkillMasterySpell.cs @@ -18,6 +18,7 @@ public abstract class SkillMasterySpell : Spell public static void Initialize() { CommandSystem.Register("LearnAllMasteries", AccessLevel.GameMaster, LearnAllSpells); + CommandSystem.Register("RandomMastery", AccessLevel.GameMaster, RandomMastery); } public UpkeepTimer Timer { get; set; } @@ -1085,5 +1086,32 @@ public static void LearnAllSpells(CommandEventArgs e) } }); } + + [Usage("RandomMastery")] + [Description("Drops a random mastery primer on target.")] + public static void RandomMastery(CommandEventArgs e) + { + e.Mobile.BeginTarget(-1, false, TargetFlags.None, (mobile, targeted) => + { + Item mastery = SkillMasteryPrimer.GetRandom(); + + if (targeted is Mobile) + { + Mobile m = targeted as Mobile; + + m.Backpack.DropItem(mastery); + + e.Mobile.SendMessage("A mastery has been added to your pack!"); + } + else if (targeted is IPoint3D) + { + IPoint3D p = targeted as IPoint3D; + + mastery.MoveToWorld(new Point3D(p.X, p.Y, p.Z), e.Mobile.Map); + } + else + mastery.Delete(); + }); + } } } \ No newline at end of file From 0af5f8b7e874871fde4592485711d4bf7fcec34c Mon Sep 17 00:00:00 2001 From: Dexter Date: Tue, 17 Jan 2017 20:13:30 -0700 Subject: [PATCH 2/2] removed console messages --- Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs b/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs index 652b3b0721..e457c6009b 100644 --- a/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs +++ b/Scripts/Spells/Skill Masteries/Core/MasteryInfo.cs @@ -263,7 +263,6 @@ public static void OnMasteryChanged(Mobile m, SkillName oldMastery) } RemovePassiveBuffs(m); - Console.WriteLine("Attempting focus: {0}", m.Skills.CurrentMastery); foreach (MasteryInfo info in Infos.Where(i => i.Passive)) { if (IsActivePassive(m, info.PassiveSpell)) @@ -271,8 +270,6 @@ public static void OnMasteryChanged(Mobile m, SkillName oldMastery) if (info.PassiveSpell == PassiveSpell.AnticipateHit) continue; - Console.WriteLine("Toggling {0} passive spell", info.PassiveSpell.ToString()); - switch (info.PassiveSpell) { case PassiveSpell.EnchantedSummoning: