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); }
public void UseItem(Items.ItemList ItemChoosen) { foreach (Items Itemz in ItemList) { if (ItemChoosen.ToString() == Itemz.Name) { Itemz.UseItem(); } } }
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; } } }
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); } }
public void OpenMessage(Items.ItemList message) { TimerStart = true; Message = "Item Get: " + message.ToString(); MenuFlag = true; }