コード例 #1
0
 public static void getSaveFileRead(string file)
 {
     byte[] bytes = File.ReadAllBytes(file);
     bytes = Compression.gZipDecompress(bytes);
     bytes = Cryptations.RC4(bytes, Encoding.Default.GetBytes("Emrah.?Kaynar.?20657580"));
     Items.ItemList itemList = ((Items.ItemList)(new XmlSerializer()).DeSerializeWithCreateInstance(bytes));
     saveList.Add(itemList);
 }
コード例 #2
0
 public void UseItem(Items.ItemList ItemChoosen)
 {
     foreach (Items Itemz in ItemList)
     {
         if (ItemChoosen.ToString() == Itemz.Name)
         {
             Itemz.UseItem();
         }
     }
 }
コード例 #3
0
 public void AddItem(Items.ItemList item, int ItemAMT = 1, bool ShowMessage = true)
 {
     foreach (Items Itemz in ItemList)
     {
         if (item.ToString() == Itemz.Name)
         {
             Itemz.Amt += ItemAMT;
         }
     }
 }
コード例 #4
0
    public static void AddedOrChangeItemList(Items.ItemList itemList)
    {
        int itemint = -1;

        for (int i = 0; i < saveList.Count; i++)
        {
            Items.ItemList item = saveList[i];
            if (item.GroupName == itemList.GroupName)
            {
                itemint     = i;
                saveList[i] = itemList;
                return;
            }
        }
        if (itemint == -1)
        {
            saveList.Add(itemList);
        }
    }
コード例 #5
0
 public void OpenMessage(Items.ItemList message)
 {
     TimerStart = true;
     Message    = "Item Get: " + message.ToString();
     MenuFlag   = true;
 }