Example #1
0
        public static Vector3 Get(WeaponHash weaponHash, OffsetType offsetType)
        {
            var key   = GetKey(weaponHash, offsetType);
            var value = ResourceKvp.Get <string>(key);

            Debug.WriteLine($"[{ResourceName}][WeaponOffset]Get - key: {key} - value: {value}");
            return(string.IsNullOrEmpty(value) ? Vector3.Zero : JsonConvert.DeserializeObject <Vector3>(value));
        }
Example #2
0
        public static void Set(WeaponHash weaponHash, OffsetType offsetType, Vector3 vector3)
        {
            var key      = GetKey(weaponHash, offsetType);
            var rawValue = Polish(vector3, offsetType);
            var value    = JsonConvert.SerializeObject(Polish(vector3, offsetType));

            Debug.WriteLine($"[{ResourceName}][WeaponOffset]Set - key: {key} - value: {value} - rawValue: {rawValue}");
            ResourceKvp.Set(key, value);
        }