-
Notifications
You must be signed in to change notification settings - Fork 469
Remove drop level gap condition for jewels #697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -433,7 +433,23 @@ private void AddRandomExcOptions(Item item) | |
| else | ||
| { | ||
| var monsterLevel = (int)monster[Stats.Level]; | ||
| var filteredPossibleItems = selectedGroup.PossibleItems.Where(it => it.DropLevel == 0 || ((it.DropLevel <= monsterLevel) && (it.DropLevel > monsterLevel - 12))).ToArray(); | ||
| List<ItemDefinition> filteredPossibleItems; | ||
|
|
||
| if (selectedGroup.ItemType == SpecialItemType.Jewel) | ||
| { | ||
| filteredPossibleItems = [.. selectedGroup.PossibleItems.Where(it => it.DropLevel <= monsterLevel)]; | ||
|
|
||
| if (monsterLevel > 66) | ||
| { | ||
| // Jewel of Chaos doesn't drop after a certain monster level | ||
| filteredPossibleItems.RemoveAll(it => it.Group == 12 && it.Number == 15); | ||
| } | ||
| } | ||
| else | ||
| { | ||
| filteredPossibleItems = [.. selectedGroup.PossibleItems.Where(it => it.DropLevel == 0 || (it.DropLevel <= monsterLevel && it.DropLevel > monsterLevel - 12))]; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| return this.GenerateItemDrop(selectedGroup, filteredPossibleItems); | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ namespace MUnique.OpenMU.Persistence.Initialization.Version075.Items; | |
| /// <summary> | ||
| /// Initializer for pets. | ||
| /// </summary> | ||
| public class Pets : InitializerBase | ||
| public class Pets : Jewels | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="Pets"/> class. | ||
|
|
@@ -29,9 +29,12 @@ public Pets(IContext context, GameConfiguration gameConfiguration) | |
| /// <inheritdoc /> | ||
| public override void Initialize() | ||
| { | ||
| this.CreatePet(0, "Guardian Angel", 23, (Stats.DamageReceiveDecrement, 0.8f, AggregateType.Multiplicate), (Stats.MaximumHealth, 50f, AggregateType.AddRaw)); | ||
| this.CreatePet(1, "Imp", 28, (Stats.AttackDamageIncrease, 1.3f, AggregateType.Multiplicate)); | ||
| this.CreatePet(2, "Horn of Uniria", 25); | ||
| var angel = this.CreatePet(0, "Guardian Angel", 23, (Stats.DamageReceiveDecrement, 0.8f, AggregateType.Multiplicate), (Stats.MaximumHealth, 50f, AggregateType.AddRaw)); | ||
| this.AddItemToJewelItemDrop(angel); | ||
| var imp = this.CreatePet(1, "Imp", 28, (Stats.AttackDamageIncrease, 1.3f, AggregateType.Multiplicate)); | ||
| this.AddItemToJewelItemDrop(imp); | ||
| var uniria = this.CreatePet(2, "Horn of Uniria", 25); | ||
| this.AddItemToJewelItemDrop(uniria); | ||
|
Comment on lines
+32
to
+37
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| private ItemDefinition CreatePet(byte number, string name, int dropLevelAndLevelRequirement, params (AttributeDefinition, float, AggregateType)[] basePowerUps) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ namespace MUnique.OpenMU.Persistence.Initialization.Version075.Items; | |
| /// <summary> | ||
| /// Class which contains item definitions for jewels. | ||
| /// </summary> | ||
| public class Potions : InitializerBase | ||
| public class Potions : Jewels | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="Potions"/> class. | ||
|
|
@@ -54,6 +54,7 @@ private ItemDefinition CreateAlcohol() | |
| alcohol.Height = 2; | ||
| alcohol.SetGuid(alcohol.Group, alcohol.Number); | ||
| alcohol.ConsumeEffect = this.GameConfiguration.MagicEffects.First(effect => effect.Number == (short)MagicEffectNumber.Alcohol); | ||
| this.AddItemToJewelItemDrop(alcohol); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| return alcohol; | ||
| } | ||
|
|
||
|
|
@@ -230,6 +231,7 @@ private ItemDefinition CreateTownPortalScroll() | |
| definition.Width = 1; | ||
| definition.Height = 2; | ||
| definition.SetGuid(definition.Group, definition.Number); | ||
| this.AddItemToJewelItemDrop(definition); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| return definition; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zTeamS6.3, emu