From 03287d4702e8051d9cb7975bc9686006c5a757d4 Mon Sep 17 00:00:00 2001 From: Yonneh Date: Sat, 25 Jan 2025 03:48:39 -0500 Subject: [PATCH] - implement AugmentationResistanceNether - add levels 276-300, with 1 credit per level --- LocalMods.cs | 0 Source/ACE.DatLoader/FileTypes/XpTable.cs | 27 +++++++++++-------- Source/ACE.Entity/Enum/AugmentationType.cs | 3 +++ .../Enum/Properties/PropertyFloat.cs | 1 + .../ACE.Entity/Enum/Properties/PropertyInt.cs | 1 + .../WorldObjects/AugmentationDevice.cs | 1 + .../WorldObjects/Player_Properties.cs | 12 +++++++++ 7 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 LocalMods.cs diff --git a/LocalMods.cs b/LocalMods.cs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Source/ACE.DatLoader/FileTypes/XpTable.cs b/Source/ACE.DatLoader/FileTypes/XpTable.cs index b847fb886c..da70277c2f 100644 --- a/Source/ACE.DatLoader/FileTypes/XpTable.cs +++ b/Source/ACE.DatLoader/FileTypes/XpTable.cs @@ -1,14 +1,13 @@ +using ACE.Entity.Enum; using System.Collections.Generic; using System.IO; -namespace ACE.DatLoader.FileTypes -{ +namespace ACE.DatLoader.FileTypes { /// /// Reads and stores the XP Tables from the client_portal.dat (file 0x0E000018). /// [DatFileType(DatFileType.XpTable)] - public class XpTable : FileType - { + public class XpTable : FileType { internal const uint FILE_ID = 0x0E000018; public List AttributeXpList { get; } = new List(); @@ -26,17 +25,16 @@ public class XpTable : FileType /// public List CharacterLevelSkillCreditList { get; } = new List(); - public override void Unpack(BinaryReader reader) - { + public override void Unpack(BinaryReader reader) { Id = reader.ReadUInt32(); // The counts for each "Table" are at the top of the file. - int attributeCount = reader.ReadInt32(); - int vitalCount = reader.ReadInt32(); - int trainedSkillCount = reader.ReadInt32(); - int specializedSkillCount = reader.ReadInt32(); + int attributeCount = reader.ReadInt32(); + int vitalCount = reader.ReadInt32(); + int trainedSkillCount = reader.ReadInt32(); + int specializedSkillCount = reader.ReadInt32(); - uint levelCount = reader.ReadUInt32(); + uint levelCount = reader.ReadUInt32(); for (int i = 0; i <= attributeCount; i++) AttributeXpList.Add(reader.ReadUInt32()); @@ -55,6 +53,13 @@ public override void Unpack(BinaryReader reader) for (int i = 0; i <= levelCount; i++) CharacterLevelSkillCreditList.Add(reader.ReadUInt32()); + Inject_ExtraLevels(); } + + void Inject_ExtraLevels() { + CharacterLevelXPList.AddRange(new List() { 198058069818, 218655824925, 301355811677, 633396258490, 1966538652443, 3319678182306, 4693114805116, 7460589600079, 14420788709410, 35405789024045, 56705564343399, 78324836292543, 121887669270068, 231448194208545, 561773176898053, 897053034327904, 1237362089619200, 1923084836031170, 3647677543257260, 8847324555543940, 14124966273014900, 19481772616248000, 30275737397862500, 57422558823623200, 139270225422292000 }); + CharacterLevelSkillCreditList.AddRange(new List() { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); + } + } } diff --git a/Source/ACE.Entity/Enum/AugmentationType.cs b/Source/ACE.Entity/Enum/AugmentationType.cs index 588ee50e85..f1ae871f3f 100644 --- a/Source/ACE.Entity/Enum/AugmentationType.cs +++ b/Source/ACE.Entity/Enum/AugmentationType.cs @@ -170,6 +170,9 @@ public enum AugmentationType /// Infused Void Magic - foci for void magic /// FociVoid = 42, + + + ResistNether = 43, } public static class AugTypeHelper diff --git a/Source/ACE.Entity/Enum/Properties/PropertyFloat.cs b/Source/ACE.Entity/Enum/Properties/PropertyFloat.cs index f0f38fd8a8..0c4df67239 100644 --- a/Source/ACE.Entity/Enum/Properties/PropertyFloat.cs +++ b/Source/ACE.Entity/Enum/Properties/PropertyFloat.cs @@ -160,6 +160,7 @@ public enum PropertyFloat : ushort CriticalMultiplier = 136, [AssessmentProperty] ManaStoneDestroyChance = 137, + [AssessmentProperty] SlayerDamageBonus = 138, AllegianceInfoSpamTimestamp = 139, AllegianceInfoSpamRate = 140, diff --git a/Source/ACE.Entity/Enum/Properties/PropertyInt.cs b/Source/ACE.Entity/Enum/Properties/PropertyInt.cs index ccd9e80e0d..08c5aeb9ce 100644 --- a/Source/ACE.Entity/Enum/Properties/PropertyInt.cs +++ b/Source/ACE.Entity/Enum/Properties/PropertyInt.cs @@ -492,6 +492,7 @@ public enum PropertyInt : ushort AlternateRacialSkills = 325, [SendOnLogin] AugmentationJackOfAllTrades = 326, + [SendOnLogin] AugmentationResistanceNether = 327, [SendOnLogin] AugmentationInfusedVoidMagic = 328, diff --git a/Source/ACE.Server/WorldObjects/AugmentationDevice.cs b/Source/ACE.Server/WorldObjects/AugmentationDevice.cs index c3f9fcada8..ca7269c52f 100644 --- a/Source/ACE.Server/WorldObjects/AugmentationDevice.cs +++ b/Source/ACE.Server/WorldObjects/AugmentationDevice.cs @@ -302,6 +302,7 @@ public bool VerifyRequirements(Player player) { AugmentationType.DamageResist, PropertyInt.AugmentationDamageReduction }, { AugmentationType.AllStats, PropertyInt.AugmentationJackOfAllTrades }, { AugmentationType.FociVoid, PropertyInt.AugmentationInfusedVoidMagic }, + { AugmentationType.ResistNether, PropertyInt.AugmentationResistanceNether }, }; } } diff --git a/Source/ACE.Server/WorldObjects/Player_Properties.cs b/Source/ACE.Server/WorldObjects/Player_Properties.cs index bbee5aeab5..a61ac95f01 100644 --- a/Source/ACE.Server/WorldObjects/Player_Properties.cs +++ b/Source/ACE.Server/WorldObjects/Player_Properties.cs @@ -799,6 +799,15 @@ public int AugmentationResistanceLightning set { if (value == 0) RemoveProperty(PropertyInt.AugmentationResistanceLightning); else SetProperty(PropertyInt.AugmentationResistanceLightning, value); } } + /// + /// Enhancement of the Yonneh + /// Grants the player 10% extra resistance to nether damage. You may only have 2 resistance augmentations in effect at any time. + /// + public int AugmentationResistanceNether { + get => GetProperty(PropertyInt.AugmentationResistanceNether) ?? 0; + set { if (value == 0) RemoveProperty(PropertyInt.AugmentationResistanceNether); else SetProperty(PropertyInt.AugmentationResistanceNether, value); } + } + /// /// The number of resistance augs that have been applied (max 2) /// @@ -1363,6 +1372,9 @@ public int GetAugmentationResistance(DamageType damageType) case DamageType.Electric: return AugmentationResistanceLightning; + + case DamageType.Nether: + return AugmentationResistanceNether; } return 0; }