From 997dd6d728fba569136736beee0b404937e6b8e4 Mon Sep 17 00:00:00 2001 From: sven-n Date: Sun, 9 Jun 2024 21:18:23 +0200 Subject: [PATCH] Added DropItemGroups for Symbols of Kundun --- .../Initialization/Updates/AddKalimaPlugIn.cs | 16 +++++++++++++ .../VersionSeasonSix/Items/Misc.cs | 24 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/Persistence/Initialization/Updates/AddKalimaPlugIn.cs b/src/Persistence/Initialization/Updates/AddKalimaPlugIn.cs index 6f7e43229..cec6ae4ff 100644 --- a/src/Persistence/Initialization/Updates/AddKalimaPlugIn.cs +++ b/src/Persistence/Initialization/Updates/AddKalimaPlugIn.cs @@ -3,6 +3,7 @@ // using MUnique.OpenMU.DataModel.Configuration.Items; +using MUnique.OpenMU.GameLogic; namespace MUnique.OpenMU.Persistence.Initialization.Updates; @@ -83,5 +84,20 @@ private void CreateSymbolOfKundun(IContext context, GameConfiguration gameConfig itemDefinition.MaximumItemLevel = 7; itemDefinition.SetGuid(itemDefinition.Group, itemDefinition.Number); gameConfiguration.Items.Add(itemDefinition); + + (byte, byte)[] dropLevels = [(25, 46), (47, 65), (66, 77), (78, 84), (85, 91), (92, 107), (108, 255)]; + for (byte level = 1; level <= dropLevels.Length; level++) + { + var dropItemGroup = context.CreateNew(); + dropItemGroup.SetGuid(14, 29, level); + dropItemGroup.ItemLevel = level; + dropItemGroup.PossibleItems.Add(itemDefinition); + dropItemGroup.Chance = 0.003; // 0.3 Percent + dropItemGroup.Description = $"The drop item group for Symbol of Kundun (Level {level})"; + (dropItemGroup.MinimumMonsterLevel, dropItemGroup.MaximumMonsterLevel) = dropLevels[level - 1]; + + gameConfiguration.DropItemGroups.Add(dropItemGroup); + gameConfiguration.Maps.ForEach(map => map.DropItemGroups.Add(dropItemGroup)); + } } } \ No newline at end of file diff --git a/src/Persistence/Initialization/VersionSeasonSix/Items/Misc.cs b/src/Persistence/Initialization/VersionSeasonSix/Items/Misc.cs index e1a77dd16..677db1920 100644 --- a/src/Persistence/Initialization/VersionSeasonSix/Items/Misc.cs +++ b/src/Persistence/Initialization/VersionSeasonSix/Items/Misc.cs @@ -60,6 +60,30 @@ private void CreateSymbolOfKundun() itemDefinition.MaximumItemLevel = 7; itemDefinition.SetGuid(itemDefinition.Group, itemDefinition.Number); this.GameConfiguration.Items.Add(itemDefinition); + + /* Drop Levels: + Symbol +1: Monster Level 25 ~ 46 + Symbol +2: Monster Level 47 ~ 65 + Symbol +3: Monster Level 66 ~ 77 + Symbol +4: Monster Level 78 ~ 84 + Symbol +5: Monster Level 85 ~ 91 + Symbol +6: Monster Level 92 ~ 107 + Symbol +7: Monster Level 108+ + */ + (byte, byte)[] dropLevels = [(25, 46), (47, 65), (66, 77), (78, 84), (85, 91), (92, 107), (108, 255)]; + for (byte level = 1; level <= dropLevels.Length; level++) + { + var dropItemGroup = this.Context.CreateNew(); + dropItemGroup.SetGuid(14, 29, level); + dropItemGroup.ItemLevel = level; + dropItemGroup.PossibleItems.Add(itemDefinition); + dropItemGroup.Chance = 0.003; // 0.3 Percent + dropItemGroup.Description = $"The drop item group for Symbol of Kundun (Level {level})"; + (dropItemGroup.MinimumMonsterLevel, dropItemGroup.MaximumMonsterLevel) = dropLevels[level - 1]; + + this.GameConfiguration.DropItemGroups.Add(dropItemGroup); + BaseMapInitializer.RegisterDefaultDropItemGroup(dropItemGroup); + } } private void CreateLifeStone()