static void Postfix(ItemEntityWeapon __instance, bool forDollRoom, ref WeaponAnimationStyle __result) { if (__instance == null) { return; } if ((__instance.Blueprint.IsTwoHanded && !__instance.HoldInTwoHands) || //2h that is held as 1h ((__instance.Blueprint.IsTwoHanded || __instance.Blueprint.IsOneHandedWhichCanBeUsedWithTwoHands) && forDollRoom)) // make weapon look 1h in the doll room to see the shield if possible { var pair_slot = (__instance.HoldingSlot as HandSlot)?.PairSlot; if (!(pair_slot?.HasItem).GetValueOrDefault()) { return; } switch (__result) { case WeaponAnimationStyle.AxeTwoHanded: __result = WeaponAnimationStyle.SlashingOneHanded; break; case WeaponAnimationStyle.PiercingTwoHanded: __result = WeaponAnimationStyle.PiercingOneHanded; break; case WeaponAnimationStyle.SlashingTwoHanded: __result = WeaponAnimationStyle.SlashingOneHanded; break; default: break; } } }
static void Postfix(UnitViewHandsEquipment __instance, ref WeaponAnimationStyle __result) { if (__instance.ActiveMainHandWeaponStyle != WeaponAnimationStyle.Fist && __result == WeaponAnimationStyle.Fist) { __result = WeaponAnimationStyle.None; } }