예제 #1
0
파일: Program.cs 프로젝트: Fusion86/Cirilla
        private static void ResetShoutout(SaveSlot saveslot, int index)
        {
            var defaultValue = MhwDefaultValues.GetDefaultShoutoutValue(saveslot.SaveSlotIndex);

            saveslot.Native.Shoutouts[index].Length = 0; // Might not be needed.
            saveslot.Native.Shoutouts[index].Value  = defaultValue;
        }
예제 #2
0
        public void Reset()
        {
            var defaultValue = MhwDefaultValues.GetDefaultShoutoutValue(saveSlot.SaveSlotIndex);

            saveSlot.Native.Shoutouts[index].Length = 0;
            saveSlot.Native.Shoutouts[index].Value  = defaultValue;
            UpdateValue();
        }
예제 #3
0
        private void UpdateValue()
        {
            var defaultValue = MhwDefaultValues.GetDefaultShoutoutValue(saveSlot.SaveSlotIndex);
            var value        = saveSlot.Native.Shoutouts[index].Value;

            if (value.SequenceEqual(defaultValue))
            {
                Value = "(default value)";
            }
            else
            {
                var len = saveSlot.Native.Shoutouts[index].Length;
                Value = Encoding.UTF8.GetString(value.Take(len).ToArray());
            }
        }
예제 #4
0
파일: Program.cs 프로젝트: Fusion86/Cirilla
        private static string ShoutoutToString(SaveSlot saveslot, int index)
        {
            var    defaultValue = MhwDefaultValues.GetDefaultShoutoutValue(saveslot.SaveSlotIndex);
            string str;

            if (saveslot.Native.Shoutouts[index].Value.SequenceEqual(defaultValue))
            {
                str = "(default value)";
            }
            else
            {
                str = Encoding.UTF8.GetString(saveslot.Native.Shoutouts[index].Value);
            }
            return($"{index + 1} - {str}");
        }