Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Turbo.plugins.patrick.hotkeys.actions.general
- {
- using System.Collections.Generic;
- using Turbo.Plugins;
- using patrick.util.logger;
- using System;
- public partial class Salvage {
- private static int countStats(params double[] stats) {
- int total = 0;
- foreach(var stat in stats) {
- if (stat > 0) {
- ++total;
- }
- }
- return total;
- }
- public bool isGenericAmuletGood(IItem item) {
- return countStats(getElementalDamageBonusAny(item),
- getCriticalHitChance(item),
- getCriticalHitDamage(item),
- getSockets(item)) >= 3;
- }
- public bool isTheTravelersPledgeGood(IItem item) {
- return isGenericAmuletGood(item);
- }
- public bool isObsidianRingoftheZodiacGood(IItem item) {
- int goodStats = 0;
- goodStats += (getAttackSpeedBonus(item) == 7) ? 1 : 0;
- goodStats += (getCriticalHitChance(item) == 6) ? 1 : 0;
- goodStats += (getCooldownReduction(item) == 8) ? 1 : 0;
- goodStats += (getResourceCostReduction(item) == 8) ? 1 : 0;
- return goodStats >= 3;
- }
- public bool isOculusRingGood(IItem item) {
- return roundPercentStat(getLegendaryAffix(item)) == 85;
- }
- public bool isShiMizusHaoriGood(IItem item) {
- return roundPercentStat(getLegendaryAffix(item)) == 25;
- }
- public bool isAndarielsVisageGood(IItem item) {
- int physicalDamage = getElementalDamageBonusPhysical(item);
- int skeletalMageDamage = getSkillDamageSpecific(item, _hud.Sno.SnoPowers.Necromancer_SkeletalMage.Sno);
- int sockets = getSockets(item);
- // LoD mages
- return countStats(physicalDamage, skeletalMageDamage, sockets) >= 2;
- }
- // Add an item here if it should never be automatically salvaged (useful when SalvageUnknowns=true).
- private static readonly HashSet<string> NEVER_SALVAGE_LIST = new HashSet<string> {
- "Bovine Bardiche",
- };
- // Add an item here if it's never good and should always be salvaged.
- private static readonly HashSet<string> ALWAYS_SALVAGE_LIST = new HashSet<string>{
- "Accursed Visage",
- "Accursed Visage",
- "Ahavarion, Spear of Lycander",
- "Akanesh, the Herald of Righteousness",
- "Akkhan's Addendum",
- "Akkhan's Manacles",
- "Ambo's Pride",
- "Ancient Parthan Defenders",
- "Anessazi Edge",
- "Angel Hair Braid",
- "Angelic Grand Flail",
- "Archmage's Vicalyke",
- "Arcstone",
- "Arreat's Law",
- "Arthef's Spark of Life",
- "Augustine's Panacea",
- "Augustine's Panacea",
- "Avarice Band",
- "Bakkan Caster",
- "Balefire Caster",
- "Band of Hollow Whispers",
- "Band of the Rue Chambers",
- "Bastion's Revered",
- "Belt of Transcendence",
- "Bezoar Stone",
- "Blackguard",
- "Blackhand Key",
- "Blackthorne's Duncraig Cross",
- "Blackthorne's Notched Belt",
- "Blackthorne's Spurs",
- "Blackthorne's Surcoat",
- "Blade of the Warlord",
- "Blind Faith",
- "Blood Brother",
- "Bloodsong Mail",
- "Bloodtide Blade",
- "Boots of Disregard",
- "Bottomless Potion of Amplification",
- "Bottomless Potion of Chaos",
- "Bottomless Potion of Fear",
- "Bottomless Potion of Kulle-Aid",
- "Bottomless Potion of Mutilation",
- "Bottomless Potion of Regeneration",
- "Bottomless Potion of Rejuvenation",
- "Bottomless Potion of the Diamond",
- "Bottomless Potion of the Leech",
- "Bottomless Potion of the Unfettered",
- "Bracer of Fury",
- "Bracers of Destruction",
- "Broken Crown",
- "Broken Promises",
- "Bryner's Journey",
- "Bul-Kathos's Solemn Vow",
- "Bul-Kathos's Warrior Blood",
- "Bul-Kathos's Wedding Band",
- "Buriza-Do Kyanon",
- "Burst of Wrath",
- "Burst Of Wrath",
- "Butcher's Carver",
- "Cage of the Hellborn",
- "Cage of the Hellborn",
- "Calamity",
- "Cape of the Dark Night",
- "Chaingmail",
- "Chanon Bolter",
- "Circle of Nailuj's Evol",
- "Cloak of Deception",
- "Cluckeye",
- "Coils of the First Spider",
- "Cord of the Sherma",
- "Corpsewhisper Pauldrons",
- "Corrupted Ashbringer",
- "Countess Julia's Cameo",
- "Coven's Criterion",
- "Crashing Rain",
- "Crushbane",
- "Crystal Fist",
- "Custerian Wristguards",
- "Danetta's Revenge",
- "Dashing Pauldrons of Despair",
- "Deadly Rebirth",
- "Death Watch Mantle",
- "Death's Bargain",
- "Deathseer's Cowl",
- "Defender of Westmarch",
- "Defiler Cuisses",
- "Demon Machine",
- "Devil Tongue",
- "Dishonored Legacy",
- "Doombringer",
- "Dovu Energy Trap",
- "Dread Iron",
- "Eight-Demon Boots",
- "Emimei's Duffel",
- "Empyrean Messenger",
- "Enchanting Favor",
- "Envious Blade",
- "Erlang Shen",
- "Etrayu",
- "Eun-jang-do",
- "Exarian",
- "Eye of Etlich",
- "Eye of Peshkov",
- "Eyes of the Earth",
- "Fate's Vow",
- "Fiendish Grips",
- "Fire Walkers",
- "Fjord Cutter",
- "Flail of the Ascended",
- "Flesh Tearer",
- "Flesh Tearer",
- "Flesh Tearer",
- "Fleshrake",
- "Fletcher's Pride",
- "Flying Dragon",
- "Fortress Ballista",
- "Foundation of the Earth",
- "Freeze of Deflection",
- "Frostburn",
- "Fulminator",
- "Funerary Pick",
- "Fury of the Vanished Peak",
- "Gelmindor's Marrow Guards",
- "Genzaniku",
- "Gift of Silaria",
- "Girdle of Giants",
- "Gladiator Gauntlets",
- "Gloves of Worship",
- "Golden Flense",
- "Golden Gorget of Leoric",
- "Goldskin",
- "Goldwrap",
- "Golemskin Breeches",
- "Grandfather Flail",
- "Guard of Johanna",
- "Gungdo Gear",
- "Gyana Na Kashu",
- "Gyana Na Kashu",
- "Hack",
- "Halcyon's Ascent",
- "Hallowed Bulwark",
- "Hand of the Prophet",
- "Harness of Truth",
- "Harrington Waistguard",
- "Haunt of Vaxo",
- "Haunting Girdle",
- "Heart of Iron",
- "Heart of the Crashing Wave",
- "Heart of the Light",
- "Heart Slaughter",
- "Hell Walkers",
- "Hellrack",
- "Helltooth Gauntlets",
- "Helltooth Greaves",
- "Helltooth Mantle",
- "Helltooth Mantle",
- "Helltooth Mask",
- "Helltooth Tunic",
- "Helltrapper",
- "Henri's Perquisition",
- "Hergbrash's Binding",
- "Hillenbrand's Training Sword",
- "Holy Beacon",
- "Homing Pads",
- "Homunculus",
- "Hwoj Wrap",
- "Incense Torch of the Grand Temple",
- "Incorruptible Soul",
- "Insatiable Belt",
- "Irontoe Mudsputters",
- "Ivory Tower",
- "Jade Harvester's Courage",
- "Jade Harvester's Courage",
- "Jade Harvester's Joy",
- "Jade Harvester's Mercy",
- "Jade Harvester's Mercy",
- "Jade Harvester's Peace",
- "Jade Harvester's Swiftness",
- "Jade Harvester's Wisdom",
- "Jawbreaker",
- "Jeram's Bracers",
- "Kekegi's Unbreakable Spirit",
- "Kerykeion",
- "Krede's Flame",
- "Krelm's Buff Belt",
- "Krelm's Buff Bracers",
- "Kridershot",
- "Kymbo's Gold",
- "Kyoshiro's Soul",
- "Lacuni Prowlers",
- "Lakumba's Ornament",
- "Last Breath",
- "Last Breath",
- "Leonine Bow of Hashir",
- "Leoric's Crown",
- "Leoric's Signet",
- "Lianna's Wings",
- "Lidless Wall",
- "Light of Grace",
- "Limb Cleaver",
- "Lion's Claw",
- "Lion's Claw",
- "Logan's Claw",
- "Lord Greenstone's Fan",
- "Mad Monarch's Scepter",
- "Madawc's Sorrow",
- "Madstone",
- "Magefist",
- "Maloth's Focus",
- "Maltorius' Petrified Spike",
- "Manajuma's Carving Knife",
- "Manajuma's Gory Fetch",
- "Manticore",
- "Mara's Kaleidoscope",
- "Mask of Scarlet Death",
- "Mask of the Searing Sky",
- "Maximus",
- "Mempo of Twilight",
- "Messerschmidt's Reaver",
- "Mirrorball",
- "Monster Hunter",
- "Moonlight Ward",
- "Moribund Gauntlets",
- "Moschen Spheres",
- "Myken's Ball of Hate",
- "Nagelring",
- "Nailbiter",
- "Natalya's Bloody Footprints",
- "Natalya's Embrace",
- "Natalya's Leggings",
- "Natalya's Reflection",
- "Natalya's Sight",
- "Natalya's Slayer",
- "Natalya's Touch",
- "Nayr's Black Death",
- "Neanderthal",
- "Nemesis Bracers",
- "Nilfur's Boast",
- "Nutcracker",
- "Oathkeeper",
- "Odyn Son",
- "Orb of Infinite Depth",
- "Ouroboros",
- "Overwhelming Desire",
- "Oxybeles",
- "Pandemonium Loop",
- "Pauldrons of the Skeleton King",
- "Penetrator",
- "Persuader",
- "Pledge of Caldeum",
- "Pox Faulds",
- "Pride of the Invoker",
- "Pride's Fall",
- "Promise of Glory",
- "Pull of the Earth",
- "Punyal",
- "Pus Spitter",
- "Pus Spitter",
- "Quetzalcoatl",
- "Raekor's Breeches",
- "Raekor's Burden",
- "Raekor's Heart",
- "Raekor's Striders",
- "Raekor's Will",
- "Raekor's Wraps",
- "Rakoff's Glass of Life",
- "Razor Strop",
- "Rechel's Ring of Larceny",
- "Reilena's Shadowhook",
- "Relic of Akarat",
- "Renewal of the Invoker",
- "Rhen'ho Flayer",
- "Ribald Etchings",
- "Rimeheart",
- "Ring of Royal Grandeur",
- "Rivera Dancers",
- "Rogar's Huge Stone",
- "Roland's Determination",
- "Roland's Grasp",
- "Roland's Mantle",
- "Roland's Stride",
- "Rondal's Locket",
- "Sacred Harness",
- "Saffron Wrap",
- "Salvation",
- "Sanguinary Vambraces",
- "Sash of Knives",
- "Scarbringer",
- "Schaefer's Hammer",
- "Scourge",
- "Scrimshaw",
- "Sebor's Nightmare",
- "See No Evil",
- "Sever",
- "Shard of Hate",
- "Skeleton Key",
- "Skorn",
- "Skular's Salvation",
- "Skull Grasp",
- "Skull of Resonance",
- "Skullsplitter",
- "Sky Splitter",
- "Skycutter",
- "Sledge Fist",
- "Sledge of Athskeleng",
- "Slipka's Letter Opener",
- "Smoking Thurible",
- "Solanium",
- "Soulsmasher",
- "Spaulders of Zakara",
- "Spear of Jairo",
- "Spires of the Earth",
- "Spirit Guards",
- "Spirit of the Earth",
- "Split Task",
- "Split Tusk",
- "Staff of Chiroptera",
- "Stalgard's Decimator",
- "Standoff",
- "Starfire",
- "Starmetal Kukri",
- "Stormshield",
- "String of Ears",
- "Sun Keeper",
- "SuWong Diviner",
- "Sword of Ill Will",
- "Tal Rasha's Allegiance",
- "Tal Rasha's Brace",
- "Tal Rasha's Stride",
- "Tal Rasha's Unwavering Glare",
- "Talisman of Aranoch",
- "Telranden's Hand",
- "The Ancient Bonesaber of Zumakalis",
- "The Barber",
- "The Broken Staff",
- "The Burning Axe of Sankis",
- "The Butcher's Sickle",
- "The Cloak of the Garwulf",
- "The Demon's Demise",
- "The Ess of Johan",
- "The Executioner",
- "The Eye of the Storm",
- "The Flavor of Time",
- "The Furnace",
- "The Gavel of Judgment",
- "The Gidbinn",
- "The Grandfather",
- "The Grin Reaper",
- "The Laws of Seph",
- "The Magistrate",
- "The Oculus",
- "The Paddle",
- "The Raven's Wing",
- "The Shame of Delsere",
- "The Short Man's Finger",
- "The Smoldering Core",
- "The Star of Azkaranth",
- "The Sultan of Blinding Sand",
- "The Three Hundredth Spear",
- "The Tormentor",
- "The Zweihander",
- "Thing of the Deep",
- "Thunderfury, Blessed Blade of the Windseeker",
- "Thundergod's Vigor",
- "Tiklandian Visage",
- "Trag'Oul Coils",
- "Trag'Oul's Claws",
- "Trag'Oul's Guise",
- "Trag'Oul's Heart",
- "Trag'Oul's Hide",
- "Trag'Oul's Scales",
- "Trag'Oul's Stalwart Greaves",
- "Typhon's Tibia",
- "Tyrael's Might",
- "Tzo Krin's Gaze",
- "Uhkapian Serpent",
- "Uhkapian Serpent",
- "Unholy Plates",
- "Unsanctified Shoulders",
- "Ursua's Trodden Effigy",
- "Ursua's Trodden Effigy",
- "Vadim's Surge",
- "Valthek's Rebuke",
- "Vambraces of Sescheron",
- "Vigilance",
- "Vigilante Belt",
- "Vile Hive",
- "Vile Ward",
- "Visage of Giyua",
- "Visage of Giyua",
- "Voo's Juicer",
- "Warmonger",
- "Warzechian Armguards",
- "Weight of the Earth",
- "Wildwood",
- "Wilken's Reach",
- "Wilken's Reach.",
- "Windforce",
- "Winter Flurry",
- "Wisdom of Kalan",
- "Wojahnni Assaulter",
- "Wormwood",
- "Wrath of the Bone King",
- "Wyrdward",
- "Xephirian Amulet",
- "Zeal of the Invoker",
- "Zunimassa's Finger Wraps",
- "Zunimassa's Marrow",
- "Zunimassa's Pox",
- "Zunimassa's String of Skulls",
- "Zunimassa's Trail",
- "Zunimassa's Vision"
- };
- // Add an item here if it's only good in ancient.
- private static readonly HashSet<string> NONANCIENT_SALVAGE_LIST = new HashSet<string>{
- "Aether Walker",
- "Ancient Parthan Defenders",
- "Andariel's Visage",
- "Antique Vintage Boots",
- "Aquila Cuirass",
- "Arachyr's Carapace",
- "Arachyr's Claws",
- "Arachyr's Legs",
- "Arachyr's Mantle",
- "Arachyr's Stride",
- "Arachyr's Visage",
- "Ashnagarr's Blood Bracer",
- "Aughild's Power",
- "Aughild's Search",
- "Azurewrath",
- "Balance",
- "Beckon Sail",
- "Binding of the Lost",
- "Blackfeather",
- "Blackthorne's Jousting Mail",
- "Blade of the Tribes",
- "Bonds of C'Lena",
- "Bone Ringer",
- "Brigandine of Valor",
- "Briggs' Wrath",
- "Carnevil",
- "Chain of Shadows",
- "Chantodo's Force",
- "Chantodo's Will",
- "Chausses of Valor",
- "Cindercoat",
- "Cold Cathode Trousers",
- "Crown of Valor",
- "Cuirass of the Wastes",
- "Dayntee's Binding",
- "Deathwish",
- "Decree of Justice",
- "Depth Diggers",
- "Echoing Fury",
- "Elegant Pants",
- "Etched Sigil",
- "Extravagant Shoes",
- "Fazula's Improbable Chain",
- "Firebird's Breast",
- "Firebird's Down",
- "Firebird's Eye",
- "Firebird's Pinions",
- "Firebird's Plume",
- "Firebird's Talons",
- "Firebird's Tarsi",
- "Fists of Thunder",
- "Flail of the Charge",
- "Fragment of Destiny",
- "Fury of the Ancients",
- "Galvanized Vest",
- "Gas Powered Automail Forearm",
- "Gauntlet of the Wastes",
- "Gazing Demise",
- "Glamorous Gigot",
- "Heel of Savages",
- "Helm of the Wastes",
- "Hexing Pants of Mr. Yan",
- "Ice Climbers",
- "Illusory Boots",
- "Immortal King's Eternal Reign",
- "Immortal King's Irons",
- "Immortal King's Stature",
- "Immortal King's Stride",
- "Immortal King's Tribal Binding",
- "Immortal King's Triumph",
- "Inarius's Conviction",
- "Inarius's Martyrdom",
- "Inarius's Perseverance",
- "Inarius's Reticence",
- "Inarius's Understanding",
- "Inarius's Will",
- "In-geom",
- "Inna's Favor",
- "Inna's Hold",
- "Inna's Radiance",
- "Inna's Reach",
- "Inna's Sandals",
- "Inna's Temperance",
- "Inna's Vast Expanse",
- "Iron Rose",
- "Jesseth Skullscythe",
- "Jesseth Skullshield",
- "Johanna's Argument",
- "Justice Lantern",
- "Kyoshiro's Blade",
- "Lakumba's Ornament",
- "Lamellars of Justice",
- "Lavishing Gloves",
- "Lefebvre's Soliloquy",
- "Leger's Disdain",
- "Leggings of Savages",
- "Litany of the Undaunted",
- "Little Rogue",
- "Lornelle's Sunstone",
- "Lost Time",
- "Luxurious Bauta",
- "Mantle of Channeling",
- "Mantle of the Upside-Down Sinners",
- "Marauder's Carapace",
- "Marauder's Encasement",
- "Marauder's Gloves",
- "Marauder's Spines",
- "Marauder's Treads",
- "Marauder's Visage",
- "Markings of Savages",
- "Mask of Jeram",
- "Mechanical Pauldrons",
- "Mirrors of Justice",
- "Mortick's Brace",
- "Mountains of Justice",
- "Mundunugu's Dance",
- "Mundunugu's Decoration",
- "Mundunugu's Descendant",
- "Mundunugu's Headdress",
- "Mundunugu's Rhythm",
- "Mundunugu's Robe",
- "Obsidian Ring of the Zodiac",
- "Odyssey's End",
- "Pauldrons of the Wastes",
- "Pestilence Battle Boots",
- "Pestilence Defense",
- "Pestilence Gloves",
- "Pestilence Incantations",
- "Pestilence Mask",
- "Pestilence Robe",
- "Pig Sticker",
- "Pinto's Pride",
- "Pride of Cassius",
- "Puzzle Ring",
- "Rabid Strike",
- "Ranslor's Folly",
- "Rathma's Macabre Vambraces",
- "Rathma's Ossified Sabatons",
- "Rathma's Ribcage Plate",
- "Rathma's Skeletal Legplates",
- "Rathma's Skull Helm",
- "Rathma's Spikes",
- "Razeth's Volition",
- "Remorseless",
- "Requiem Cereplate",
- "Restraint",
- "Sabaton of the Wastes",
- "Sacred Harvester",
- "Scales of the Dancing Serpent",
- "Scythe of the Cycle",
- "Shenlong's Fist of Legend",
- "Shenlong's Relentless Assault",
- "Shield of Fury",
- "Shukrani's Triumph",
- "Skull of Savages",
- "Sophisticated Vest",
- "Spaulders of Valor",
- "Spines of Savages",
- "St. Archew's Gage",
- "Steuart's Greaves",
- "Stone Gauntlets",
- "Stone of Jordan",
- "Strongarm Bracers",
- "Sunwuko's Balance",
- "Sunwuko's Crown",
- "Sunwuko's Leggings",
- "Sunwuko's Paws",
- "Sunwuko's Shines",
- "Sunwuko's Soul",
- "Swamp Land Waders",
- "Swamp Land Waders",
- "Tal Rasha's Relentless Pursuit",
- "Tasker and Theo",
- "Tasset of the Wastes",
- "The Crudest Boots",
- "The Dagger of Darts",
- "The Shadow's Bane",
- "The Shadow's Coil",
- "The Shadow's Grasp",
- "The Shadow's Heels",
- "The Shadow's Mask",
- "The Short Man's Finger",
- "The Slanderer",
- "The Spider Queen's Grasp",
- "The Swami",
- "The Tall Man's Finger",
- "The Twisted Sword",
- "The Wailing Host",
- "The Witching Hour",
- "Trag'Oul's Corroded Fang",
- "Triumvirate",
- "Uliana's Heart",
- "Uliana's Strength",
- "Unity",
- "Unstable Scepter",
- "Vengeful Wind",
- "Vyr's Astonishing Aura",
- "Vyr's Fantastic Finery",
- "Vyr's Grasping Gauntlets",
- "Vyr's Proud Pauldrons",
- "Vyr's Sightless Skull",
- "Vyr's Swaggering Stance",
- "Weaves of Justice",
- "Won Khim Lau",
- "Wraps of Clarity",
- "Yang's Recurve"
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement