From 2b4b442f1ba4daaba038bc1dbf6eed3a487544b8 Mon Sep 17 00:00:00 2001 From: Jhett Black <10942655+jhett12321@users.noreply.github.com> Date: Sun, 10 Dec 2023 19:30:54 +0100 Subject: [PATCH] Fix compile errors. --- .../Native/DebugEvents/DebugEventFactory.cs | 2 +- NWN.Anvil/src/main/API/Objects/NwPlayer.cs | 16 +- .../src/main/API/Ruleset/CRulesKeyHash.cs | 26 ++ NWN.Anvil/src/main/API/Ruleset/NwSpell.cs | 10 + NWN.Anvil/src/main/API/Ruleset/RulesetKeys.cs | 428 ++++++++++++++++++ .../Tables/NwGameTables.Factory.cs | 48 +- .../src/main/API/Utils/VirtualMachine.cs | 4 +- .../Functions/Functions.CNWSCreatureStats.cs | 4 +- .../API/Creature/InitiativeModifierService.cs | 8 +- .../API/Player/PlayerNameOverrideService.cs | 18 +- .../PlayerRestDurationOverrideService.cs | 2 +- .../ELC/EnforceLegalCharacterService.cs | 16 +- .../Services/Resources/ResourceManager.cs | 22 +- .../src/main/Services/Weapon/WeaponService.cs | 2 +- 14 files changed, 521 insertions(+), 85 deletions(-) create mode 100644 NWN.Anvil/src/main/API/Ruleset/CRulesKeyHash.cs create mode 100644 NWN.Anvil/src/main/API/Ruleset/RulesetKeys.cs diff --git a/NWN.Anvil/src/main/API/Events/Native/DebugEvents/DebugEventFactory.cs b/NWN.Anvil/src/main/API/Events/Native/DebugEvents/DebugEventFactory.cs index 5321804e7..c846be7ce 100644 --- a/NWN.Anvil/src/main/API/Events/Native/DebugEvents/DebugEventFactory.cs +++ b/NWN.Anvil/src/main/API/Events/Native/DebugEvents/DebugEventFactory.cs @@ -59,7 +59,7 @@ private static OnDebugRunScript HandleRunScriptEvent(CNWSMessage message, NwPlay string scriptName = message.PeekMessageString(offset); offset += scriptName.Length + 4; - uint oidTarget = player?.Player.SatisfiesBuild(8193, 14).ToBool() == true ? message.PeekMessage(offset) : NwObject.Invalid; + uint oidTarget = player?.Player.SatisfiesBuild(8193, 14, 0).ToBool() == true ? message.PeekMessage(offset) : NwObject.Invalid; if (oidTarget == NwObject.Invalid) { oidTarget = player?.ControlledCreature; diff --git a/NWN.Anvil/src/main/API/Objects/NwPlayer.cs b/NWN.Anvil/src/main/API/Objects/NwPlayer.cs index 6c7a231d8..93a8e7ea9 100644 --- a/NWN.Anvil/src/main/API/Objects/NwPlayer.cs +++ b/NWN.Anvil/src/main/API/Objects/NwPlayer.cs @@ -165,7 +165,7 @@ public bool IsPlayerDM return; } - if (!playerInfo.SatisfiesBuild(8193, 14)) + if (!playerInfo.SatisfiesBuild(8193, 14, 0)) { Log.Warn("{PlayerName} cannot toggle DM mode as the player's client does not support PlayerDM functionality", PlayerName); return; @@ -1202,18 +1202,14 @@ public SQLQuery PrepareSQLQuery(string query) /// The game object to refresh. public unsafe void RefreshClientObject(NwGameObject gameObject) { - CExoLinkedListInternal lastUpdateObjects = Player.m_pActiveObjectsLastUpdate.m_pcExoLinkedListInternal; - for (CExoLinkedListNode node = lastUpdateObjects.pHead; node != null; node = node.pNext) + CExoArrayListCLastUpdateObjectPtr lastUpdateObjects = Player.m_lstActiveObjectsLastUpdate; + for (int i = lastUpdateObjects.Count - 1; i >= 0; i--) { - CLastUpdateObject luo = CLastUpdateObject.FromPointer(node.pObject, true); + CLastUpdateObject luo = lastUpdateObjects[i]; if (luo.m_nId == gameObject.ObjectId) { - lastUpdateObjects.Remove(node); - luo.Dispose(); - } - else - { - GC.SuppressFinalize(luo); + lastUpdateObjects.RemoveAt(i); + CLastUpdateObject.FromPointer(luo, true).Dispose(); } } } diff --git a/NWN.Anvil/src/main/API/Ruleset/CRulesKeyHash.cs b/NWN.Anvil/src/main/API/Ruleset/CRulesKeyHash.cs new file mode 100644 index 000000000..90b3d5cbe --- /dev/null +++ b/NWN.Anvil/src/main/API/Ruleset/CRulesKeyHash.cs @@ -0,0 +1,26 @@ +namespace Anvil.API +{ + public readonly struct CRulesKeyHash + { + public ulong Hash { get; } + + public CRulesKeyHash(string key) + { + Hash = 14695981039346656037ul; + for (int i = 0; i < key.Length; i++) + { + Hash = (Hash ^ key[i]) * 1099511628211ul; + } + } + + public static implicit operator CRulesKeyHash(string key) + { + return new CRulesKeyHash(key); + } + + public static implicit operator ulong(CRulesKeyHash hash) + { + return hash.Hash; + } + } +} diff --git a/NWN.Anvil/src/main/API/Ruleset/NwSpell.cs b/NWN.Anvil/src/main/API/Ruleset/NwSpell.cs index 744c128c0..cdd57e962 100644 --- a/NWN.Anvil/src/main/API/Ruleset/NwSpell.cs +++ b/NWN.Anvil/src/main/API/Ruleset/NwSpell.cs @@ -288,6 +288,16 @@ public SpellComponents SpellComponents return spellId != null ? NwRuleset.Spells.ElementAtOrDefault(spellId.Value) : null; } + /// + /// Resolves a from a spell id. + /// + /// The id of the spell to resolve. + /// The associated instance. Null if the spell id is invalid. + public static NwSpell? FromSpellId(uint? spellId) + { + return spellId != null ? NwRuleset.Spells.ElementAtOrDefault((int)spellId.Value) : null; + } + /// /// Resolves a from a . /// diff --git a/NWN.Anvil/src/main/API/Ruleset/RulesetKeys.cs b/NWN.Anvil/src/main/API/Ruleset/RulesetKeys.cs new file mode 100644 index 000000000..4af8bce2e --- /dev/null +++ b/NWN.Anvil/src/main/API/Ruleset/RulesetKeys.cs @@ -0,0 +1,428 @@ +// ReSharper disable InconsistentNaming + +namespace Anvil.API +{ + internal static class RulesetKeys + { + public static readonly CRulesKeyHash CALLED_SHOT_TO_HIT_MODIFIER = new CRulesKeyHash("CALLED_SHOT_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash CALLED_SHOT_EFFECT_DURATION = new CRulesKeyHash("CALLED_SHOT_EFFECT_DURATION"); + public static readonly CRulesKeyHash CALLED_SHOT_ARM_ATTACK_PENALTY = new CRulesKeyHash("CALLED_SHOT_ARM_ATTACK_PENALTY"); + public static readonly CRulesKeyHash CALLED_SHOT_LEG_ABILITY_PENALTY = new CRulesKeyHash("CALLED_SHOT_LEG_ABILITY_PENALTY"); + public static readonly CRulesKeyHash CALLED_SHOT_LEG_MOVEMENT_PENALTY = new CRulesKeyHash("CALLED_SHOT_LEG_MOVEMENT_PENALTY"); + public static readonly CRulesKeyHash SAP_TO_HIT_MODIFIER = new CRulesKeyHash("SAP_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash SAP_EFFECT_DURATION = new CRulesKeyHash("SAP_EFFECT_DURATION"); + public static readonly CRulesKeyHash DISARM_TO_HIT_MODIFIER = new CRulesKeyHash("DISARM_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash IMPROVED_DISARM_TO_HIT_MODIFIER = new CRulesKeyHash("IMPROVED_DISARM_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash DISARM_WEAPON_SIZE_MODIFIER = new CRulesKeyHash("DISARM_WEAPON_SIZE_MODIFIER"); + public static readonly CRulesKeyHash KNOCKDOWN_TO_HIT_MODIFIER = new CRulesKeyHash("KNOCKDOWN_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash KNOCKDOWN_EFFECT_DURATION = new CRulesKeyHash("KNOCKDOWN_EFFECT_DURATION"); + public static readonly CRulesKeyHash KNOCKDOWN_CREATURE_SIZE_MODIFIER = new CRulesKeyHash("KNOCKDOWN_CREATURE_SIZE_MODIFIER"); + public static readonly CRulesKeyHash IMPROVED_PARRY_MODIFIER = new CRulesKeyHash("IMPROVED_PARRY_MODIFIER"); + public static readonly CRulesKeyHash GOOD_AIM_MODIFIER = new CRulesKeyHash("GOOD_AIM_MODIFIER"); + public static readonly CRulesKeyHash STUNNING_FIST_TO_HIT_MODIFIER = new CRulesKeyHash("STUNNING_FIST_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash STUNNING_FIST_DAMAGE_MODIFIER = new CRulesKeyHash("STUNNING_FIST_DAMAGE_MODIFIER"); + public static readonly CRulesKeyHash STUNNING_FIST_EFFECT_DURATION = new CRulesKeyHash("STUNNING_FIST_EFFECT_DURATION"); + public static readonly CRulesKeyHash STUNNING_FIST_BASE_SAVE_DC = new CRulesKeyHash("STUNNING_FIST_BASE_SAVE_DC"); + public static readonly CRulesKeyHash CRIPPLING_STRIKE_STRENGTH_MODIFIER = new CRulesKeyHash("CRIPPLING_STRIKE_STRENGTH_MODIFIER"); + public static readonly CRulesKeyHash PARRY_RIPOSTE_DIFFERENCE = new CRulesKeyHash("PARRY_RIPOSTE_DIFFERENCE"); + public static readonly CRulesKeyHash TAUNT_EFFECT_DURATION = new CRulesKeyHash("TAUNT_EFFECT_DURATION"); + public static readonly CRulesKeyHash TAUNT_ARCANE_SPELL_FAILURE = new CRulesKeyHash("TAUNT_ARCANE_SPELL_FAILURE"); + public static readonly CRulesKeyHash TAUNT_MAX_MODIFIER = new CRulesKeyHash("TAUNT_MAX_MODIFIER"); + public static readonly CRulesKeyHash ALERTNESS_SKILL_BONUS = new CRulesKeyHash("ALERTNESS_SKILL_BONUS"); + public static readonly CRulesKeyHash STONECUNNING_SEARCH_SKILL_BONUS = new CRulesKeyHash("STONECUNNING_SEARCH_SKILL_BONUS"); + public static readonly CRulesKeyHash TRACKLESS_STEP_SKILL_BONUS = new CRulesKeyHash("TRACKLESS_STEP_SKILL_BONUS"); + public static readonly CRulesKeyHash RESIST_NATURES_LURE_SAVE_BONUS = new CRulesKeyHash("RESIST_NATURES_LURE_SAVE_BONUS"); + public static readonly CRulesKeyHash BLIND_PENALTY_TO_SKILL_CHECK = new CRulesKeyHash("BLIND_PENALTY_TO_SKILL_CHECK"); + public static readonly CRulesKeyHash PICKPOCKET_HOSTILE_CREATURE_DC = new CRulesKeyHash("PICKPOCKET_HOSTILE_CREATURE_DC"); + public static readonly CRulesKeyHash PICKPOCKET_NEUTRAL_CREATURE_DC = new CRulesKeyHash("PICKPOCKET_NEUTRAL_CREATURE_DC"); + public static readonly CRulesKeyHash PICKPOCKET_CREATURE_DEAD = new CRulesKeyHash("PICKPOCKET_CREATURE_DEAD"); + public static readonly CRulesKeyHash MAX_NON_ROGUE_DISARM_LEVEL = new CRulesKeyHash("MAX_NON_ROGUE_DISARM_LEVEL"); + public static readonly CRulesKeyHash MAX_NON_ROGUE_DETECT_LEVEL = new CRulesKeyHash("MAX_NON_ROGUE_DETECT_LEVEL"); + public static readonly CRulesKeyHash ASSESSTRAP_EFORTLESS_MODIFIER = new CRulesKeyHash("ASSESSTRAP_EFORTLESS_MODIFIER"); + public static readonly CRulesKeyHash ASSESSTRAP_EASY_MODIFIER = new CRulesKeyHash("ASSESSTRAP_EASY_MODIFIER"); + public static readonly CRulesKeyHash ASSESSTRAP_CHALLENGING_MODIFIER = new CRulesKeyHash("ASSESSTRAP_CHALLENGING_MODIFIER"); + public static readonly CRulesKeyHash ASSESSTRAP_DIFFICULT_MODIFIER = new CRulesKeyHash("ASSESSTRAP_DIFFICULT_MODIFIER"); + public static readonly CRulesKeyHash SKILL_DISABLETRAP_SYNERGY_LEVEL = new CRulesKeyHash("SKILL_DISABLETRAP_SYNERGY_LEVEL"); + public static readonly CRulesKeyHash SKILL_DISABLE_TRAP_SYNERGY_BONUS = new CRulesKeyHash("SKILL_DISABLE_TRAP_SYNERGY_BONUS"); + public static readonly CRulesKeyHash SKILL_SETTRAP_SYNERGY_LEVEL = new CRulesKeyHash("SKILL_SETTRAP_SYNERGY_LEVEL"); + public static readonly CRulesKeyHash SKILL_SETTRAP_SYNERGY_BONUS = new CRulesKeyHash("SKILL_SETTRAP_SYNERGY_BONUS"); + public static readonly CRulesKeyHash SKILL_PICKPOCKET_HOSTILE_SPOT_BONUS = new CRulesKeyHash("SKILL_PICKPOCKET_HOSTILE_SPOT_BONUS"); + public static readonly CRulesKeyHash CONCENTRATION_CHECK_RANGE = new CRulesKeyHash("CONCENTRATION_CHECK_RANGE"); + public static readonly CRulesKeyHash CONCENTRATION_CHECK_MELEE_PENALTY = new CRulesKeyHash("CONCENTRATION_CHECK_MELEE_PENALTY"); + public static readonly CRulesKeyHash CONCENTRATION_BASE_DC = new CRulesKeyHash("CONCENTRATION_BASE_DC"); + public static readonly CRulesKeyHash ANIMAL_EMPATHY_ANIMAL_DC = new CRulesKeyHash("ANIMAL_EMPATHY_ANIMAL_DC"); + public static readonly CRulesKeyHash ANIMAL_EMPATHY_BEAST_DC = new CRulesKeyHash("ANIMAL_EMPATHY_BEAST_DC"); + public static readonly CRulesKeyHash MAX_MELEE_DISTANCE = new CRulesKeyHash("MAX_MELEE_DISTANCE"); + public static readonly CRulesKeyHash MIN_RANGED_DISTANCE = new CRulesKeyHash("MIN_RANGED_DISTANCE"); + public static readonly CRulesKeyHash MAX_RANGED_SNEAK_ATTACK_DISTANCE = new CRulesKeyHash("MAX_RANGED_SNEAK_ATTACK_DISTANCE"); + public static readonly CRulesKeyHash MAX_RANGED_FLANK_ATTACK_DISTANCE = new CRulesKeyHash("MAX_RANGED_FLANK_ATTACK_DISTANCE"); + public static readonly CRulesKeyHash RANGED_MISS_DISTANCE_MODIFIER = new CRulesKeyHash("RANGED_MISS_DISTANCE_MODIFIER"); + public static readonly CRulesKeyHash CROSSBOW_ATTACKS = new CRulesKeyHash("CROSSBOW_ATTACKS"); + public static readonly CRulesKeyHash SLOWED_ATTACKS = new CRulesKeyHash("SLOWED_ATTACKS"); + public static readonly CRulesKeyHash HASTED_BONUS_ATTACKS = new CRulesKeyHash("HASTED_BONUS_ATTACKS"); + public static readonly CRulesKeyHash NUM_ATTACKS_OF_OPPORTUNITY = new CRulesKeyHash("NUM_ATTACKS_OF_OPPORTUNITY"); + public static readonly CRulesKeyHash DEFENSIVE_CASTING_BASE_DC = new CRulesKeyHash("DEFENSIVE_CASTING_BASE_DC"); + public static readonly CRulesKeyHash COUNTERSPELL_LESSER_DISPEL_THRESHOLD = new CRulesKeyHash("COUNTERSPELL_LESSER_DISPEL_THRESHOLD"); + public static readonly CRulesKeyHash COUNTERSPELL_DISPEL_THRESHOLD = new CRulesKeyHash("COUNTERSPELL_DISPEL_THRESHOLD"); + public static readonly CRulesKeyHash COUNTERSPELL_GREATER_DISPEL_THRESHOLD = new CRulesKeyHash("COUNTERSPELL_GREATER_DISPEL_THRESHOLD"); + public static readonly CRulesKeyHash COUNTERSPELL_MORDENKAINENS_DISJUNCTION = new CRulesKeyHash("COUNTERSPELL_MORDENKAINENS_DISJUNCTION"); + public static readonly CRulesKeyHash BLIND_TARGET_BONUS = new CRulesKeyHash("BLIND_TARGET_BONUS"); + public static readonly CRulesKeyHash BLIND_MISS_CHANCE = new CRulesKeyHash("BLIND_MISS_CHANCE"); + public static readonly CRulesKeyHash PRONE_MELEE_TARGET_BONUS = new CRulesKeyHash("PRONE_MELEE_TARGET_BONUS"); + public static readonly CRulesKeyHash FLANK_ATTACK_BONUS = new CRulesKeyHash("FLANK_ATTACK_BONUS"); + public static readonly CRulesKeyHash PRONE_RANGED_TARGET_BONUS = new CRulesKeyHash("PRONE_RANGED_TARGET_BONUS"); + public static readonly CRulesKeyHash STUNNED_TARGET_BONUS = new CRulesKeyHash("STUNNED_TARGET_BONUS"); + public static readonly CRulesKeyHash MOVING_TARGET_PENALTY = new CRulesKeyHash("MOVING_TARGET_PENALTY"); + public static readonly CRulesKeyHash INVISIBILITY_CONCEALMENT_CHANCE = new CRulesKeyHash("INVISIBILITY_CONCEALMENT_CHANCE"); + public static readonly CRulesKeyHash INVISIBILITY_ATTACK_BONUS = new CRulesKeyHash("INVISIBILITY_ATTACK_BONUS"); + public static readonly CRulesKeyHash AMMUNITION_WARNING_LIMIT = new CRulesKeyHash("AMMUNITION_WARNING_LIMIT"); + public static readonly CRulesKeyHash AMMUNITION_WARNING_DECREMENT = new CRulesKeyHash("AMMUNITION_WARNING_DECREMENT"); + public static readonly CRulesKeyHash NOSIGHT_TARGET_PENALTY = new CRulesKeyHash("NOSIGHT_TARGET_PENALTY"); + public static readonly CRulesKeyHash NUM_CLEAVE_ATTACKS = new CRulesKeyHash("NUM_CLEAVE_ATTACKS"); + public static readonly CRulesKeyHash NUM_CIRCLE_KICK_ATTACKS = new CRulesKeyHash("NUM_CIRCLE_KICK_ATTACKS"); + public static readonly CRulesKeyHash FAST_SPELLCAST_ROUND = new CRulesKeyHash("FAST_SPELLCAST_ROUND"); + public static readonly CRulesKeyHash FLANK_LEVEL_RANGE = new CRulesKeyHash("FLANK_LEVEL_RANGE"); + public static readonly CRulesKeyHash COUP_DE_GRACE_LEVEL_LIMIT = new CRulesKeyHash("COUP_DE_GRACE_LEVEL_LIMIT"); + public static readonly CRulesKeyHash MAX_RANGED_COUP_DE_GRACE = new CRulesKeyHash("MAX_RANGED_COUP_DE_GRACE"); + public static readonly CRulesKeyHash SPOT_NO_LIGHT_MODIFIER = new CRulesKeyHash("SPOT_NO_LIGHT_MODIFIER"); + public static readonly CRulesKeyHash HIDING_LIGHT_MODIFIER = new CRulesKeyHash("HIDING_LIGHT_MODIFIER"); + public static readonly CRulesKeyHash CREATURE_SIZE_TINY_AC_BONUS = new CRulesKeyHash("CREATURE_SIZE_TINY_AC_BONUS"); + public static readonly CRulesKeyHash CREATURE_SIZE_SMALL_AC_BONUS = new CRulesKeyHash("CREATURE_SIZE_SMALL_AC_BONUS"); + public static readonly CRulesKeyHash CREATURE_SIZE_LARGE_AC_PENALTY = new CRulesKeyHash("CREATURE_SIZE_LARGE_AC_PENALTY"); + public static readonly CRulesKeyHash CREATURE_SIZE_HUGE_AC_PENALTY = new CRulesKeyHash("CREATURE_SIZE_HUGE_AC_PENALTY"); + public static readonly CRulesKeyHash CREATURE_SIZE_TINY_ATTACK_BONUS = new CRulesKeyHash("CREATURE_SIZE_TINY_ATTACK_BONUS"); + public static readonly CRulesKeyHash CREATURE_SIZE_SMALL_ATTACK_BONUS = new CRulesKeyHash("CREATURE_SIZE_SMALL_ATTACK_BONUS"); + public static readonly CRulesKeyHash CREATURE_SIZE_LARGE_ATTACK_PENALTY = new CRulesKeyHash("CREATURE_SIZE_LARGE_ATTACK_PENALTY"); + public static readonly CRulesKeyHash CREATURE_SIZE_HUGE_ATTACK_PENALTY = new CRulesKeyHash("CREATURE_SIZE_HUGE_ATTACK_PENALTY"); + public static readonly CRulesKeyHash WHIRLWIND_ATTACK_RANGE = new CRulesKeyHash("WHIRLWIND_ATTACK_RANGE"); + public static readonly CRulesKeyHash IMPROVED_WHIRLWIND_ATTACK_RANGE = new CRulesKeyHash("IMPROVED_WHIRLWIND_ATTACK_RANGE"); + public static readonly CRulesKeyHash HOLY_AVENGER_ITEM_PROPERTY_SR_BONUS = new CRulesKeyHash("HOLY_AVENGER_ITEM_PROPERTY_SR_BONUS"); + public static readonly CRulesKeyHash MAX_NEGATIVE_LEVELS = new CRulesKeyHash("MAX_NEGATIVE_LEVELS"); + public static readonly CRulesKeyHash BONUS_HP_PER_LEVEL_DRAINED = new CRulesKeyHash("BONUS_HP_PER_LEVEL_DRAINED"); + public static readonly CRulesKeyHash MAX_MASTER_DETECTION_DISTANCE_FROM_ASSOCIATE = new CRulesKeyHash("MAX_MASTER_DETECTION_DISTANCE_FROM_ASSOCIATE"); + public static readonly CRulesKeyHash REST_ENEMY_CHECK_DISTANCE = new CRulesKeyHash("REST_ENEMY_CHECK_DISTANCE"); + public static readonly CRulesKeyHash MIN_TRAP_FIRE_DISTANCE = new CRulesKeyHash("MIN_TRAP_FIRE_DISTANCE"); + public static readonly CRulesKeyHash ONHIT_EFFECT_DC = new CRulesKeyHash("ONHIT_EFFECT_DC"); + public static readonly CRulesKeyHash KI_STRIKE_LEVEL_5 = new CRulesKeyHash("KI_STRIKE_LEVEL_5"); + public static readonly CRulesKeyHash KI_STRIKE_LEVEL_4 = new CRulesKeyHash("KI_STRIKE_LEVEL_4"); + public static readonly CRulesKeyHash KI_STRIKE_LEVEL_3 = new CRulesKeyHash("KI_STRIKE_LEVEL_3"); + public static readonly CRulesKeyHash KI_STRIKE_LEVEL_2 = new CRulesKeyHash("KI_STRIKE_LEVEL_2"); + public static readonly CRulesKeyHash KI_STRIKE_LEVEL_1 = new CRulesKeyHash("KI_STRIKE_LEVEL_1"); + public static readonly CRulesKeyHash DODGE_AC_BONUS = new CRulesKeyHash("DODGE_AC_BONUS"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DODGE_AC_BONUS_2 = new CRulesKeyHash("SHOU_DISCIPLE_DODGE_AC_BONUS_2"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DODGE_AC_BONUS_3 = new CRulesKeyHash("SHOU_DISCIPLE_DODGE_AC_BONUS_3"); + public static readonly CRulesKeyHash UNCANNY_DODGE_LEVEL_6 = new CRulesKeyHash("UNCANNY_DODGE_LEVEL_6"); + public static readonly CRulesKeyHash UNCANNY_DODGE_LEVEL_5 = new CRulesKeyHash("UNCANNY_DODGE_LEVEL_5"); + public static readonly CRulesKeyHash UNCANNY_DODGE_LEVEL_4 = new CRulesKeyHash("UNCANNY_DODGE_LEVEL_4"); + public static readonly CRulesKeyHash UNCANNY_DODGE_LEVEL_3 = new CRulesKeyHash("UNCANNY_DODGE_LEVEL_3"); + public static readonly CRulesKeyHash UNCANNY_DODGE_LEVEL_2 = new CRulesKeyHash("UNCANNY_DODGE_LEVEL_2"); + public static readonly CRulesKeyHash DEFENSIVE_AWARENESS_SAVE_BONUS = new CRulesKeyHash("DEFENSIVE_AWARENESS_SAVE_BONUS"); + public static readonly CRulesKeyHash ONHAND_NORMAL_OFFHAND_ATTACK_PENALTY = new CRulesKeyHash("ONHAND_NORMAL_OFFHAND_ATTACK_PENALTY"); + public static readonly CRulesKeyHash OFFHAND_NORMAL_OFFHAND_ATTACK_PENALTY = new CRulesKeyHash("OFFHAND_NORMAL_OFFHAND_ATTACK_PENALTY"); + public static readonly CRulesKeyHash LIGHT_OFFHAND_WEAPON_BONUS = new CRulesKeyHash("LIGHT_OFFHAND_WEAPON_BONUS"); + public static readonly CRulesKeyHash AMBIDEXTERITY_BONUS = new CRulesKeyHash("AMBIDEXTERITY_BONUS"); + public static readonly CRulesKeyHash TWO_WEAPON_FIGHTING_BONUS = new CRulesKeyHash("TWO_WEAPON_FIGHTING_BONUS"); + public static readonly CRulesKeyHash OFFENSIVE_TRAINING_MODIFIER = new CRulesKeyHash("OFFENSIVE_TRAINING_MODIFIER"); + public static readonly CRulesKeyHash DEFENSIVE_TRAINING_MODIFIER = new CRulesKeyHash("DEFENSIVE_TRAINING_MODIFIER"); + public static readonly CRulesKeyHash DWARVEN_DEFENDER_DAMAGE_REDUCTION = new CRulesKeyHash("DWARVEN_DEFENDER_DAMAGE_REDUCTION"); + public static readonly CRulesKeyHash EPIC_BARBARIAN_DAMAGE_REDUCTION = new CRulesKeyHash("EPIC_BARBARIAN_DAMAGE_REDUCTION"); + public static readonly CRulesKeyHash BARBARIAN_DAMAGE_REDUCTION_LEVEL_4 = new CRulesKeyHash("BARBARIAN_DAMAGE_REDUCTION_LEVEL_4"); + public static readonly CRulesKeyHash BARBARIAN_DAMAGE_REDUCTION_LEVEL_3 = new CRulesKeyHash("BARBARIAN_DAMAGE_REDUCTION_LEVEL_3"); + public static readonly CRulesKeyHash BARBARIAN_DAMAGE_REDUCTION_LEVEL_2 = new CRulesKeyHash("BARBARIAN_DAMAGE_REDUCTION_LEVEL_2"); + public static readonly CRulesKeyHash BARBARIAN_DAMAGE_REDUCTION_LEVEL_1 = new CRulesKeyHash("BARBARIAN_DAMAGE_REDUCTION_LEVEL_1"); + public static readonly CRulesKeyHash DIAMOND_SOUL_SPELL_RESISTANCE_BASE = new CRulesKeyHash("DIAMOND_SOUL_SPELL_RESISTANCE_BASE"); + public static readonly CRulesKeyHash PERFECT_SELF_DAMAGE_REDUCTION_POWER = new CRulesKeyHash("PERFECT_SELF_DAMAGE_REDUCTION_POWER"); + public static readonly CRulesKeyHash PERFECT_SELF_DAMAGE_REDUCTION = new CRulesKeyHash("PERFECT_SELF_DAMAGE_REDUCTION"); + public static readonly CRulesKeyHash STILL_MIND_COMPETANCE_BONUS = new CRulesKeyHash("STILL_MIND_COMPETANCE_BONUS"); + public static readonly CRulesKeyHash FEARLESS_MORALE_BONUS = new CRulesKeyHash("FEARLESS_MORALE_BONUS"); + public static readonly CRulesKeyHash RANGED_ATTACK_IN_MELEE_RANGE = new CRulesKeyHash("RANGED_ATTACK_IN_MELEE_RANGE"); + public static readonly CRulesKeyHash POINT_BLANK_SHOT_MAX_RANGE = new CRulesKeyHash("POINT_BLANK_SHOT_MAX_RANGE"); + public static readonly CRulesKeyHash POINT_BLANK_SHOT_ATTACK_BONUS = new CRulesKeyHash("POINT_BLANK_SHOT_ATTACK_BONUS"); + public static readonly CRulesKeyHash POINT_BLANK_SHOT_DAMAGE_BONUS = new CRulesKeyHash("POINT_BLANK_SHOT_DAMAGE_BONUS"); + public static readonly CRulesKeyHash MOBILITY_DODGE_BONUS = new CRulesKeyHash("MOBILITY_DODGE_BONUS"); + public static readonly CRulesKeyHash OPPORTUNIST_TO_HIT_MODIFIER = new CRulesKeyHash("OPPORTUNIST_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash NATURE_SENSE_TO_HIT_MODIFIER = new CRulesKeyHash("NATURE_SENSE_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash HARDINESS_SAVE_BONUS = new CRulesKeyHash("HARDINESS_SAVE_BONUS"); + public static readonly CRulesKeyHash DEFLECT_ARROWS_DC = new CRulesKeyHash("DEFLECT_ARROWS_DC"); + public static readonly CRulesKeyHash SKILL_FOCUS_SKILL_BONUS = new CRulesKeyHash("SKILL_FOCUS_SKILL_BONUS"); + public static readonly CRulesKeyHash SKILL_AFFINITY_SKILL_BONUS = new CRulesKeyHash("SKILL_AFFINITY_SKILL_BONUS"); + public static readonly CRulesKeyHash PARTIAL_SKILL_FOCUS_SKILL_BONUS = new CRulesKeyHash("PARTIAL_SKILL_FOCUS_SKILL_BONUS"); + public static readonly CRulesKeyHash FEAT_EXTRA_TURNING_BONUS_TURNS = new CRulesKeyHash("FEAT_EXTRA_TURNING_BONUS_TURNS"); + public static readonly CRulesKeyHash FEAT_SPELL_FOCUS_BONUS = new CRulesKeyHash("FEAT_SPELL_FOCUS_BONUS"); + public static readonly CRulesKeyHash FEAT_GREATER_SPELL_FOCUS_BONUS = new CRulesKeyHash("FEAT_GREATER_SPELL_FOCUS_BONUS"); + public static readonly CRulesKeyHash FEAT_SPELL_PENETRATION_LEVEL_BONUS = new CRulesKeyHash("FEAT_SPELL_PENETRATION_LEVEL_BONUS"); + public static readonly CRulesKeyHash FEAT_GREATER_SPELL_PENETRATION_LEVEL_BONUS = new CRulesKeyHash("FEAT_GREATER_SPELL_PENETRATION_LEVEL_BONUS"); + public static readonly CRulesKeyHash TURN_UNDEAD_BASE_USES_PER_DAY = new CRulesKeyHash("TURN_UNDEAD_BASE_USES_PER_DAY"); + public static readonly CRulesKeyHash QUIVERING_PALM_BASE_DC = new CRulesKeyHash("QUIVERING_PALM_BASE_DC"); + public static readonly CRulesKeyHash IMPROVED_INITIATIVE_BONUS = new CRulesKeyHash("IMPROVED_INITIATIVE_BONUS"); + public static readonly CRulesKeyHash ARTIST_PERFORM_BONUS = new CRulesKeyHash("ARTIST_PERFORM_BONUS"); + public static readonly CRulesKeyHash ARTIST_PERSUADE_BONUS = new CRulesKeyHash("ARTIST_PERSUADE_BONUS"); + public static readonly CRulesKeyHash ARTIST_SPOT_BONUS = new CRulesKeyHash("ARTIST_SPOT_BONUS"); + public static readonly CRulesKeyHash BLOODED_INITIATIVE_BONUS = new CRulesKeyHash("BLOODED_INITIATIVE_BONUS"); + public static readonly CRulesKeyHash THUG_INITIATIVE_BONUS = new CRulesKeyHash("THUG_INITIATIVE_BONUS"); + public static readonly CRulesKeyHash THUG_PERSUADE_BONUS = new CRulesKeyHash("THUG_PERSUADE_BONUS"); + public static readonly CRulesKeyHash BLOODED_SPOT_BONUS = new CRulesKeyHash("BLOODED_SPOT_BONUS"); + public static readonly CRulesKeyHash BULLHEADED_WILL_SAVE_BONUS = new CRulesKeyHash("BULLHEADED_WILL_SAVE_BONUS"); + public static readonly CRulesKeyHash BULLHEADED_BONUS_VS_TAUNT = new CRulesKeyHash("BULLHEADED_BONUS_VS_TAUNT"); + public static readonly CRulesKeyHash COURTEOUS_MAGOCRACY_LORE_BONUS = new CRulesKeyHash("COURTEOUS_MAGOCRACY_LORE_BONUS"); + public static readonly CRulesKeyHash LUCKOFHEROES_SAVE_BONUS = new CRulesKeyHash("LUCKOFHEROES_SAVE_BONUS"); + public static readonly CRulesKeyHash RESIST_POISON_BONUS = new CRulesKeyHash("RESIST_POISON_BONUS"); + public static readonly CRulesKeyHash SILVER_PALM_PERSUADE_BONUS = new CRulesKeyHash("SILVER_PALM_PERSUADE_BONUS"); + public static readonly CRulesKeyHash SILVER_PALM_APPRAISE_BONUS = new CRulesKeyHash("SILVER_PALM_APPRAISE_BONUS"); + public static readonly CRulesKeyHash SMOOTH_TALK_PERSUADE_BONUS = new CRulesKeyHash("SMOOTH_TALK_PERSUADE_BONUS"); + public static readonly CRulesKeyHash SNAKE_BLOOOD_POISON_BONUS = new CRulesKeyHash("SNAKE_BLOOOD_POISON_BONUS"); + public static readonly CRulesKeyHash SNAKE_BLOOD_REFLEX_BONUS = new CRulesKeyHash("SNAKE_BLOOD_REFLEX_BONUS"); + public static readonly CRulesKeyHash STEALTHY_MOVE_SILENTLY_BONUS = new CRulesKeyHash("STEALTHY_MOVE_SILENTLY_BONUS"); + public static readonly CRulesKeyHash STEALTHY_HIDE_BONUS = new CRulesKeyHash("STEALTHY_HIDE_BONUS"); + public static readonly CRulesKeyHash STRONG_SOUL_SAVE_BONUS = new CRulesKeyHash("STRONG_SOUL_SAVE_BONUS"); + public static readonly CRulesKeyHash STRONG_SOUL_SAVE_VS_DEATH_BONUS = new CRulesKeyHash("STRONG_SOUL_SAVE_VS_DEATH_BONUS"); + public static readonly CRulesKeyHash STRONG_SOULD_SAVE_VS_NEG_BONUS = new CRulesKeyHash("STRONG_SOULD_SAVE_VS_NEG_BONUS"); + public static readonly CRulesKeyHash MERCANTILE_BACKGROUND_APPRAISE_BONUS = new CRulesKeyHash("MERCANTILE_BACKGROUND_APPRAISE_BONUS"); + public static readonly CRulesKeyHash FEAT_EXTRA_STUNNING_ATTACK_USES = new CRulesKeyHash("FEAT_EXTRA_STUNNING_ATTACK_USES"); + public static readonly CRulesKeyHash ARCANE_DEFENSE_SAVE_BONUS = new CRulesKeyHash("ARCANE_DEFENSE_SAVE_BONUS"); + public static readonly CRulesKeyHash EXTRA_MUSIC_BONUS_USES = new CRulesKeyHash("EXTRA_MUSIC_BONUS_USES"); + public static readonly CRulesKeyHash RESIST_DISEASE_BONUS = new CRulesKeyHash("RESIST_DISEASE_BONUS"); + public static readonly CRulesKeyHash FIRING_INTO_MELEE_MODIFIER = new CRulesKeyHash("FIRING_INTO_MELEE_MODIFIER"); + public static readonly CRulesKeyHash RESISTANCE_TO_ENERGY = new CRulesKeyHash("RESISTANCE_TO_ENERGY"); + public static readonly CRulesKeyHash TUMBLE_NUM_RANKS_PER_AC_BONUS = new CRulesKeyHash("TUMBLE_NUM_RANKS_PER_AC_BONUS"); + public static readonly CRulesKeyHash DIRTY_FIGHTING_NUM_ATTACKS_PER_ROUND = new CRulesKeyHash("DIRTY_FIGHTING_NUM_ATTACKS_PER_ROUND"); + public static readonly CRulesKeyHash DENEIRS_EYE_SAVE_BONUS = new CRulesKeyHash("DENEIRS_EYE_SAVE_BONUS"); + public static readonly CRulesKeyHash LLIIRAS_HEART_SAVE_BONUS = new CRulesKeyHash("LLIIRAS_HEART_SAVE_BONUS"); + public static readonly CRulesKeyHash EXTRA_SMITING_BONUS_USES = new CRulesKeyHash("EXTRA_SMITING_BONUS_USES"); + public static readonly CRulesKeyHash SPELLCRAFT_NUM_RANKS_PER_SAVE_BONUS = new CRulesKeyHash("SPELLCRAFT_NUM_RANKS_PER_SAVE_BONUS"); + public static readonly CRulesKeyHash MAX_AC_DODGE_MOD = new CRulesKeyHash("MAX_AC_DODGE_MOD"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_1_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_1_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_2_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_2_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_3_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_3_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_4_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_4_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_5_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_5_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_6_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_6_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_7_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_7_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_8_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_8_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_9_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_9_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_10_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_10_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_11_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_11_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_12_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_12_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_13_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_13_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_14_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_14_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_15_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_15_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_16_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_16_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_17_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_17_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_18_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_18_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_19_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_19_BONUS"); + public static readonly CRulesKeyHash PRESTIGE_ENCHANT_ARROW_20_BONUS = new CRulesKeyHash("PRESTIGE_ENCHANT_ARROW_20_BONUS"); + public static readonly CRulesKeyHash EPIC_ARMOR_SKIN_NATURAL_AC_BONUS = new CRulesKeyHash("EPIC_ARMOR_SKIN_NATURAL_AC_BONUS"); + public static readonly CRulesKeyHash EPIC_DAMAGE_REDUCTION_3 = new CRulesKeyHash("EPIC_DAMAGE_REDUCTION_3"); + public static readonly CRulesKeyHash EPIC_DAMAGE_REDUCTION_6 = new CRulesKeyHash("EPIC_DAMAGE_REDUCTION_6"); + public static readonly CRulesKeyHash EPIC_DAMAGE_REDUCTION_9 = new CRulesKeyHash("EPIC_DAMAGE_REDUCTION_9"); + public static readonly CRulesKeyHash DEVASTATING_CRITICAL_BASE_DC = new CRulesKeyHash("DEVASTATING_CRITICAL_BASE_DC"); + public static readonly CRulesKeyHash EPIC_FORTITUDE_SAVE_BONUS = new CRulesKeyHash("EPIC_FORTITUDE_SAVE_BONUS"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_1 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_1"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_2 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_2"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_3 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_3"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_4 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_4"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_5 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_5"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_6 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_6"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_7 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_7"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_8 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_8"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_9 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_9"); + public static readonly CRulesKeyHash EPIC_ENERGY_RESISTANCE_AMOUNT_10 = new CRulesKeyHash("EPIC_ENERGY_RESISTANCE_AMOUNT_10"); + public static readonly CRulesKeyHash EPIC_PROWESS_ATTACK_BONUS = new CRulesKeyHash("EPIC_PROWESS_ATTACK_BONUS"); + public static readonly CRulesKeyHash EPIC_REFLEXES_REFLEX_BONUS = new CRulesKeyHash("EPIC_REFLEXES_REFLEX_BONUS"); + public static readonly CRulesKeyHash EPIC_REPUTATION_SKILL_BONUS = new CRulesKeyHash("EPIC_REPUTATION_SKILL_BONUS"); + public static readonly CRulesKeyHash EPIC_SKILL_FOCUS_SKILL_BONUS = new CRulesKeyHash("EPIC_SKILL_FOCUS_SKILL_BONUS"); + public static readonly CRulesKeyHash FEAT_EPIC_SPELL_FOCUS_BONUS = new CRulesKeyHash("FEAT_EPIC_SPELL_FOCUS_BONUS"); + public static readonly CRulesKeyHash FEAT_EPIC_SPELL_PENETRATION_LEVEL_BONUS = new CRulesKeyHash("FEAT_EPIC_SPELL_PENETRATION_LEVEL_BONUS"); + public static readonly CRulesKeyHash EPIC_WILL_SAVE_BONUS = new CRulesKeyHash("EPIC_WILL_SAVE_BONUS"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_1 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_1"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_2 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_2"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_3 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_3"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_4 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_4"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_5 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_5"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_6 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_6"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_7 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_7"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_8 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_8"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_9 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_9"); + public static readonly CRulesKeyHash EPIC_SPELL_RESISTANCE_10 = new CRulesKeyHash("EPIC_SPELL_RESISTANCE_10"); + public static readonly CRulesKeyHash EPIC_OVERWHELMING_CRITICAL_DIE = new CRulesKeyHash("EPIC_OVERWHELMING_CRITICAL_DIE"); + public static readonly CRulesKeyHash EPIC_OVERHWLEMING_CRITICAL_NUM_DICE = new CRulesKeyHash("EPIC_OVERHWLEMING_CRITICAL_NUM_DICE"); + public static readonly CRulesKeyHash EPIC_SELF_CONCEALMENT_50 = new CRulesKeyHash("EPIC_SELF_CONCEALMENT_50"); + public static readonly CRulesKeyHash EPIC_SELF_CONCEALMENT_40 = new CRulesKeyHash("EPIC_SELF_CONCEALMENT_40"); + public static readonly CRulesKeyHash EPIC_SELF_CONCEALMENT_30 = new CRulesKeyHash("EPIC_SELF_CONCEALMENT_30"); + public static readonly CRulesKeyHash EPIC_SELF_CONCEALMENT_20 = new CRulesKeyHash("EPIC_SELF_CONCEALMENT_20"); + public static readonly CRulesKeyHash EPIC_SELF_CONCEALMENT_10 = new CRulesKeyHash("EPIC_SELF_CONCEALMENT_10"); + public static readonly CRulesKeyHash EPIC_SUPERIOR_INITIATIVE_BONUS = new CRulesKeyHash("EPIC_SUPERIOR_INITIATIVE_BONUS"); + public static readonly CRulesKeyHash EPIC_GREAT_STAT_BONUS = new CRulesKeyHash("EPIC_GREAT_STAT_BONUS"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_1 = new CRulesKeyHash("EPIC_GREAT_SMITING_1"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_2 = new CRulesKeyHash("EPIC_GREAT_SMITING_2"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_3 = new CRulesKeyHash("EPIC_GREAT_SMITING_3"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_4 = new CRulesKeyHash("EPIC_GREAT_SMITING_4"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_5 = new CRulesKeyHash("EPIC_GREAT_SMITING_5"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_6 = new CRulesKeyHash("EPIC_GREAT_SMITING_6"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_7 = new CRulesKeyHash("EPIC_GREAT_SMITING_7"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_8 = new CRulesKeyHash("EPIC_GREAT_SMITING_8"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_9 = new CRulesKeyHash("EPIC_GREAT_SMITING_9"); + public static readonly CRulesKeyHash EPIC_GREAT_SMITING_10 = new CRulesKeyHash("EPIC_GREAT_SMITING_10"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_1 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_1"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_2 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_2"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_3 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_3"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_4 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_4"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_5 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_5"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_6 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_6"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_7 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_7"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_8 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_8"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_9 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_9"); + public static readonly CRulesKeyHash EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_10 = new CRulesKeyHash("EPIC_IMPROVED_STUNNING_FIST_DC_BONUS_10"); + public static readonly CRulesKeyHash EPIC_BANE_OF_ENEMIES_ATTACK_BONUS = new CRulesKeyHash("EPIC_BANE_OF_ENEMIES_ATTACK_BONUS"); + public static readonly CRulesKeyHash EPIC_BANE_OF_ENEMIES_DAMAGE_DIE = new CRulesKeyHash("EPIC_BANE_OF_ENEMIES_DAMAGE_DIE"); + public static readonly CRulesKeyHash EPIC_BANE_OF_ENEMIES_DAMAGE_DICE = new CRulesKeyHash("EPIC_BANE_OF_ENEMIES_DAMAGE_DICE"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_LESSER_STILL_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_LESSER_STILL_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_STILL_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_STILL_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_GREATER_STILL_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_GREATER_STILL_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_LESSER_SILENT_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_LESSER_SILENT_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_SILENT_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_SILENT_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_GREATER_SILENT_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_GREATER_SILENT_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_LESSER_QUICKEN_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_LESSER_QUICKEN_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_QUICKEN_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_QUICKEN_LEVEL_CAP"); + public static readonly CRulesKeyHash EPIC_AUTOMATIC_GREATER_QUICKEN_LEVEL_CAP = new CRulesKeyHash("EPIC_AUTOMATIC_GREATER_QUICKEN_LEVEL_CAP"); + public static readonly CRulesKeyHash POISON_SAVE_BONUS_1 = new CRulesKeyHash("POISON_SAVE_BONUS_1"); + public static readonly CRulesKeyHash POISON_SAVE_BONUS_2 = new CRulesKeyHash("POISON_SAVE_BONUS_2"); + public static readonly CRulesKeyHash POISON_SAVE_BONUS_3 = new CRulesKeyHash("POISON_SAVE_BONUS_3"); + public static readonly CRulesKeyHash POISON_SAVE_BONUS_4 = new CRulesKeyHash("POISON_SAVE_BONUS_4"); + public static readonly CRulesKeyHash POISON_SAVE_BONUS_5 = new CRulesKeyHash("POISON_SAVE_BONUS_5"); + public static readonly CRulesKeyHash KI_CRITICAL_BONUS = new CRulesKeyHash("KI_CRITICAL_BONUS"); + public static readonly CRulesKeyHash BLINDSIGHT_RANGE_5_FEET = new CRulesKeyHash("BLINDSIGHT_RANGE_5_FEET"); + public static readonly CRulesKeyHash BLINDSIGHT_RANGE_10_FEET = new CRulesKeyHash("BLINDSIGHT_RANGE_10_FEET"); + public static readonly CRulesKeyHash BLINDSIGHT_RANGE_60_FEET = new CRulesKeyHash("BLINDSIGHT_RANGE_60_FEET"); + public static readonly CRulesKeyHash BARBARIAN_ENDURANCE_BONUS = new CRulesKeyHash("BARBARIAN_ENDURANCE_BONUS"); + public static readonly CRulesKeyHash COMPANION_LEVELS_STACK = new CRulesKeyHash("COMPANION_LEVELS_STACK"); + public static readonly CRulesKeyHash DEATH_ATTACK_BASE_SAVE_DC = new CRulesKeyHash("DEATH_ATTACK_BASE_SAVE_DC"); + public static readonly CRulesKeyHash QUICKENED_SPELL_MINIMUM_CONJURE_TIME = new CRulesKeyHash("QUICKENED_SPELL_MINIMUM_CONJURE_TIME"); + public static readonly CRulesKeyHash HASTED_SPELL_CONJURE_TIME_MODIFIER = new CRulesKeyHash("HASTED_SPELL_CONJURE_TIME_MODIFIER"); + public static readonly CRulesKeyHash FIX_EFFECTDAMAGEINCREASE_BYPASSING_DR_AND_DI = new CRulesKeyHash("FIX_EFFECTDAMAGEINCREASE_BYPASSING_DR_AND_DI"); + public static readonly CRulesKeyHash TWO_HANDED_WEAPON_STRENGTH_MODIFIER = new CRulesKeyHash("TWO_HANDED_WEAPON_STRENGTH_MODIFIER"); + public static readonly CRulesKeyHash OFFHAND_WEAPON_STRENGTH_MODIFIER = new CRulesKeyHash("OFFHAND_WEAPON_STRENGTH_MODIFIER"); + public static readonly CRulesKeyHash HASTE_MOVEMENT_SPEED_INCREASE_BONUS = new CRulesKeyHash("HASTE_MOVEMENT_SPEED_INCREASE_BONUS"); + public static readonly CRulesKeyHash HASTE_DODGE_AC_INCREASE_AMOUNT = new CRulesKeyHash("HASTE_DODGE_AC_INCREASE_AMOUNT"); + public static readonly CRulesKeyHash ALL_ASSOCIATES_RUN_SCRIPTS = new CRulesKeyHash("ALL_ASSOCIATES_RUN_SCRIPTS"); + public static readonly CRulesKeyHash MOVEMENT_SPEED_BONUS_DEFAULT_CAP = new CRulesKeyHash("MOVEMENT_SPEED_BONUS_DEFAULT_CAP"); + public static readonly CRulesKeyHash MOVEMENT_SPEED_BONUS_MONK_CAP = new CRulesKeyHash("MOVEMENT_SPEED_BONUS_MONK_CAP"); + public static readonly CRulesKeyHash MOVEMENT_SPEED_PENALTY_CAP = new CRulesKeyHash("MOVEMENT_SPEED_PENALTY_CAP"); + public static readonly CRulesKeyHash MOVEMENT_STAGE_PENALTY_DETECT_MODE = new CRulesKeyHash("MOVEMENT_STAGE_PENALTY_DETECT_MODE"); + public static readonly CRulesKeyHash MOVEMENT_STAGE_PENALTY_STEALTH_MODE = new CRulesKeyHash("MOVEMENT_STAGE_PENALTY_STEALTH_MODE"); + public static readonly CRulesKeyHash MOVEMENT_STAGE_PENALTY_ENCUMBRANCE_HEAVY = new CRulesKeyHash("MOVEMENT_STAGE_PENALTY_ENCUMBRANCE_HEAVY"); + public static readonly CRulesKeyHash MOVEMENT_STAGE_PENALTY_ENCUMBRANCE_OVERLOADED = new CRulesKeyHash("MOVEMENT_STAGE_PENALTY_ENCUMBRANCE_OVERLOADED"); + public static readonly CRulesKeyHash MAX_CHARGES_FOR_ITEM_COST = new CRulesKeyHash("MAX_CHARGES_FOR_ITEM_COST"); + public static readonly CRulesKeyHash TURN_RESISTANCE_AFFECTS_PCS = new CRulesKeyHash("TURN_RESISTANCE_AFFECTS_PCS"); + public static readonly CRulesKeyHash SKILL_SET_TRAP_DURATION = new CRulesKeyHash("SKILL_SET_TRAP_DURATION"); + public static readonly CRulesKeyHash SKILL_FLAG_TRAP_DURATION = new CRulesKeyHash("SKILL_FLAG_TRAP_DURATION"); + public static readonly CRulesKeyHash SKILL_DISABLE_TRAP_DURATION = new CRulesKeyHash("SKILL_DISABLE_TRAP_DURATION"); + public static readonly CRulesKeyHash SKILL_RECOVER_TRAP_DURATION = new CRulesKeyHash("SKILL_RECOVER_TRAP_DURATION"); + public static readonly CRulesKeyHash SKILL_EXAMINE_TRAP_DURATION = new CRulesKeyHash("SKILL_EXAMINE_TRAP_DURATION"); + public static readonly CRulesKeyHash SKILL_OPEN_LOCK_DURATION = new CRulesKeyHash("SKILL_OPEN_LOCK_DURATION"); + public static readonly CRulesKeyHash SKILL_LOCK_DURATION = new CRulesKeyHash("SKILL_LOCK_DURATION"); + public static readonly CRulesKeyHash SKILL_HIDE_IN_PLAIN_SIGHT_COOLDOWN = new CRulesKeyHash("SKILL_HIDE_IN_PLAIN_SIGHT_COOLDOWN"); + public static readonly CRulesKeyHash SKILL_TAUNT_COOLDOWN = new CRulesKeyHash("SKILL_TAUNT_COOLDOWN"); + public static readonly CRulesKeyHash SKILL_PICKPOCKET_COOLDOWN = new CRulesKeyHash("SKILL_PICKPOCKET_COOLDOWN"); + public static readonly CRulesKeyHash SKILL_ANIMAL_EMPATHY_COOLDOWN = new CRulesKeyHash("SKILL_ANIMAL_EMPATHY_COOLDOWN"); + public static readonly CRulesKeyHash WEAPON_FOCUS_BONUS = new CRulesKeyHash("WEAPON_FOCUS_BONUS"); + public static readonly CRulesKeyHash WEAPON_SPECIALIZATION_BONUS = new CRulesKeyHash("WEAPON_SPECIALIZATION_BONUS"); + public static readonly CRulesKeyHash EPIC_WEAPON_FOCUS_BONUS = new CRulesKeyHash("EPIC_WEAPON_FOCUS_BONUS"); + public static readonly CRulesKeyHash EPIC_WEAPON_SPECIALIZATION_BONUS = new CRulesKeyHash("EPIC_WEAPON_SPECIALIZATION_BONUS"); + public static readonly CRulesKeyHash POWER_ATTACK_TO_HIT_MODIFIER = new CRulesKeyHash("POWER_ATTACK_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash POWER_ATTACK_DAMAGE_MODIFIER = new CRulesKeyHash("POWER_ATTACK_DAMAGE_MODIFIER"); + public static readonly CRulesKeyHash IMPROVED_POWER_ATTACK_TO_HIT_MODIFIER = new CRulesKeyHash("IMPROVED_POWER_ATTACK_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash IMPROVED_POWER_ATTACK_DAMAGE_MODIFIER = new CRulesKeyHash("IMPROVED_POWER_ATTACK_DAMAGE_MODIFIER"); + public static readonly CRulesKeyHash RAPID_SHOT_TO_HIT_MODIFIER = new CRulesKeyHash("RAPID_SHOT_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash FLURRY_OF_BLOWS_TO_HIT_MODIFIER = new CRulesKeyHash("FLURRY_OF_BLOWS_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash EXPERTISE_TO_HIT_MODIFIER = new CRulesKeyHash("EXPERTISE_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash IMPROVED_EXPERTISE_TO_HIT_MODIFIER = new CRulesKeyHash("IMPROVED_EXPERTISE_TO_HIT_MODIFIER"); + public static readonly CRulesKeyHash EXPERTISE_AC_BONUS = new CRulesKeyHash("EXPERTISE_AC_BONUS"); + public static readonly CRulesKeyHash IMPROVED_EXPERTISE_AC_BONUS = new CRulesKeyHash("IMPROVED_EXPERTISE_AC_BONUS"); + public static readonly CRulesKeyHash LUCKY_SAVE_BONUS = new CRulesKeyHash("LUCKY_SAVE_BONUS"); + public static readonly CRulesKeyHash GREAT_FORTITUDE_SAVE_BONUS = new CRulesKeyHash("GREAT_FORTITUDE_SAVE_BONUS"); + public static readonly CRulesKeyHash IRON_WILL_SAVE_BONUS = new CRulesKeyHash("IRON_WILL_SAVE_BONUS"); + public static readonly CRulesKeyHash LIGHTNING_REFLEXES_SAVE_BONUS = new CRulesKeyHash("LIGHTNING_REFLEXES_SAVE_BONUS"); + public static readonly CRulesKeyHash FEAT_TOUGHNESS_HP_BONUS = new CRulesKeyHash("FEAT_TOUGHNESS_HP_BONUS"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_10 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_10"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_9 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_9"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_8 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_8"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_7 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_7"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_6 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_6"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_5 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_5"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_4 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_4"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_3 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_3"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_2 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_2"); + public static readonly CRulesKeyHash FEAT_EPIC_TOUGHNESS_HP_BONUS_1 = new CRulesKeyHash("FEAT_EPIC_TOUGHNESS_HP_BONUS_1"); + public static readonly CRulesKeyHash FEAT_DEATHLESS_VIGOR_HP_BONUS = new CRulesKeyHash("FEAT_DEATHLESS_VIGOR_HP_BONUS"); + public static readonly CRulesKeyHash FEAT_EPIC_DEATHLESS_VIGOR_HP_BONUS = new CRulesKeyHash("FEAT_EPIC_DEATHLESS_VIGOR_HP_BONUS"); + public static readonly CRulesKeyHash FEAT_DEFENSIVES_STANCE_STR_BONUS = new CRulesKeyHash("FEAT_DEFENSIVES_STANCE_STR_BONUS"); + public static readonly CRulesKeyHash FEAT_DEFENSIVES_STANCE_CON_BONUS = new CRulesKeyHash("FEAT_DEFENSIVES_STANCE_CON_BONUS"); + public static readonly CRulesKeyHash FEAT_DEFENSIVES_STANCE_SAVE_BONUS = new CRulesKeyHash("FEAT_DEFENSIVES_STANCE_SAVE_BONUS"); + public static readonly CRulesKeyHash FEAT_DEFENSIVES_STANCE_DODGE_BONUS = new CRulesKeyHash("FEAT_DEFENSIVES_STANCE_DODGE_BONUS"); + public static readonly CRulesKeyHash FEAT_DRAGON_HD6 = new CRulesKeyHash("FEAT_DRAGON_HD6"); + public static readonly CRulesKeyHash FEAT_DRAGON_HD8 = new CRulesKeyHash("FEAT_DRAGON_HD8"); + public static readonly CRulesKeyHash FEAT_DRAGON_HD10 = new CRulesKeyHash("FEAT_DRAGON_HD10"); + public static readonly CRulesKeyHash FEAT_DRAGON_HD12 = new CRulesKeyHash("FEAT_DRAGON_HD12"); + public static readonly CRulesKeyHash DIRTY_FIGHTING_BONUS_DICE = new CRulesKeyHash("DIRTY_FIGHTING_BONUS_DICE"); + public static readonly CRulesKeyHash MIN_LEVEL_FOR_MAX_HP = new CRulesKeyHash("MIN_LEVEL_FOR_MAX_HP"); + public static readonly CRulesKeyHash SPELL_METAMAGIC_EMPOWER_COST = new CRulesKeyHash("SPELL_METAMAGIC_EMPOWER_COST"); + public static readonly CRulesKeyHash SPELL_METAMAGIC_EXTEND_COST = new CRulesKeyHash("SPELL_METAMAGIC_EXTEND_COST"); + public static readonly CRulesKeyHash SPELL_METAMAGIC_MAXIMIZE_COST = new CRulesKeyHash("SPELL_METAMAGIC_MAXIMIZE_COST"); + public static readonly CRulesKeyHash SPELL_METAMAGIC_QUICKEN_COST = new CRulesKeyHash("SPELL_METAMAGIC_QUICKEN_COST"); + public static readonly CRulesKeyHash SPELL_METAMAGIC_SILENT_COST = new CRulesKeyHash("SPELL_METAMAGIC_SILENT_COST"); + public static readonly CRulesKeyHash SPELL_METAMAGIC_STILL_COST = new CRulesKeyHash("SPELL_METAMAGIC_STILL_COST"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ONE_THRESHHOLD = new CRulesKeyHash("MONK_DAMAGE_TIER_ONE_THRESHHOLD"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_TWO_THRESHHOLD = new CRulesKeyHash("MONK_DAMAGE_TIER_TWO_THRESHHOLD"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_THREE_THRESHHOLD = new CRulesKeyHash("MONK_DAMAGE_TIER_THREE_THRESHHOLD"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_FOUR_THRESHHOLD = new CRulesKeyHash("MONK_DAMAGE_TIER_FOUR_THRESHHOLD"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ZERO_SDAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_ZERO_SDAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ONE_SDAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_ONE_SDAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_TWO_SDAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_TWO_SDAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_THREE_SDAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_THREE_SDAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_FOUR_SDAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_FOUR_SDAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ZERO_SDAMAGE_DICE = new CRulesKeyHash("MONK_DAMAGE_TIER_ZERO_SDAMAGE_DICE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ONE_SDAMAGE_DICE = new CRulesKeyHash("MONK_DAMAGE_TIER_ONE_SDAMAGE_DICE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_TWO_SDAMAGE_DICE = new CRulesKeyHash("MONK_DAMAGE_TIER_TWO_SDAMAGE_DICE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_THREE_SDAMAGE_DICE = new CRulesKeyHash("MONK_DAMAGE_TIER_THREE_SDAMAGE_DICE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_FOUR_SDAMAGE_DICE = new CRulesKeyHash("MONK_DAMAGE_TIER_FOUR_SDAMAGE_DICE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ZERO_DAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_ZERO_DAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_ONE_DAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_ONE_DAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_TWO_DAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_TWO_DAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_THREE_DAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_THREE_DAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_FOUR_DAMAGE_DIE = new CRulesKeyHash("MONK_DAMAGE_TIER_FOUR_DAMAGE_DIE"); + public static readonly CRulesKeyHash MONK_DAMAGE_TIER_DICE = new CRulesKeyHash("MONK_DAMAGE_TIER_DICE"); + public static readonly CRulesKeyHash UNARMED_SDAMAGE_DIE = new CRulesKeyHash("UNARMED_SDAMAGE_DIE"); + public static readonly CRulesKeyHash UNARMED_DAMAGE_DIE = new CRulesKeyHash("UNARMED_DAMAGE_DIE"); + public static readonly CRulesKeyHash UNARMED_DAMAGE_DICE = new CRulesKeyHash("UNARMED_DAMAGE_DICE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_ONE_DICE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_ONE_DICE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_TWO_DICE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_TWO_DICE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_ONE_THRESHHOLD = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_ONE_THRESHHOLD"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_TWO_THRESHHOLD = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_TWO_THRESHHOLD"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_THREE_THRESHHOLD = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_THREE_THRESHHOLD"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_ZERO_DAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_ZERO_DAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_ONE_DAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_ONE_DAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_TWO_DAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_TWO_DAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_THREE_DAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_THREE_DAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_ZERO_SDAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_ZERO_SDAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_ONE_SDAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_ONE_SDAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_TWO_SDAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_TWO_SDAMAGE_DIE"); + public static readonly CRulesKeyHash SHOU_DISCIPLE_DAMAGE_TIER_THREE_SDAMAGE_DIE = new CRulesKeyHash("SHOU_DISCIPLE_DAMAGE_TIER_THREE_SDAMAGE_DIE"); + public static readonly CRulesKeyHash MULTIPLE_ATTACKS_BAB_PENALTY_MULTIPLIER = new CRulesKeyHash("MULTIPLE_ATTACKS_BAB_PENALTY_MULTIPLIER"); + public static readonly CRulesKeyHash MULTIPLE_ATTACKS_BAB_PENALTY_MULTIPLIER_MONK = new CRulesKeyHash("MULTIPLE_ATTACKS_BAB_PENALTY_MULTIPLIER_MONK"); + public static readonly CRulesKeyHash CHARGEN_ENABLED_PHENOTYPES = new CRulesKeyHash("CHARGEN_ENABLED_PHENOTYPES"); + public static readonly CRulesKeyHash CHARGEN_ABILITY_COST_INCREMENT2 = new CRulesKeyHash("CHARGEN_ABILITY_COST_INCREMENT2"); + public static readonly CRulesKeyHash CHARGEN_ABILITY_COST_INCREMENT3 = new CRulesKeyHash("CHARGEN_ABILITY_COST_INCREMENT3"); + public static readonly CRulesKeyHash CHARGEN_ABILITY_COST_INCREMENT4 = new CRulesKeyHash("CHARGEN_ABILITY_COST_INCREMENT4"); + public static readonly CRulesKeyHash CHARGEN_BASE_ABILITY_MIN = new CRulesKeyHash("CHARGEN_BASE_ABILITY_MIN"); + public static readonly CRulesKeyHash CHARGEN_BASE_ABILITY_MIN_PRIMARY = new CRulesKeyHash("CHARGEN_BASE_ABILITY_MIN_PRIMARY"); + public static readonly CRulesKeyHash CHARGEN_BASE_ABILITY_MAX = new CRulesKeyHash("CHARGEN_BASE_ABILITY_MAX"); + public static readonly CRulesKeyHash CHARGEN_ABILITY_NEUTRAL_VALUE = new CRulesKeyHash("CHARGEN_ABILITY_NEUTRAL_VALUE"); + public static readonly CRulesKeyHash CHARGEN_ABILITY_MODIFIER_INCREMENT = new CRulesKeyHash("CHARGEN_ABILITY_MODIFIER_INCREMENT"); + public static readonly CRulesKeyHash CHARGEN_SKILL_MAX_LEVEL_1_BONUS = new CRulesKeyHash("CHARGEN_SKILL_MAX_LEVEL_1_BONUS"); + public static readonly CRulesKeyHash CHARGEN_ALLOW_CUSTOM_PORTRAITS = new CRulesKeyHash("CHARGEN_ALLOW_CUSTOM_PORTRAITS"); + public static readonly CRulesKeyHash CHARGEN_ENABLE_RECOMMENDED_BUTTON = new CRulesKeyHash("CHARGEN_ENABLE_RECOMMENDED_BUTTON"); + public static readonly CRulesKeyHash MULTICLASS_LIMIT = new CRulesKeyHash("MULTICLASS_LIMIT"); + public static readonly CRulesKeyHash ALL_ASSOCIATES_CAN_INTERACT = new CRulesKeyHash("ALL_ASSOCIATES_CAN_INTERACT"); + } +} diff --git a/NWN.Anvil/src/main/API/TwoDimArray/Tables/NwGameTables.Factory.cs b/NWN.Anvil/src/main/API/TwoDimArray/Tables/NwGameTables.Factory.cs index 4cde9bdb2..5c44db631 100644 --- a/NWN.Anvil/src/main/API/TwoDimArray/Tables/NwGameTables.Factory.cs +++ b/NWN.Anvil/src/main/API/TwoDimArray/Tables/NwGameTables.Factory.cs @@ -114,40 +114,40 @@ private void LoadTables() TwoDimArrayCache.Clear(); CTwoDimArrays arrays = NWNXLib.Rules().m_p2DArrays; - AppearanceTable = GetTable(arrays.m_pAppearanceTable); - ArmorTable = GetTable(arrays.m_pArmorTable); - BodyBagTable = GetTable(arrays.m_pBodyBagTable); + AppearanceTable = GetTable(arrays.GetAppearanceTable()); + ArmorTable = GetTable(arrays.GetArmorTable()); + BodyBagTable = GetTable(arrays.GetBodyBagTable()); EffectIconTable = GetTable("effecticons.2da")!; EnvironmentPresetTable = GetTable("environment.2da")!; - LightColorTable = GetTable(arrays.m_pLightColorTable); + LightColorTable = GetTable(arrays.GetLightColorTable()); LoadScreenTable = GetTable("loadscreens.2da")!; ItemPropertyCostTables = GetTable("iprp_costtable.2da")!; ItemPropertyParamTables = GetTable("iprp_paramtable.2da")!; - ItemPropertyItemMapTable = GetTable(arrays.m_pItemPropsTable); - ItemPropertyTable = GetTable(arrays.m_pItemPropDefTable); - PartsBeltTable = GetTable(arrays.m_pPartsBelt); - PartsBicepTable = GetTable(arrays.m_pPartsBicep); - PartsChestTable = GetTable(arrays.m_pPartsChest); - PartsFootTable = GetTable(arrays.m_pPartsFoot); - PartsForearmTable = GetTable(arrays.m_pPartsForearm); - PartsHandTable = GetTable(arrays.m_pPartsHand); - PartsLegTable = GetTable(arrays.m_pPartsLegs); - PartsNeckTable = GetTable(arrays.m_pPartsNeck); - PartsPelvisTable = GetTable(arrays.m_pPartsPelvis); - PartsRobeTable = GetTable(arrays.m_pPartsRobe); - PartsShinTable = GetTable(arrays.m_pPartsShin); - PartsShoulderTable = GetTable(arrays.m_pPartsShoulder); + ItemPropertyItemMapTable = GetTable(arrays.GetItemPropsTable()); + ItemPropertyTable = GetTable(arrays.GetItemPropDefTable()); + PartsBeltTable = GetTable(arrays.GetPartsBelt()); + PartsBicepTable = GetTable(arrays.GetPartsBicep()); + PartsChestTable = GetTable(arrays.GetPartsChest()); + PartsFootTable = GetTable(arrays.GetPartsFoot()); + PartsForearmTable = GetTable(arrays.GetPartsForearm()); + PartsHandTable = GetTable(arrays.GetPartsHand()); + PartsLegTable = GetTable(arrays.GetPartsLegs()); + PartsNeckTable = GetTable(arrays.GetPartsNeck()); + PartsPelvisTable = GetTable(arrays.GetPartsPelvis()); + PartsRobeTable = GetTable(arrays.GetPartsRobe()); + PartsShinTable = GetTable(arrays.GetPartsShin()); + PartsShoulderTable = GetTable(arrays.GetPartsShoulder()); PlaceableSoundTable = GetTable("placeableobjsnds.2da")!; // arrays.m_pPlaceableSoundsTable does not exist in nwserver. - PlaceableTable = GetTable(arrays.m_pPlaceablesTable); + PlaceableTable = GetTable(arrays.GetPlaceablesTable()); PlaceableTypeTable = GetTable("placeabletypes.2da")!; - PolymorphTable = GetTable(arrays.m_pPolymorphTable); - PortraitTable = GetTable(arrays.m_pPortraitTable); - VisualEffectTable = GetTable(arrays.m_pVisualEffectTable); + PolymorphTable = GetTable(arrays.GetPolymorphTable()); + PortraitTable = GetTable(arrays.GetPortraitTable()); + VisualEffectTable = GetTable(arrays.GetVisualEffectTable()); ProgrammedEffectTable = GetTable("progfx.2da")!; // arrays.m_pProgFxTable does not exist in nwserver. - PersistentEffectTable = GetTable(arrays.m_pPersistentVisualEffectTable); // arrays.m_pProgFxTable does not exist in nwserver. + PersistentEffectTable = GetTable(arrays.GetPersistentVisualEffectTable()); // arrays.m_pProgFxTable does not exist in nwserver. DamageLevelTable = GetTable("damagelevels.2da")!; // arrays.m_pDamageLevelTable does not exist in nwserver. ExpTable = GetTable("exptable.2da")!; - SkillItemCostTable = GetTable(arrays.m_pSkillVsItemCostTable); + SkillItemCostTable = GetTable(arrays.GetSkillVsItemCostTable()); } private void OnReloadAll(void* pRules) diff --git a/NWN.Anvil/src/main/API/Utils/VirtualMachine.cs b/NWN.Anvil/src/main/API/Utils/VirtualMachine.cs index 664d437ac..975446b91 100644 --- a/NWN.Anvil/src/main/API/Utils/VirtualMachine.cs +++ b/NWN.Anvil/src/main/API/Utils/VirtualMachine.cs @@ -181,7 +181,7 @@ internal IEnumerable GetCurrentContextScriptParams() private int PopScriptContext() { - CNWVirtualMachineCommands cmd = CNWVirtualMachineCommands.FromPointer(virtualMachine.m_pCmdImplementer.Pointer); + CNWSVirtualMachineCommands cmd = CNWSVirtualMachineCommands.FromPointer(virtualMachine.m_pCmdImplementer.Pointer); if (--virtualMachine.m_nRecursionLevel != -1) { @@ -194,7 +194,7 @@ private int PopScriptContext() private int PushScriptContext(uint oid, int scriptEventId) { - CNWVirtualMachineCommands cmd = CNWVirtualMachineCommands.FromPointer(virtualMachine.m_pCmdImplementer.Pointer); + CNWSVirtualMachineCommands cmd = CNWSVirtualMachineCommands.FromPointer(virtualMachine.m_pCmdImplementer.Pointer); bool valid = LowLevel.ServerExoApp.GetGameObject(oid) != null; if (virtualMachine.m_nRecursionLevel++ == -1) diff --git a/NWN.Anvil/src/main/Native/Functions/Functions.CNWSCreatureStats.cs b/NWN.Anvil/src/main/Native/Functions/Functions.CNWSCreatureStats.cs index 0da9d1628..31dff59fc 100644 --- a/NWN.Anvil/src/main/Native/Functions/Functions.CNWSCreatureStats.cs +++ b/NWN.Anvil/src/main/Native/Functions/Functions.CNWSCreatureStats.cs @@ -70,8 +70,8 @@ public static class CNWSCreatureStats [NativeFunction("_ZN17CNWSCreatureStats7LevelUpEP13CNWLevelStatshhhi", "?LevelUp@CNWSCreatureStats@@QEAAXPEAVCNWLevelStats@@EEEH@Z")] public delegate void LevelUp(void* pCreatureStats, void* pLevelUpStats, byte nDomain1, byte nDomain2, byte nSchool, int bAddStatsToList); - [NativeFunction("_ZN17CNWSCreatureStats16LevelUpAutomaticEhih", "?LevelUpAutomatic@CNWSCreatureStats@@QEAAHEHE@Z")] - public delegate void LevelUpAutomatic(void* pCreatureStats, byte nClass, int bReadyAllSpells, byte nPackage); + [NativeFunction("_ZN17CNWSCreatureStats16LevelUpAutomaticEhij", "?LevelUpAutomatic@CNWSCreatureStats@@QEAAHEHI@Z")] + public delegate void LevelUpAutomatic(void* pCreatureStats, byte nClass, int bReadyAllSpells, uint nPackage); [NativeFunction("_ZN17CNWSCreatureStats21SetMemorizedSpellSlotEhhjhhi", "?SetMemorizedSpellSlot@CNWSCreatureStats@@QEAAHEEIEEH@Z")] public delegate int SetMemorizedSpellSlot(void* pCreatureStats, byte nMultiClass, byte nSpellSlot, diff --git a/NWN.Anvil/src/main/Services/API/Creature/InitiativeModifierService.cs b/NWN.Anvil/src/main/Services/API/Creature/InitiativeModifierService.cs index 0f1c38bdc..7470bf3ca 100644 --- a/NWN.Anvil/src/main/Services/API/Creature/InitiativeModifierService.cs +++ b/NWN.Anvil/src/main/Services/API/Creature/InitiativeModifierService.cs @@ -78,22 +78,22 @@ private void OnResolveInitiative(void* pCreature) int mod = pStats.GetDEXMod(0); if (pStats.HasFeat((ushort)Feat.EpicSuperiorInitiative).ToBool()) { - mod += rules.GetRulesetIntEntry("EPIC_SUPERIOR_INITIATIVE_BONUS".ToExoString(), 8); + mod += rules.GetRulesetIntEntry(RulesetKeys.EPIC_SUPERIOR_INITIATIVE_BONUS, 8); } else if (pStats.HasFeat((ushort)Feat.ImprovedInitiative).ToBool()) { - mod += rules.GetRulesetIntEntry("IMPROVED_INITIATIVE_BONUS".ToExoString(), 4); + mod += rules.GetRulesetIntEntry(RulesetKeys.IMPROVED_INITIATIVE_BONUS, 4); } if (pStats.HasFeat((ushort)Feat.Blooded).ToBool()) { - mod += rules.GetRulesetIntEntry("BLOODED_INITIATIVE_BONUS".ToExoString(), 2); + mod += rules.GetRulesetIntEntry(RulesetKeys.BLOODED_INITIATIVE_BONUS, 2); } if (pStats.HasFeat((ushort)Feat.Thug).ToBool()) { - mod += rules.GetRulesetIntEntry("THUG_INITIATIVE_BONUS".ToExoString(), 2); + mod += rules.GetRulesetIntEntry(RulesetKeys.THUG_INITIATIVE_BONUS, 2); } // Add creature bonus diff --git a/NWN.Anvil/src/main/Services/API/Player/PlayerNameOverrideService.cs b/NWN.Anvil/src/main/Services/API/Player/PlayerNameOverrideService.cs index 907d429a5..ec16f100f 100644 --- a/NWN.Anvil/src/main/Services/API/Player/PlayerNameOverrideService.cs +++ b/NWN.Anvil/src/main/Services/API/Player/PlayerNameOverrideService.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using Anvil.API; using Anvil.API.Events; using Anvil.Internal; @@ -257,22 +258,7 @@ private bool IsCreatureInLastUpdateObjectList(NwPlayer observer, NwPlayer target return true; } - CExoLinkedListInternal partyObjectsList = nwPlayer.m_pActivePartyObjectsLastUpdate.m_pcExoLinkedListInternal; - if (partyObjectsList == null) - { - return false; - } - - for (CExoLinkedListNode head = partyObjectsList.pHead; head != null; head = head.pNext) - { - CLastUpdatePartyObject partyMember = CLastUpdatePartyObject.FromPointer(head.pObject); - if (partyMember != null && partyMember.m_nPlayerId == target.ControlledCreature?.ObjectId) - { - return true; - } - } - - return false; + return nwPlayer.m_lstActivePartyObjectsLastUpdate.Any(partyObject => partyObject.m_nPlayerId == target.ControlledCreature?.ObjectId); } private bool IsValidCreature(CNWSCreature? creature) diff --git a/NWN.Anvil/src/main/Services/API/Player/PlayerRestDurationOverrideService.cs b/NWN.Anvil/src/main/Services/API/Player/PlayerRestDurationOverrideService.cs index 86e37ad91..98cfda8d1 100644 --- a/NWN.Anvil/src/main/Services/API/Player/PlayerRestDurationOverrideService.cs +++ b/NWN.Anvil/src/main/Services/API/Player/PlayerRestDurationOverrideService.cs @@ -49,7 +49,7 @@ private uint OnAIActionRest(void* pCreature, void* pNode) byte creatureLevel = creature.m_pStats.GetLevel(0); int originalValue; - C2DA durationTable = NWNXLib.Rules().m_p2DArrays.m_pRestDurationTable; + C2DA durationTable = NWNXLib.Rules().m_p2DArrays.GetRestDurationTable(); durationTable.GetINTEntry(creatureLevel, DurationTableKey, &originalValue); durationTable.SetINTEntry(creatureLevel, DurationTableKey, durationOverride); diff --git a/NWN.Anvil/src/main/Services/ELC/EnforceLegalCharacterService.cs b/NWN.Anvil/src/main/Services/ELC/EnforceLegalCharacterService.cs index f0d3cdab0..f9a0d3385 100644 --- a/NWN.Anvil/src/main/Services/ELC/EnforceLegalCharacterService.cs +++ b/NWN.Anvil/src/main/Services/ELC/EnforceLegalCharacterService.cs @@ -84,12 +84,12 @@ public EnforceLegalCharacterService(VirtualMachine virtualMachine, HookService h skills = CNWSkillArray.FromPointer(pRules.m_lstSkills); feats = CNWFeatArray.FromPointer(pRules.m_lstFeats); - epicGreatStatBonus = pRules.GetRulesetIntEntry("CRULES_EPIC_GREAT_STAT_BONUS".ToExoString(), 1); - charGenBaseAbilityMin = pRules.GetRulesetIntEntry("CHARGEN_BASE_ABILITY_MIN".ToExoString(), 8); - charGenBaseAbilityMax = pRules.GetRulesetIntEntry("CHARGEN_BASE_ABILITY_MAX".ToExoString(), 18); - abilityCostIncrement2 = pRules.GetRulesetIntEntry("CHARGEN_ABILITY_COST_INCREMENT2".ToExoString(), 14); - abilityCostIncrement3 = pRules.GetRulesetIntEntry("CHARGEN_ABILITY_COST_INCREMENT3".ToExoString(), 16); - skillMaxLevel1Bonus = pRules.GetRulesetIntEntry("CHARGEN_SKILL_MAX_LEVEL_1_BONUS".ToExoString(), 3); + epicGreatStatBonus = pRules.GetRulesetIntEntry(RulesetKeys.EPIC_GREAT_STAT_BONUS, 1); + charGenBaseAbilityMin = pRules.GetRulesetIntEntry(RulesetKeys.CHARGEN_BASE_ABILITY_MIN, 8); + charGenBaseAbilityMax = pRules.GetRulesetIntEntry(RulesetKeys.CHARGEN_BASE_ABILITY_MAX, 18); + abilityCostIncrement2 = pRules.GetRulesetIntEntry(RulesetKeys.CHARGEN_ABILITY_COST_INCREMENT2, 14); + abilityCostIncrement3 = pRules.GetRulesetIntEntry(RulesetKeys.CHARGEN_ABILITY_COST_INCREMENT3, 16); + skillMaxLevel1Bonus = pRules.GetRulesetIntEntry(RulesetKeys.CHARGEN_SKILL_MAX_LEVEL_1_BONUS, 3); } public event Action? OnCustomCheck; @@ -325,7 +325,7 @@ private int OnValidateCharacter(void* player, int* bFailedServerRestriction) } // ********************************************************************************************************************** - if (pCreatureStats.m_nNumMultiClasses > Math.Clamp(NWNXLib.Rules().GetRulesetIntEntry("MULTICLASS_LIMIT".ToExoString(), 3), 1, 8)) + if (pCreatureStats.m_nNumMultiClasses > Math.Clamp(NWNXLib.Rules().GetRulesetIntEntry(RulesetKeys.MULTICLASS_LIMIT, 3), 1, 8)) { if (HandleValidationFailure(out int strRefFailure, new OnELCValidationFailure { @@ -1764,7 +1764,7 @@ int GetSkillPointAbilityAdjust() if (nSchool != 0) { int nOppositionSchool; - if (pRules.m_p2DArrays.m_pSpellSchoolTable.GetINTEntry(nSchool, "Opposition".ToExoString(), &nOppositionSchool).ToBool()) + if (pRules.m_p2DArrays.GetSpellSchoolTable().GetINTEntry(nSchool, "Opposition".ToExoString(), &nOppositionSchool).ToBool()) { if (pSpell.m_nSchool == nOppositionSchool) { diff --git a/NWN.Anvil/src/main/Services/Resources/ResourceManager.cs b/NWN.Anvil/src/main/Services/Resources/ResourceManager.cs index 17bae5b0f..1a0bbbbbe 100644 --- a/NWN.Anvil/src/main/Services/Resources/ResourceManager.cs +++ b/NWN.Anvil/src/main/Services/Resources/ResourceManager.cs @@ -6,6 +6,7 @@ using System.Runtime.InteropServices; using Anvil.API; using NLog; +using NWN.Core; using NWN.Native.API; using ResRefType = Anvil.API.ResRefType; @@ -122,20 +123,9 @@ public IEnumerable FindResourcesOfType(ResRefType type, bool moduleOnly /// /// The name of the script to get the contents of. /// The script file contents or "" on error. - public string? GetNSSContents(CExoString scriptName) + public string GetNSSContents(string scriptName) { - CScriptSourceFile scriptSourceFile = new CScriptSourceFile(); - byte* data; - uint size = 0; - - if (scriptSourceFile.LoadScript(scriptName, &data, &size) == 0) - { - string retVal = StringHelper.ReadFixedLengthString(data, (int)size); - scriptSourceFile.UnloadScript(); - return retVal; - } - - return null; + return NWScript.ResManGetFileContents(scriptName, NWScript.RESTYPE_NSS); } /// @@ -149,8 +139,8 @@ public IEnumerable FindResourcesOfType(ResRefType type, bool moduleOnly switch (type) { case ResRefType.NSS: - string? source = GetNSSContents(name.ToExoString()); - return source != null ? StringHelper.Encoding.GetBytes(source) : null; + string source = GetNSSContents(name); + return StringHelper.Encoding.GetBytes(source); case ResRefType.NCS: return null; default: @@ -169,7 +159,7 @@ public IEnumerable FindResourcesOfType(ResRefType type, bool moduleOnly switch (type) { case ResRefType.NSS: - return GetNSSContents(name.ToExoString()); + return GetNSSContents(name); case ResRefType.NCS: return null; default: diff --git a/NWN.Anvil/src/main/Services/Weapon/WeaponService.cs b/NWN.Anvil/src/main/Services/Weapon/WeaponService.cs index 414435916..556255b3e 100644 --- a/NWN.Anvil/src/main/Services/Weapon/WeaponService.cs +++ b/NWN.Anvil/src/main/Services/Weapon/WeaponService.cs @@ -491,7 +491,7 @@ private int OnGetAttackModifierVersus(void* pStats, void* pCreature) if (EnableSlingGoodAimFeat && baseItem == (uint)BaseItem.Sling && stats.m_nRace != (ushort)RacialType.Halfling && stats.HasFeat((ushort)Feat.GoodAim).ToBool()) { - int goodAimModifier = NWNXLib.Rules().GetRulesetIntEntry("GOOD_AIM_MODIFIER".ToExoString(), 1); + int goodAimModifier = NWNXLib.Rules().GetRulesetIntEntry(RulesetKeys.GOOD_AIM_MODIFIER, 1); attackMod += goodAimModifier; if ((*NWNXLib.EnableCombatDebugging()).ToBool() && stats.m_bIsPC.ToBool())