static void Prefix(ref ItemDrop.ItemData weapon, ref WeaponState __state) { if (!modEnabled.Value) { return; } CheckWeaponData(ref weapon); Dbgl($"pre damage {weapon.m_shared.m_damages.m_slash}"); __state = new WeaponState(weapon); weapon.m_shared.m_useDurabilityDrain *= globalUseDurabilityMultiplier.Value; weapon.m_shared.m_holdDurationMin *= globalHoldDurationMinMultiplier.Value; weapon.m_shared.m_holdStaminaDrain *= globalHoldStaminaDrainMultiplier.Value; weapon.m_shared.m_attackForce *= globalAttackForceMultiplier.Value; weapon.m_shared.m_backstabBonus *= globalBackstabBonusMultiplier.Value; weapon.m_shared.m_damages.m_damage *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_blunt *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_slash *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_pierce *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_chop *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_pickaxe *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_fire *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_frost *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_lightning *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_poison *= globalDamageMultiplier.Value; weapon.m_shared.m_damages.m_spirit *= globalDamageMultiplier.Value; Dbgl($"post damage {weapon.m_shared.m_damages.m_slash}"); }
static void Postfix(ref ItemDrop.ItemData weapon, WeaponState __state) { if (!modEnabled.Value) { return; } weapon.m_shared.m_useDurabilityDrain = __state.useDurabilityDrain; weapon.m_shared.m_holdDurationMin = __state.holdDurationMin; weapon.m_shared.m_holdStaminaDrain = __state.holdStaminaDrain; weapon.m_shared.m_attackForce = __state.attackForce; weapon.m_shared.m_backstabBonus = __state.backstabBonus; weapon.m_shared.m_damages.m_damage = __state.damage; weapon.m_shared.m_damages.m_blunt = __state.blunt; weapon.m_shared.m_damages.m_slash = __state.slash; weapon.m_shared.m_damages.m_pierce = __state.pierce; weapon.m_shared.m_damages.m_chop = __state.chop; weapon.m_shared.m_damages.m_pickaxe = __state.pickaxe; weapon.m_shared.m_damages.m_fire = __state.fire; weapon.m_shared.m_damages.m_frost = __state.frost; weapon.m_shared.m_damages.m_lightning = __state.lightning; weapon.m_shared.m_damages.m_poison = __state.poison; weapon.m_shared.m_damages.m_spirit = __state.spirit; }