diff --git a/crafter.js b/crafter.js index 5d3e323..771cc8d 100644 --- a/crafter.js +++ b/crafter.js @@ -9,7 +9,7 @@ console.log(ing_url_tag); -const ING_BUILD_VERSION = "6.9.40"; +const ING_BUILD_VERSION = "6.9.41"; /* * END testing section */ @@ -262,6 +262,7 @@ function encodeCraft(craft) { } return ""; } + function decodeCraft(ing_url_tag) { if (ing_url_tag) { console.log(ing_url_tag); diff --git a/custom.js b/custom.js index 7b32cad..227b597 100644 --- a/custom.js +++ b/custom.js @@ -1,14 +1,15 @@ -tiers = ["Normal", "Unique", "Rare", "Legendary", "Fabled", "Mythic", "Set", "Crafted"] //I'm not sure why you would make a custom crafted but if you do you should be able to use it w/ the correct powder formula -types = armorTypes.concat(accessoryTypes).concat(weaponTypes).concat(consumableTypes).map(x => x.substring(0,1).toUpperCase() + x.substring(1)); +const tiers = ["Normal", "Unique", "Rare", "Legendary", "Fabled", "Mythic", "Set", "Crafted"] //I'm not sure why you would make a custom crafted but if you do you should be able to use it w/ the correct powder formula +const types = armorTypes.concat(accessoryTypes).concat(weaponTypes).concat(consumableTypes).map(x => x.substring(0,1).toUpperCase() + x.substring(1)); +const atkSpds = ["SUPER_SLOW","VERY_SLOW","SLOW","NORMAL","FAST","VERY_FAST","SUPER_FAST"]; +const ci_save_order = ["name", "lore", "tier", "set", "slots", "type", "material", "drop", "quest", "nDam", "fDam", "wDam", "aDam", "tDam", "eDam", "atkSpd", "hp", "fDef", "wDef", "aDef", "tDef", "eDef", "lvl", "classReq", "strReq", "dexReq", "intReq", "defReq", "agiReq","str", "dex", "int", "agi", "def", "id", "skillpoints", "reqs", "nDam_", "fDam_", "wDam_", "aDam_", "tDam_", "eDam_", "majorIds", "hprPct", "mr", "sdPct", "mdPct", "ls", "ms", "xpb", "lb", "ref", "thorns", "expd", "spd", "atkTier", "poison", "hpBonus", "spRegen", "eSteal", "hprRaw", "sdRaw", "mdRaw", "fDamPct", "wDamPct", "aDamPct", "tDamPct", "eDamPct", "fDefPct", "wDefPct", "aDefPct", "tDefPct", "eDefPct", "spPct1", "spRaw1", "spPct2", "spRaw2", "spPct3", "spRaw3", "spPct4", "spRaw4", "rainbowRaw", "sprint", "sprintReg", "jh", "lq", "gXp", "gSpd"]; +//omitted restrict - it's always "Custom Item" +//omitted displayName - either it's the same as name (repetitive) or it's "Custom Item" +//omitted category - can always get this from type +//omitted fixId - we will denote this early in the string. -//constructs a CI from a hash 'CI-qwoefsabaoe' or 'qwoefsaboe' -function getCustomFromHash(hash) { - -} - /** An object representing a Custom Item. Mostly for vanity purposes. * @dep Requires the use of nonRolledIDs and rolledIDs from display.js. @@ -40,21 +41,15 @@ class Custom{ } } - //Sets the "Hash" of the CI. YOU SHOULD NEVER BE CHANGING THE HASH. + setHash(hash) { this.hash = hash; - //this.statMap.set("displayName", "CI-" + this.hash); - this.statMap.set("hash", this.hash); - } - - //TODO - setHash() { - this.statMap.set("hash", "Custom Item"); + this.statMap.set("hash",hash); } updateName(name) { this.name = name; - this.displayName = name; //name overrides hash + this.displayName = name; } /* Get all stats for this CI. @@ -63,8 +58,11 @@ class Custom{ * TODO: Check if this is even useful */ initCustomStats(){ + //this.setHashVerbose(); //do NOT move sethash from here please + + this.statMap.set("custom", true); if (this.statMap.get("tier") === "Crafted") { - this.statMap.set("Crafted", true); + this.statMap.set("crafted", true); for (const e of skp_elements) { this.statMap.set(e+"DamLow", this.statMap.get(e+"Dam")); } @@ -87,11 +85,11 @@ class Custom{ this.statMap.set("atkSpd", ""); } - this.setHash(); + if (this.statMap.get("name") && this.statMap.get("name") !== "") { this.statMap.set("displayName", this.statMap.get("name")); } else { - this.statMap.set("displayName", this.statMap.get("hash")); + this.statMap.set("displayName", "Custom Item"); } this.statMap.set("reqs",[this.statMap.get("strReq"),this.statMap.get("dexReq"),this.statMap.get("intReq"),this.statMap.get("defReq"),this.statMap.get("agiReq")]); diff --git a/customizer.html b/customizer.html index 0776dd2..3062d3a 100644 --- a/customizer.html +++ b/customizer.html @@ -105,13 +105,7 @@
-