static Vector3 GetOffset(OcEquipSlot equipSlot, string playername = null) { Vector3 offset; if (equipPositionOffsets.TryGetValue(equipSlot, out offset) && CachingEnabled) { return(offset); } offset = equipSlot2Key.TryGetValue(equipSlot, out var key) ? Settings.ReadVector3(playername, $"{key}Offset", Vector3.zero, false) : Vector3.zero; if (CachingEnabled) { equipPositionOffsets.Add(equipSlot, offset); } return(offset); }
static bool IsAdujstedToVrmModel(OcEquipSlot equipSlot) { bool result; if (equipPositionIsAdujstedToVrmModel.TryGetValue(equipSlot, out result) && CachingEnabled) { return(result); } result = equipSlot2Key.TryGetValue(equipSlot, out var key) ? Settings.ReadBool($"{key}FollowsModel", false, false) : false; if (CachingEnabled) { equipPositionIsAdujstedToVrmModel.Add(equipSlot, result); } return(result); }
static bool IsAdujstedToVrmModel(OcEquipSlot equipSlot, string playername) { var cache = CachingEnabled(playername); bool result; if (equipPositionIsAdujstedToVrmModel.TryGetValue(equipSlot, out result) && cache) { return(result); } result = equipSlot2Key.TryGetValue(equipSlot, out var key) ? Settings.ReadBool($"{key}FollowsModel", false, false) : false; if (cache) { equipPositionIsAdujstedToVrmModel.Add(equipSlot, result); } return(result); }
// 装備変更のタイミングで装備品リストを更新(追加) static void Postfix(OcPlEquipCtrl __instance, OcEquipSlot __state) { EquipAdjustPos_OcPlEquipCtrl_lateMove.GetPlEquips(__instance).Add(__instance.getEquip(__state)); }
static bool Prefix(OcPlEquipCtrl __instance, OcItem item, OcEquipSlot equipSlot, out OcEquipSlot __state) { __state = equipSlot; return(true); }