first commit
This commit is contained in:
80
PoEco.Net/JSON/Classes/Divination.cs
Normal file
80
PoEco.Net/JSON/Classes/Divination.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoEco.Net.JSON.Classes
|
||||
{
|
||||
internal class Divination
|
||||
{
|
||||
public class Sparkline
|
||||
{
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class LowConfidenceSparkline
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ExplicitModifier
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool? optional { get; set; }
|
||||
}
|
||||
|
||||
public class LineDivination
|
||||
{
|
||||
public int? id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string icon { get; set; }
|
||||
public int? mapTier { get; set; }
|
||||
public int? levelRequired { get; set; }
|
||||
public string baseType { get; set; }
|
||||
public int? stackSize { get; set; }
|
||||
public object variant { get; set; }
|
||||
public object prophecyText { get; set; }
|
||||
public object artFilename { get; set; }
|
||||
public int? links { get; set; }
|
||||
public int? itemClass { get; set; }
|
||||
public Sparkline sparkline { get; set; }
|
||||
public LowConfidenceSparkline lowConfidenceSparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ExplicitModifier> explicitModifiers { get; set; }
|
||||
public string flavourText { get; set; }
|
||||
public bool? corrupted { get; set; }
|
||||
public int? gemLevel { get; set; }
|
||||
public int? gemQuality { get; set; }
|
||||
public string itemType { get; set; }
|
||||
public double chaosValue { get; set; }
|
||||
public double exaltedValue { get; set; }
|
||||
public double divineValue { get; set; }
|
||||
public int count { get; set; }
|
||||
public string detailsId { get; set; }
|
||||
public object tradeInfo { get; set; }
|
||||
public object mapRegion { get; set; }
|
||||
public int? listingCount { get; set; }
|
||||
}
|
||||
|
||||
public class Translations
|
||||
{
|
||||
}
|
||||
|
||||
public class Language
|
||||
{
|
||||
public string name { get; set; }
|
||||
public Translations translations { get; set; }
|
||||
}
|
||||
|
||||
public class RootDivination
|
||||
{
|
||||
public List<LineDivination> lines { get; set; }
|
||||
public Language language { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
76
PoEco.Net/JSON/Currency.cs
Normal file
76
PoEco.Net/JSON/Currency.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json;
|
||||
using PoEco.Net.DB;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using static PoEco.Net.JSON.Stash;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace PoEco.Net.JSON
|
||||
{
|
||||
internal class Currency
|
||||
{
|
||||
public static MySqlConnection MxPoEDB()
|
||||
{
|
||||
MySqlConnection conn;
|
||||
string myConnectionString;
|
||||
|
||||
myConnectionString = $"server={JSON.Settings.GetdbHost()};port={JSON.Settings.GetdbPort()};uid={JSON.Settings.GetdbUser()};pwd={JSON.Settings.GetdbPass()};database={JSON.Settings.GetdbName()};";
|
||||
conn = new MySqlConnection();
|
||||
conn.ConnectionString = myConnectionString;
|
||||
return conn;
|
||||
}
|
||||
public static void GenCurrencyTab(string user, int tab, string columnname, string table)
|
||||
{
|
||||
int uid = DB.User.GetUserID(user);
|
||||
double chaosValue = 0;
|
||||
string curName = "";
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.tab.{tab}.json"));
|
||||
foreach (Stash.Item i in stash.items)
|
||||
{
|
||||
if (columnname == "divvalue")
|
||||
{
|
||||
//Console.WriteLine(MySqlHelper.EscapeString(i.typeLine)+" "+GetCurrencyValueByName(MySqlHelper.EscapeString(curName), table));
|
||||
MySqlConnection cond = MxPoEDB();
|
||||
string cmdTextd = $"INSERT INTO poeco_tab_div(uid, uiid, name, stack, cvalue) VALUES ('{uid}','{i.id}','{MySqlHelper.EscapeString(i.typeLine)}','{i.stackSize}','{GetCurrencyValueByName(MySqlHelper.EscapeString(curName), table)}')";
|
||||
MySqlCommand cmdd = new MySqlCommand(cmdTextd, cond);
|
||||
cond.Open();
|
||||
cmdd.ExecuteNonQuery();
|
||||
cond.Close();
|
||||
}
|
||||
curName = i.typeLine;
|
||||
chaosValue = chaosValue + (GetCurrencyValueByName(MySqlHelper.EscapeString(curName), table) * i.stackSize);
|
||||
}
|
||||
MySqlConnection con = MxPoEDB();
|
||||
string cmdText = $"UPDATE poeco_user SET {columnname} = '{chaosValue}' WHERE account = '{user}'";
|
||||
MySqlCommand cmd = new MySqlCommand(cmdText, con);
|
||||
con.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
con.Close();
|
||||
}
|
||||
public static double GetCurrencyValueByName(string name, string table)
|
||||
{
|
||||
using (var con = MxPoEDB())
|
||||
{
|
||||
string cmdText = $"SELECT * FROM {table} WHERE name = '{name}'";
|
||||
MySqlCommand cmd = new MySqlCommand(cmdText, con);
|
||||
con.Open();
|
||||
var row = cmd.ExecuteReader();
|
||||
if (name == "Chaos Orb")
|
||||
{
|
||||
return 1.0;
|
||||
} else
|
||||
{
|
||||
if (row.HasRows) { row.Read(); return Convert.ToDouble(row["vchaos"]); } else { return 0; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
49
PoEco.Net/JSON/Settings.cs
Normal file
49
PoEco.Net/JSON/Settings.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoEco.Net.JSON
|
||||
{
|
||||
internal class Settings
|
||||
{
|
||||
public class SETTINGS
|
||||
{
|
||||
public string dbHost { get; set; }
|
||||
public string dbPort { get; set; }
|
||||
public string dbName { get; set; }
|
||||
public string dbUser { get; set; }
|
||||
public string dbPass { get; set; }
|
||||
public string league { get; set; }
|
||||
public bool web { get; set; }
|
||||
public string webpath { get; set; }
|
||||
}
|
||||
|
||||
public static string GetdbHost() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).dbHost;
|
||||
public static string GetdbPort() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).dbPort;
|
||||
public static string GetdbName() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).dbName;
|
||||
public static string GetdbUser() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).dbUser;
|
||||
public static string GetdbPass() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).dbPass;
|
||||
public static string GetLeague() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).league;
|
||||
public static bool GetWeb() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).web;
|
||||
public static string GetWebPath() => JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/settings.json")).webpath;
|
||||
|
||||
public static void WriteSection(string section)
|
||||
{
|
||||
SETTINGS settings = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("data/gui.settings.json"));
|
||||
File.WriteAllText("data/gui.settings.json", JsonConvert.SerializeObject((object)new SETTINGS()
|
||||
{
|
||||
dbHost = settings.dbHost,
|
||||
dbPort = settings.dbPort,
|
||||
dbName = settings.dbName,
|
||||
dbUser = settings.dbUser,
|
||||
dbPass = settings.dbPass,
|
||||
league = settings.league
|
||||
}, Formatting.Indented));
|
||||
}
|
||||
}
|
||||
}
|
||||
476
PoEco.Net/JSON/Stash.cs
Normal file
476
PoEco.Net/JSON/Stash.cs
Normal file
@@ -0,0 +1,476 @@
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlX.XDevAPI.Relational;
|
||||
using Newtonsoft.Json;
|
||||
using PoEco.Net.DB;
|
||||
using PoEco.Net.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoEco.Net.JSON
|
||||
{
|
||||
internal class Stash
|
||||
{
|
||||
public static void GenStashHash(string user)
|
||||
{
|
||||
List<string> itemsID = new List<string>();
|
||||
StringBuilder stashHash = new StringBuilder();
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.json"));
|
||||
foreach (var i in stash.items)
|
||||
{
|
||||
itemsID.Add(i.id);
|
||||
}
|
||||
stashHash.Append(string.Join(":", itemsID));
|
||||
string sb64 = Convert.ToBase64String(Encoding.ASCII.GetBytes(stashHash.ToString()));
|
||||
DB.User.SetUserStashHash(user, sb64);
|
||||
}
|
||||
public static string GetStashHash(string user)
|
||||
{
|
||||
List<string> itemsID = new List<string>();
|
||||
StringBuilder stashHash = new StringBuilder();
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.json"));
|
||||
foreach (var i in stash.items)
|
||||
{
|
||||
itemsID.Add(i.id);
|
||||
}
|
||||
stashHash.Append(string.Join(":", itemsID));
|
||||
string sb64 = Convert.ToBase64String(Encoding.ASCII.GetBytes(stashHash.ToString()));
|
||||
return sb64;
|
||||
}
|
||||
public static int GetUserItemCount(string user, int tid)
|
||||
{
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.rare.{tid}.json"));
|
||||
return stash.items.Count;
|
||||
}
|
||||
public static int GetUserProfitCount(string user, int tid)
|
||||
{
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.profit.{tid}.json"));
|
||||
return stash.items.Count;
|
||||
}
|
||||
public static void UpdateUserTabRGB(string user, int tabindex)
|
||||
{
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.json"));
|
||||
MySqlConnection con = DB.Stash.MxPoEDB();
|
||||
string cmdText = $"UPDATE poeco_user SET tabrgb = '{stash.tabs[tabindex].colour.r}:{stash.tabs[tabindex].colour.g}:{stash.tabs[tabindex].colour.b}' WHERE account = '{user}'";
|
||||
MySqlCommand cmd = new MySqlCommand(cmdText, con);
|
||||
con.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
con.Close();
|
||||
}
|
||||
public static void UpdateUserTabName(string user, int tabindex)
|
||||
{
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($"data/stash/{user}.tab{tabindex}.json"));
|
||||
MySqlConnection con = DB.Stash.MxPoEDB();
|
||||
string cmdText = $"UPDATE poeco_user SET tabname = '{stash.tabs[tabindex].n}' WHERE account = '{user}'";
|
||||
MySqlCommand cmd = new MySqlCommand(cmdText, con);
|
||||
con.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
con.Close();
|
||||
}
|
||||
public static void CleanDB(string user, int userid)
|
||||
{
|
||||
MySqlConnection con = DB.Stash.MxPoEDB();
|
||||
string cmdText = $"SELECT * FROM poeco_items WHERE uid = '{userid}'";
|
||||
MySqlCommand cmd = new MySqlCommand(cmdText, con);
|
||||
con.Open();
|
||||
MySqlDataReader mdata = cmd.ExecuteReader();
|
||||
while (mdata.Read())
|
||||
{
|
||||
//if (!CheckItemExistsStash(user, mdata.GetString(6)))
|
||||
//{
|
||||
// DB.Stash.DeleteSpecificItem(userid, mdata.GetString(6));
|
||||
//}
|
||||
}
|
||||
}
|
||||
public static bool CheckItemExistsStash(string user, int tid, string uuid)
|
||||
{
|
||||
bool exists = false;
|
||||
List<string> items = new List<string>();
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($"data/stash/{user}.rare.{tid}.json"));
|
||||
foreach (var s in stash.items)
|
||||
{
|
||||
items.Add(s.id);
|
||||
}
|
||||
if (items.Contains(uuid))
|
||||
{
|
||||
exists = true;
|
||||
}
|
||||
return exists;
|
||||
}
|
||||
public static void GenItemTable(string user)
|
||||
{
|
||||
List<string> stringItemTxt = new List<string>();
|
||||
List<string> stringItemMod = new List<string>();
|
||||
StashRoot stash = JsonConvert.DeserializeObject<StashRoot>(File.ReadAllText($@"data/stash/{user}.json"));
|
||||
int curitem = 1;
|
||||
double chaosValue = 0;
|
||||
int guid = 0;
|
||||
//DB.Stash.DeleteItems(DB.User.GetUserID(user));
|
||||
var tmpfiles = Directory.GetFiles("tmp");
|
||||
StringBuilder sCommand = new StringBuilder("INSERT INTO poeco_items(uid, tabindex, tabname, tabrgb, cid, bid, uiid, imod, var, img, txt, b64, ctype, min, max) VALUES ");
|
||||
List<string> Rows = new List<string>();
|
||||
int itemcount = stash.items.Count();
|
||||
foreach ( var file in tmpfiles ) { File.Delete(file); }
|
||||
foreach (Item obj in stash.items)
|
||||
{
|
||||
if (!DB.Stash.CheckItemExistsDB(obj.id))
|
||||
{
|
||||
itemcount--;
|
||||
}
|
||||
if (obj.typeLine != "" && obj.frameType == 2 && obj.identified && !DB.Stash.CheckItemExistsDB(obj.id))
|
||||
{
|
||||
//Message.drawProgress(curitem, itemcount);
|
||||
int icid = DB.Stash.GetClassIDByBase(obj.typeLine);
|
||||
string itemclass = DB.Stash.GetClassByID(icid);
|
||||
stringItemTxt.Add($"Item Class: {char.ToUpper(itemclass[0]) + itemclass.Substring(1)}");
|
||||
stringItemTxt.Add("Rarity: Rare");
|
||||
stringItemTxt.Add(obj.name ?? "");
|
||||
stringItemTxt.Add(obj.typeLine ?? "");
|
||||
stringItemTxt.Add("--------");
|
||||
if (obj.properties != null && obj.properties.Count<Property>() > 0)
|
||||
{
|
||||
foreach (Property property in obj.properties)
|
||||
{
|
||||
if (property.name == "Quality")
|
||||
stringItemTxt.Add(string.Format("Quality: {0}", property.values[0][0]));
|
||||
if (property.name == "Armour")
|
||||
stringItemTxt.Add(string.Format("Armour: {0}", property.values[0][0]));
|
||||
if (property.name == "Energy Shield")
|
||||
stringItemTxt.Add(string.Format("Energy Shield: {0}", property.values[0][0]));
|
||||
if (property.name == "Evasion Rating")
|
||||
stringItemTxt.Add(string.Format("Evasion Rating: {0}", property.values[0][0]));
|
||||
if (property.values.Count<List<object>>() == 0)
|
||||
stringItemTxt.Add(property.name ?? "");
|
||||
if (property.name == "Physical Damage")
|
||||
stringItemTxt.Add(string.Format("Physical Damage: {0}", property.values[0][0]));
|
||||
if (property.name == "Elemental Damage")
|
||||
stringItemTxt.Add(string.Format("Elemental Damage: {0}", property.values[0][0]));
|
||||
if (property.name == "Critical Strike Chance")
|
||||
stringItemTxt.Add(string.Format("Critical Strike Chance: {0}", property.values[0][0]));
|
||||
if (property.name == "Attacks per Second")
|
||||
stringItemTxt.Add(string.Format("Attacks per Second: {0}", property.values[0][0]));
|
||||
if (property.name == "Weapon Range")
|
||||
stringItemTxt.Add(string.Format("Weapon Range: {0}", property.values[0][0]));
|
||||
}
|
||||
stringItemTxt.Add("--------");
|
||||
}
|
||||
stringItemTxt.Add("Requirements:");
|
||||
if (obj.requirements != null)
|
||||
{
|
||||
foreach (Requirement requirement in obj.requirements)
|
||||
{
|
||||
if (requirement.name == "Level")
|
||||
stringItemTxt.Add(string.Format("Level: {0}", requirement.values[0][0]));
|
||||
if (requirement.name == "Str")
|
||||
stringItemTxt.Add(string.Format("Str: {0}", requirement.values[0][0]));
|
||||
if (requirement.name == "Dex")
|
||||
stringItemTxt.Add(string.Format("Dex: {0}", requirement.values[0][0]));
|
||||
if (requirement.name == "Int")
|
||||
stringItemTxt.Add(string.Format("Int: {0}", requirement.values[0][0]));
|
||||
}
|
||||
}
|
||||
stringItemTxt.Add("--------");
|
||||
if (obj.sockets != null)
|
||||
{
|
||||
List<string> stringList2 = new List<string>();
|
||||
List<string> stringList3 = new List<string>();
|
||||
List<string> stringList4 = new List<string>();
|
||||
List<string> stringList5 = new List<string>();
|
||||
List<string> stringList6 = new List<string>();
|
||||
List<string> stringList7 = new List<string>();
|
||||
foreach (Socket socket in obj.sockets)
|
||||
{
|
||||
if (socket.group == 0)
|
||||
stringList2.Add(socket.sColour.ToString());
|
||||
if (socket.group == 1)
|
||||
stringList3.Add(socket.sColour.ToString());
|
||||
if (socket.group == 2)
|
||||
stringList4.Add(socket.sColour.ToString());
|
||||
if (socket.group == 3)
|
||||
stringList5.Add(socket.sColour.ToString());
|
||||
if (socket.group == 4)
|
||||
stringList6.Add(socket.sColour.ToString());
|
||||
if (socket.group == 5)
|
||||
stringList7.Add(socket.sColour.ToString());
|
||||
}
|
||||
string str1 = string.Join("-", (IEnumerable<string>)stringList2);
|
||||
string str2 = string.Join("-", (IEnumerable<string>)stringList3);
|
||||
string str3 = string.Join("-", (IEnumerable<string>)stringList4);
|
||||
string str4 = string.Join("-", (IEnumerable<string>)stringList5);
|
||||
string str5 = string.Join("-", (IEnumerable<string>)stringList6);
|
||||
string str6 = string.Join("-", (IEnumerable<string>)stringList7);
|
||||
stringItemTxt.Add("Sockets: " + str1 + " " + str2 + " " + str3 + " " + str4 + " " + str5 + " " + str6);
|
||||
}
|
||||
stringItemTxt.Add("--------");
|
||||
stringItemTxt.Add(string.Format("Item Level: {0}", (object)obj.ilvl));
|
||||
stringItemTxt.Add("--------");
|
||||
if (obj.implicitMods != null)
|
||||
{
|
||||
foreach (string implicitMod in obj.implicitMods)
|
||||
{
|
||||
stringItemTxt.Add(implicitMod ?? "");
|
||||
stringItemMod.Add(implicitMod + "/n");
|
||||
}
|
||||
stringItemTxt.Add("--------");
|
||||
stringItemMod.Add("--------/n");
|
||||
}
|
||||
if (obj.explicitMods != null)
|
||||
{
|
||||
foreach (string explicitMod in obj.explicitMods)
|
||||
{
|
||||
stringItemTxt.Add(explicitMod ?? "");
|
||||
stringItemMod.Add(explicitMod + "/n");
|
||||
}
|
||||
}
|
||||
|
||||
File.WriteAllLines("tmp/" + obj.id + ".txt", (IEnumerable<string>)stringItemTxt);
|
||||
File.WriteAllLines("tmp/" + obj.id + ".mod.txt", (IEnumerable<string>)stringItemMod);
|
||||
string ib64 = Convert.ToBase64String(File.ReadAllBytes("tmp/" + obj.id + ".txt"));
|
||||
Web.PoEPrices.GetItemJson(obj.id, ib64);
|
||||
int tabindex = DB.User.GetUserTabIndex(user);
|
||||
Rows.Add(
|
||||
$"(" +
|
||||
$"'{DB.User.GetUserID(user)}'," +
|
||||
$"'{stash.tabs[tabindex].i}'," +
|
||||
$"'{stash.tabs[tabindex].n}'," +
|
||||
$"'{stash.tabs[tabindex].colour.r}:{stash.tabs[tabindex].colour.g}:{stash.tabs[tabindex].colour.b}'," +
|
||||
$"'{icid}'," +
|
||||
$"'{DB.Stash.GetBaseIDByName(obj.typeLine)}'," +
|
||||
$"'{obj.id}'," +
|
||||
$"'{MySql.Data.MySqlClient.MySqlHelper.EscapeString(File.ReadAllText("tmp/" + obj.id + ".mod.txt"))}'," +
|
||||
$"'{DB.Stash.GetClassByID(icid)}:{MySql.Data.MySqlClient.MySqlHelper.EscapeString(obj.typeLine)}:{MySql.Data.MySqlClient.MySqlHelper.EscapeString(obj.name)}:{obj.ilvl}'," +
|
||||
$"'{obj.icon}'," +
|
||||
$"'{MySql.Data.MySqlClient.MySqlHelper.EscapeString(File.ReadAllText("tmp/" + obj.id + ".txt"))}'," +
|
||||
$"'{ib64}'," +
|
||||
$"'{Web.PoEPrices.GetCurType(obj.id)}'," +
|
||||
$"'{Web.PoEPrices.GetMin(obj.id)}'," +
|
||||
$"'{Web.PoEPrices.GetMax(obj.id)}'" +
|
||||
$")");
|
||||
stringItemTxt.Clear();
|
||||
stringItemMod.Clear();
|
||||
curitem++;
|
||||
Utilities.Message.CMW(chaosValue.ToString(),true,1);
|
||||
}
|
||||
}
|
||||
sCommand.Append(string.Join(",", Rows));
|
||||
//Message.CMW(sCommand.ToString(),true,3);
|
||||
sCommand.Append(";");
|
||||
if (sCommand.ToString() != "INSERT INTO poeco_items(uid, tabindex, tabname, tabrgb, cid, bid, uiid, imod, var, img, txt, b64, ctype, min, max) VALUES ;")
|
||||
{
|
||||
//DB.Stash.AddItemTable(sCommand.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public class Colour
|
||||
{
|
||||
public int r { get; set; }
|
||||
|
||||
public int g { get; set; }
|
||||
|
||||
public int b { get; set; }
|
||||
}
|
||||
|
||||
public class Tab
|
||||
{
|
||||
public string n { get; set; }
|
||||
|
||||
public int i { get; set; }
|
||||
|
||||
public string id { get; set; }
|
||||
|
||||
public string type { get; set; }
|
||||
|
||||
public bool selected { get; set; }
|
||||
|
||||
public Colour colour { get; set; }
|
||||
|
||||
public string srcL { get; set; }
|
||||
|
||||
public string srcC { get; set; }
|
||||
|
||||
public string srcR { get; set; }
|
||||
}
|
||||
|
||||
public class Socket
|
||||
{
|
||||
public int group { get; set; }
|
||||
|
||||
public string attr { get; set; }
|
||||
|
||||
public string sColour { get; set; }
|
||||
}
|
||||
|
||||
public class Property
|
||||
{
|
||||
public string name { get; set; }
|
||||
|
||||
public List<List<object>> values { get; set; }
|
||||
|
||||
public int displayMode { get; set; }
|
||||
|
||||
public int? type { get; set; }
|
||||
}
|
||||
|
||||
public class Requirement
|
||||
{
|
||||
public string name { get; set; }
|
||||
|
||||
public List<List<object>> values { get; set; }
|
||||
|
||||
public int displayMode { get; set; }
|
||||
|
||||
public string suffix { get; set; }
|
||||
}
|
||||
|
||||
public class AdditionalProperty
|
||||
{
|
||||
public string name { get; set; }
|
||||
|
||||
public List<List<object>> values { get; set; }
|
||||
|
||||
public int displayMode { get; set; }
|
||||
|
||||
public double progress { get; set; }
|
||||
|
||||
public int type { get; set; }
|
||||
}
|
||||
|
||||
public class NextLevelRequirement
|
||||
{
|
||||
public string name { get; set; }
|
||||
|
||||
public List<List<object>> values { get; set; }
|
||||
|
||||
public int displayMode { get; set; }
|
||||
}
|
||||
|
||||
public class SocketedItem
|
||||
{
|
||||
public bool verified { get; set; }
|
||||
|
||||
public int w { get; set; }
|
||||
|
||||
public int h { get; set; }
|
||||
|
||||
public string icon { get; set; }
|
||||
|
||||
public bool support { get; set; }
|
||||
|
||||
public string id { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public string typeLine { get; set; }
|
||||
|
||||
public bool identified { get; set; }
|
||||
|
||||
public int ilvl { get; set; }
|
||||
|
||||
public List<Property> properties { get; set; }
|
||||
|
||||
public List<Requirement> requirements { get; set; }
|
||||
|
||||
public List<AdditionalProperty> additionalProperties { get; set; }
|
||||
|
||||
public List<NextLevelRequirement> nextLevelRequirements { get; set; }
|
||||
|
||||
public string secDescrText { get; set; }
|
||||
|
||||
public List<string> explicitMods { get; set; }
|
||||
|
||||
public string descrText { get; set; }
|
||||
|
||||
public int frameType { get; set; }
|
||||
|
||||
public int socket { get; set; }
|
||||
|
||||
public string colour { get; set; }
|
||||
}
|
||||
|
||||
public class Item
|
||||
{
|
||||
public bool verified { get; set; }
|
||||
|
||||
public int w { get; set; }
|
||||
|
||||
public int h { get; set; }
|
||||
|
||||
public string icon { get; set; }
|
||||
|
||||
public int stackSize { get; set; }
|
||||
|
||||
public int maxStackSize { get; set; }
|
||||
|
||||
public string league { get; set; }
|
||||
|
||||
public string id { get; set; }
|
||||
|
||||
public List<Socket> sockets { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public string typeLine { get; set; }
|
||||
|
||||
public bool identified { get; set; }
|
||||
|
||||
public int ilvl { get; set; }
|
||||
|
||||
public bool corrupted { get; set; }
|
||||
|
||||
public int frameType { get; set; }
|
||||
|
||||
public int x { get; set; }
|
||||
|
||||
public int y { get; set; }
|
||||
|
||||
public string inventoryId { get; set; }
|
||||
|
||||
public List<SocketedItem> socketedItems { get; set; }
|
||||
|
||||
public List<Property> properties { get; set; }
|
||||
|
||||
public List<Requirement> requirements { get; set; }
|
||||
|
||||
public List<string> implicitMods { get; set; }
|
||||
|
||||
public List<string> explicitMods { get; set; }
|
||||
|
||||
public List<string> craftedMods { get; set; }
|
||||
|
||||
public bool? support { get; set; }
|
||||
|
||||
public List<AdditionalProperty> additionalProperties { get; set; }
|
||||
|
||||
public string secDescrText { get; set; }
|
||||
|
||||
public string descrText { get; set; }
|
||||
|
||||
public List<string> flavourText { get; set; }
|
||||
|
||||
public bool? fractured { get; set; }
|
||||
|
||||
public List<string> fracturedMods { get; set; }
|
||||
|
||||
public List<string> enchantMods { get; set; }
|
||||
|
||||
public int? talismanTier { get; set; }
|
||||
}
|
||||
|
||||
public class StashRoot
|
||||
{
|
||||
public int numTabs { get; set; }
|
||||
|
||||
public List<Tab> tabs { get; set; }
|
||||
|
||||
public bool quadLayout { get; set; }
|
||||
|
||||
public List<Item> items { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user