Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 // 装備変更のタイミングで装備品リストを更新(追加)
 static void Postfix(OcPlEquipCtrl __instance, OcEquipSlot __state)
 {
     EquipAdjustPos_OcPlEquipCtrl_lateMove.GetPlEquips(__instance).Add(__instance.getEquip(__state));
 }
Ejemplo n.º 5
0
 static bool Prefix(OcPlEquipCtrl __instance, OcItem item, OcEquipSlot equipSlot, out OcEquipSlot __state)
 {
     __state = equipSlot;
     return(true);
 }