diff --git a/Projects/UOContent/Engines/Harvest/Fishing.cs b/Projects/UOContent/Engines/Harvest/Fishing.cs index 6b3ef49ae..b45c44b72 100644 --- a/Projects/UOContent/Engines/Harvest/Fishing.cs +++ b/Projects/UOContent/Engines/Harvest/Fishing.cs @@ -12,22 +12,23 @@ namespace Server.Engines.Harvest private static readonly MutateEntry[] _mutateTable = { - new(80.0, 80.0, 4080.0, true, typeof(SpecialFishingNet)), - new(80.0, 80.0, 4080.0, true, typeof(BigFish)), - new(90.0, 80.0, 4080.0, true, typeof(TreasureMap)), - new(100.0, 80.0, 4080.0, true, typeof(MessageInABottle)), + new(80.0, 80.0, 4080.0, true, Expansion.UOR, typeof(SpecialFishingNet)), + new(80.0, 80.0, 4080.0, true, Expansion.UOR, typeof(BigFish)), + new(90.0, 80.0, 4080.0, true, Expansion.T2A, typeof(TreasureMap)), + new(100.0, 80.0, 4080.0, true, Expansion.T2A, typeof(MessageInABottle)), new( 0.0, 125.0, -2375.0, false, + Expansion.T2A, typeof(PrizedFish), typeof(WondrousFish), typeof(TrulyRareFish), typeof(PeculiarFish) ), - new(0.0, 105.0, -420.0, false, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)), - new(0.0, 200.0, -200.0, false, new Type[] { null }) + new(0.0, 105.0, -420.0, false, Expansion.T2A, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)), + new(0.0, 200.0, -200.0, false, Expansion.None, new Type[] { null }) }; private static readonly int[] _waterLandTiles = @@ -173,6 +174,11 @@ namespace Server.Engines.Harvest { var entry = _mutateTable[i]; + if (Core.Expansion < entry.m_Expansion) + { + continue; + } + if (!deepWater && entry.m_DeepWater) { continue; @@ -200,7 +206,7 @@ namespace Server.Engines.Harvest { foreach (var sos in pack.FindItemsByType()) { - if ((from.Map == Map.Felucca || from.Map == Map.Trammel) && from.InRange(sos.TargetLocation, 60)) + if (from.Map == sos.TargetMap && from.InRange(sos.TargetLocation, 60)) { return true; } @@ -240,7 +246,7 @@ namespace Server.Engines.Harvest // We don't have to queue since we are returning on the first SOS. foreach (var sos in pack.FindItemsByType()) { - if ((from.Map == Map.Felucca || from.Map == Map.Trammel) && from.InRange(sos.TargetLocation, 60)) + if (from.Map == sos.TargetMap && from.InRange(sos.TargetLocation, 60)) { Item preLoot = null; @@ -296,14 +302,17 @@ namespace Server.Engines.Harvest LockableContainer chest = Utility.RandomBool() ? new MetalGoldenChest() : new WoodenChest(); - if (sos.IsAncient) + if (sos.IsAncient && Core.SE) { chest.Hue = 0x481; } TreasureMapChest.Fill(chest, Math.Max(1, Math.Min(4, sos.Level))); - chest.DropItem(sos.IsAncient ? new FabledFishingNet() : new SpecialFishingNet()); + if (Core.UOR) + { + chest.DropItem(sos.IsAncient ? new FabledFishingNet() : new SpecialFishingNet()); + } chest.Movable = true; chest.Locked = false; @@ -531,17 +540,21 @@ namespace Server.Engines.Harvest private class MutateEntry { public readonly bool m_DeepWater; + public readonly Expansion m_Expansion; public readonly double m_MaxSkill; public readonly double m_MinSkill; public readonly double m_ReqSkill; public readonly Type[] m_Types; - public MutateEntry(double reqSkill, double minSkill, double maxSkill, bool deepWater, params Type[] types) + public MutateEntry( + double reqSkill, double minSkill, double maxSkill, bool deepWater, Expansion expansion, params Type[] types + ) { m_ReqSkill = reqSkill; m_MinSkill = minSkill; m_MaxSkill = maxSkill; m_DeepWater = deepWater; + m_Expansion = expansion; m_Types = types; } } diff --git a/Projects/UOContent/Items/Resources/Fishing/BigFish.cs b/Projects/UOContent/Items/Resources/Fishing/BigFish.cs index e97c88239..b19e17290 100644 --- a/Projects/UOContent/Items/Resources/Fishing/BigFish.cs +++ b/Projects/UOContent/Items/Resources/Fishing/BigFish.cs @@ -30,7 +30,7 @@ public partial class BigFish : Item, ICarvable { base.GetProperties(list); - if (Weight >= 20) + if (Core.SE && Weight >= 20) { if (_fisher != null) { diff --git a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs index 3713056c0..8f2054add 100644 --- a/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs +++ b/Projects/UOContent/Items/Skill Items/Carpenter Items/TaxidermyKit.cs @@ -218,7 +218,7 @@ public partial class TrophyAddon : Item, IAddon { base.GetProperties(list); - if (_animalWeight >= 20) + if (Core.SE && _animalWeight >= 20) { if (!string.IsNullOrWhiteSpace(_hunter)) { @@ -346,7 +346,7 @@ public partial class TrophyDeed : Item { base.GetProperties(list); - if (_animalWeight >= 20) + if (Core.SE && _animalWeight >= 20) { if (!string.IsNullOrWhiteSpace(_hunter)) { diff --git a/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs b/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs index bf626c2fd..7b8f3878c 100644 --- a/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs +++ b/Projects/UOContent/Items/Skill Items/Fishing/Misc/MessageInABottle.cs @@ -37,7 +37,7 @@ public partial class MessageInABottle : Item public static int GetRandomLevel() { - if (Core.AOS && Utility.Random(25) < 1) + if (Core.AOS && Utility.Random(Core.SE ? 25 : 40) < 1) { return 4; // ancient } diff --git a/Projects/UOContent/Mobiles/Monsters/Reptile/Magic/Leviathan.cs b/Projects/UOContent/Mobiles/Monsters/Reptile/Magic/Leviathan.cs index 8e7271348..e4ffe5ba3 100644 --- a/Projects/UOContent/Mobiles/Monsters/Reptile/Magic/Leviathan.cs +++ b/Projects/UOContent/Mobiles/Monsters/Reptile/Magic/Leviathan.cs @@ -50,7 +50,6 @@ namespace Server.Mobiles CanSwim = true; CantWalk = true; - PackItem(new MessageInABottle()); PackItem(new Rope { ItemID = 0x14F8 }); PackItem(new Rope { ItemID = 0x14FA }); } @@ -63,6 +62,13 @@ namespace Server.Mobiles public override int TreasureMapLevel => 5; + public override bool OnBeforeDeath() + { + PackItem(new MessageInABottle(Map == Map.Felucca ? Map.Felucca : Map.Trammel)); + + return base.OnBeforeDeath(); + } + public static Type[] Artifacts { get; } = { // Decorations diff --git a/Projects/UOContent/Mobiles/Monsters/Reptile/Melee/Kraken.cs b/Projects/UOContent/Mobiles/Monsters/Reptile/Melee/Kraken.cs index 21f7d949f..919f77b34 100644 --- a/Projects/UOContent/Mobiles/Monsters/Reptile/Melee/Kraken.cs +++ b/Projects/UOContent/Mobiles/Monsters/Reptile/Melee/Kraken.cs @@ -46,12 +46,10 @@ namespace Server.Mobiles rope.ItemID = 0x14F8; PackItem(rope); - if (Utility.RandomDouble() < .05) + if (Core.UOR) { - PackItem(new MessageInABottle()); + PackItem(new SpecialFishingNet()); // Confirm? } - - PackItem(new SpecialFishingNet()); // Confirm? } public override string CorpseName => "a krakens corpse"; @@ -59,6 +57,16 @@ namespace Server.Mobiles public override int TreasureMapLevel => 4; + public override bool OnBeforeDeath() + { + if (Core.T2A && Utility.RandomDouble() < .05) + { + PackItem(new MessageInABottle(Map == Map.Felucca ? Map.Felucca : Map.Trammel)); + } + + return base.OnBeforeDeath(); + } + public override void GenerateLoot() { AddLoot(LootPack.Rich);