Example #1
0
        private void GiveEverything(IReadOnlyList <string> items, bool value = true)
        {
            if (!value)
            {
                for (ushort i = 0; i < CLB_Items.Items.Count; i++)
                {
                    CLB_Items.SetItemChecked(i, false);
                }
                return;
            }

            var skip = GameLists.NoCheckReceived;

            for (ushort i = 1; i < CLB_Items.Items.Count; i++)
            {
                if (string.IsNullOrEmpty(items[i]))
                {
                    continue;
                }
                if (skip.Contains(i))
                {
                    continue;
                }
                CLB_Items.SetItemChecked(i, true);
            }
            System.Media.SystemSounds.Asterisk.Play();
        }
Example #2
0
 private void SetCollect()
 {
     var ofs = Player.Personal.Offsets.ItemCollectBit;
     var data = Player.Personal.Data;
     for (int i = 0; i < CLB_Items.Items.Count; i++)
         FlagUtil.SetFlag(data, ofs, i, CLB_Items.GetItemChecked(i));
 }
Example #3
0
 public void GiveAll(IReadOnlyList <ushort> indexes, bool value = true)
 {
     foreach (var item in indexes)
     {
         CLB_Items.SetItemChecked(item, value);
     }
     System.Media.SystemSounds.Asterisk.Play();
 }
Example #4
0
        private void B_Save_Click(object sender, EventArgs e)
        {
            var ofs  = Player.Personal.Offsets.ReceivedItems;
            var data = Player.Personal.Data;

            for (int i = 0; i < CLB_Items.Items.Count; i++)
            {
                FlagUtil.SetFlag(data, ofs, i, CLB_Items.GetItemChecked(i));
            }
            Close();
        }
Example #5
0
        private void B_GiveAll_Click(object sender, EventArgs e)
        {
            var  items = GameInfo.Strings.itemlist;
            bool value = ModifierKeys != Keys.Alt;

            for (int i = 0x50; i < CLB_Items.Items.Count; i++)
            {
                if (string.IsNullOrEmpty(items[i]))
                {
                    continue;
                }
                CLB_Items.SetItemChecked(i, value);
            }
            System.Media.SystemSounds.Asterisk.Play();
        }
Example #6
0
        private void GiveItem(ushort item, bool value = true)
        {
            CLB_Items.SetItemChecked(item, value);

            var remakeIndex = ItemRemakeUtil.GetRemakeIndex(item);
            if (!ItemRemakeInfoData.List.TryGetValue(remakeIndex, out var info))
                return;

            for (int i = 0; i < ItemRemakeInfo.BodyColorCountMax; i++)
            {
                if (!info.HasBodyColor(i))
                    continue;
                int rIndex = (remakeIndex * ItemRemakeInfo.BodyColorCountMax) + i;
                CLB_Remake.SetItemChecked(rIndex, value);
            }
        }
Example #7
0
 private void GiveEverything(IReadOnlyList <string> items, bool value = true)
 {
     for (int i = 1; i < CLB_Items.Items.Count; i++)
     {
         if (string.IsNullOrEmpty(items[i]))
         {
             continue;
         }
         if (i == Item.DIYRecipe)
         {
             continue;
         }
         CLB_Items.SetItemChecked(i, value);
     }
     System.Media.SystemSounds.Asterisk.Play();
 }