diff --git a/Projects/Server/Client/ClientVersion.cs b/Projects/Server/Client/ClientVersion.cs index df07d9914..f85cfc1b4 100644 --- a/Projects/Server/Client/ClientVersion.cs +++ b/Projects/Server/Client/ClientVersion.cs @@ -56,7 +56,7 @@ public class ClientVersion : IComparable, IComparer, ISpawnable, IObjectPropertyListEnt public virtual bool OnDragDrop(Mobile from, Item dropped) { - var success = Parent is Container container && container.OnStackAttempt(from, this, dropped) || + var success = (Parent as Container)?.OnStackAttempt(from, this, dropped) ?? StackWith(from, dropped); if (success && Spawner != null) diff --git a/Projects/UOContent/Engines/CannedEvil/ChampionSkullBrazier.cs b/Projects/UOContent/Engines/CannedEvil/ChampionSkullBrazier.cs index 146a214dd..ed0db3277 100755 --- a/Projects/UOContent/Engines/CannedEvil/ChampionSkullBrazier.cs +++ b/Projects/UOContent/Engines/CannedEvil/ChampionSkullBrazier.cs @@ -134,19 +134,16 @@ namespace Server.Engines.CannedEvil { from.SendLocalizedMessage(1049486); // You can only sacrifice items that are in your backpack! } + else if (skull.Type == Type) + { + skull.Movable = false; + skull.MoveToWorld(GetWorldTop(), Map); + + Skull = skull; + } else { - if (skull.Type == Type) - { - skull.Movable = false; - skull.MoveToWorld(GetWorldTop(), Map); - - Skull = skull; - } - else - { - SendLocalizedMessageTo(from, 1049488); // That is not my champions awakening skull! - } + SendLocalizedMessageTo(from, 1049488); // That is not my champions awakening skull! } } diff --git a/Projects/UOContent/Items/Minor Artifacts/WrathOfTheDryad.cs b/Projects/UOContent/Items/Minor Artifacts/WrathOfTheDryad.cs index 0a01bfcbc..f37ca19b2 100644 --- a/Projects/UOContent/Items/Minor Artifacts/WrathOfTheDryad.cs +++ b/Projects/UOContent/Items/Minor Artifacts/WrathOfTheDryad.cs @@ -5,6 +5,9 @@ namespace Server.Items; [SerializationGenerator(0, false)] public partial class WrathOfTheDryad : GnarledStaff { + public override WeaponAbility PrimaryAbility => WeaponAbility.ConcussionBlow; + public override WeaponAbility SecondaryAbility => WeaponAbility.ParalyzingBlow; + [Constructible] public WrathOfTheDryad() { diff --git a/Projects/UOContent/Items/Misc/Corpses/Corpse.cs b/Projects/UOContent/Items/Misc/Corpses/Corpse.cs index e7fcd3953..514157fc5 100644 --- a/Projects/UOContent/Items/Misc/Corpses/Corpse.cs +++ b/Projects/UOContent/Items/Misc/Corpses/Corpse.cs @@ -381,9 +381,7 @@ namespace Server.Items { var rand = Utility.Random(i + 1); - var temp = attackers[rand]; - attackers[rand] = attackers[i]; - attackers[i] = temp; + (attackers[rand], attackers[i]) = (attackers[i], attackers[rand]); } // stackables first, for the remaining stackables, have those be randomly added after @@ -394,17 +392,13 @@ namespace Server.Items if (item.Amount >= attackers.Count) { - var amountPerAttacker = item.Amount / attackers.Count; - var remainder = item.Amount % attackers.Count; + var amountPerAttacker = Math.DivRem(item.Amount, attackers.Count, out var remainder); for (var j = 0; j < (remainder == 0 ? attackers.Count - 1 : attackers.Count); j++) { + // LiftItemDupe automagically adds it as a child item to the corpse var splitItem = - Mobile.LiftItemDupe( - item, - item.Amount - - amountPerAttacker - ); // LiftItemDupe automagically adds it as a child item to the corpse + Mobile.LiftItemDupe(item, item.Amount - amountPerAttacker); m_InstancedItems.Add(splitItem, new InstancedItemInfo(splitItem, attackers[j]));