Advertisement
EzPlugins

ItemPowerShow

Apr 16th, 2024 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 44.15 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2. using System;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. using System.Text.RegularExpressions;
  7. using System.Windows.Forms;
  8.  
  9. namespace Turbo.Plugins.Ez
  10. {
  11.     public class ItemPowerShow : BasePlugin, IInGameTopPainter
  12.     {
  13.         public bool DebugOn { get; set; } = false;
  14.         public string NumericTextMaxValue { get; set; }
  15.         public GroundLabelDecorator ItemDecorator { get; set; }
  16.  
  17.         private IItem ItemOld { get; set; } = null;
  18.         private bool logItemsId { get; set; } = false;
  19.  
  20.         public IFont PrimalAffixFont { get; set; }
  21.         public IFont AncientAffixFont { get; set; }
  22.         public IFont AncientAffixFontMax { get; set; }
  23.         public IFont LegendaryAffixFont { get; set; }
  24.         public IFont LegendaryAffixFontMax { get; set; }
  25.         public IFont DefaultFont { get; set; }
  26.  
  27.         public bool ShowInLegendary { get; set; }
  28.         public bool ShowInAncient { get; set; }
  29.         public bool ShowInPrimal { get; set; }
  30.         public bool ShowOnUnidentifiedOnly { get; set; }
  31.         public bool ShowInStash { get; set; } = true;
  32.         public string TextMaxValue { get; set; }
  33.         public float xPor { get; set; }
  34.         public float yPor { get; set; }
  35.         public float yPorLarge { get; set; }
  36.         public bool centered { get; set; }
  37.  
  38.         public Dictionary<ActorSnoEnum,Tuple<string,bool,string,double>> Sno_IdPercent { get; set; } = new Dictionary<ActorSnoEnum, Tuple<string,bool,string,double>>   //  < item.SnoActor.Sno, Tuple<STAT.Id, multiply x 100, Suffix, MaxValue> >
  39.         {
  40.             { ActorSnoEnum._ring_norm_unique_004, new Tuple<string,bool,string,double>("Item_Power_Passive#318375", false, "", 16) },                   // Puzzle Ring
  41.             { ActorSnoEnum._amulet_norm_unique_13, new Tuple<string,bool,string,double>("Item_Power_Passive#318719", true, "%", 15) },                  // Mara's Kaleidoscope
  42.             { ActorSnoEnum._x1_flail1h_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#359538", true, "%", 20) },              // Kassar's Retribution
  43.             { ActorSnoEnum._x1_amulet_norm_unique_23, new Tuple<string,bool,string,double>("Item_Power_Passive#318867", true, "%", 25) },               // Dovu Energy Trap
  44.             { ActorSnoEnum._x1_amulet_norm_unique_24, new Tuple<string,bool,string,double>("Item_Power_Passive#318410", true, "%", 4) },                // Rakoff's Glass of Life
  45.             { ActorSnoEnum._amulet_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#318718", true, "%", 15) },                  // Xephirian Amulet
  46.             { ActorSnoEnum._x1_amulet_norm_unique_25, new Tuple<string,bool,string,double>("Item_Power_Passive#475677", false, "s", 8) },               // Halcyon's Ascent // Item_Power_Passive#374502 // Item_Power_Passive#374503
  47.             { ActorSnoEnum._ring_norm_unique_018, new Tuple<string,bool,string,double>("Item_Power_Passive#402460", false, "s", 12) },                  // Nagelring
  48.             { ActorSnoEnum._axe_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#433993", true, "%", 20) },                     // Sky Splitter
  49.             { ActorSnoEnum._bracers_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#318871", true, "%", 6) },                  // Promise of Glory
  50.             { ActorSnoEnum._twohandedsword_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#364321", true, "%", 45) },          // Scourge
  51.             { ActorSnoEnum._p2_twohandedsword_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#402455", false, "%", 6000) },    // Corrupted Ashbringer
  52.             { ActorSnoEnum._x1_mace_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#318873", true, "%", 4) },                  // Solanium
  53.             { ActorSnoEnum._amulet_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#318716", true, "%", 15) },                  // The Star of Azkaranth
  54.             { ActorSnoEnum._barbbelt_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#364341", true, "%", 130) },               // Thundergod's Vigor
  55.             { ActorSnoEnum._amulet_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#318715", true, "%", 15) },                  // Talismán de Aranoch
  56.             { ActorSnoEnum._x1_amulet_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#334880", false, "", 6) },                // Golden Gorget of Leoric
  57.             { ActorSnoEnum._x1_belt_norm_unique_16, new Tuple<string,bool,string,double>("Item_Power_Passive#434038", true, "%", 650) },                // Sash of Knives
  58.             { ActorSnoEnum._boots_norm_unique_085, new Tuple<string,bool,string,double>("Item_Power_Passive#434010", true, "%", 400) },                 // Fire Walkers
  59.             { ActorSnoEnum._twohandedmace_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318757", true, "%", 4) },            // Arthef's Spark of Life
  60.             { ActorSnoEnum._x1_mace_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#318359", true, "%", 1400) },               // Mad Monarch's Scepter
  61.             { ActorSnoEnum._x1_crushield_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#318829", true, "%", 30) },            // Salvation
  62.             { ActorSnoEnum._x1_sword_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#441681", true, "%", 555) },               // Fulminator
  63.             { ActorSnoEnum._x1_twohandedsword_norm_unique_13, new Tuple<string,bool,string,double>("Item_Power_Passive#402456", true, "%", 20) },       // Blood Brother
  64.             { ActorSnoEnum._p2_dagger_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#402457", true, "%", 20) },               // Eun-jang-do
  65.             { ActorSnoEnum._x1_belt_norm_unique_19, new Tuple<string,bool,string,double>("Item_Power_Passive#318881", true, "%", 135) },                // Harrington Waistguard
  66.             { ActorSnoEnum._x1_belt_norm_unique_18, new Tuple<string,bool,string,double>("Item_Power_Passive#434008", false, "s", 4) },                 // Cord of the Sherma
  67.             { ActorSnoEnum._p2_ring_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#359598", true, "%", 1500) },               // Arcstone
  68.             { ActorSnoEnum._x1_twohandedsword_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#318412", true, "%", 700) },      // Stalgard's Decimator
  69.             { ActorSnoEnum._shoulderpads_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#434005", true, "%", 35) },            // Death Watch Mantle
  70.             { ActorSnoEnum._x1_belt_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#318241", true, "%", 400) },                // Razor Strop
  71.             { ActorSnoEnum._x1_helm_norm_unique_14, new Tuple<string,bool,string,double>("Item_Power_Passive#318857", true, "%", 20) },                 // Deathseer's Cowl
  72.             { ActorSnoEnum._twohandedmace_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#434033", true, "%", 850) },          // Schaefer's Hammer
  73.             { ActorSnoEnum._quiver_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#451169", true, "%", 250) },                 // Augustine's Panacea
  74.             { ActorSnoEnum._x1_boots_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#318877", true, "%", 30) },                // Irontoe Mudsputters
  75.             { ActorSnoEnum._x1_pants_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#318827", true, "%", 1000) },              // Death's Bargain
  76.             { ActorSnoEnum._x1_shield_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#318747", true, "%", 60) },               // Coven's Criterion
  77.             { ActorSnoEnum._x1_twohandedmace_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#318826", true, "%", 600) },       // Soulsmasher
  78.             { ActorSnoEnum._x1_sword_norm_promo_02, new Tuple<string,bool,string,double>("Item_Power_Passive#359587", true, "%", 250) },                // Shard of Hate
  79.             { ActorSnoEnum._pants_norm_unique_048, new Tuple<string,bool,string,double>("Item_Power_Passive#434009", true, "%", 550) },                 // Pox Faulds
  80.             { ActorSnoEnum._x1_amulet_norm_unique_19, new Tuple<string,bool,string,double>("Item_Power_Passive#318381", true, "%", 25) },               // Countess Julia's Cameo
  81.             { ActorSnoEnum._axe_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#248484", true, "%", 25) },                     // The Butcher's Sickle
  82.             { ActorSnoEnum._x1_shield_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#434004", true, "%", 1000) },             // Defender of Westmarch
  83.  
  84.             { ActorSnoEnum._shield_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#435016", true, "%", 125) },                 // Denial
  85.             { ActorSnoEnum._x1_ring_norm_unique_026, new Tuple<string,bool,string,double>("Item_Power_Passive#434036", true, "%", 35) },                // Wyrdward
  86.             { ActorSnoEnum._x1_belt_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#318800", true, "%", 80) },                 // Hwoj Wrap
  87.             { ActorSnoEnum._pants_norm_unique_077, new Tuple<string,bool,string,double>("Item_Power_Passive#446502", true, "%", 400) },                 // Hammer Jammers
  88.             { ActorSnoEnum._p3_bracers_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#441278", true, "%", 100) },             // Jeram's Bracers
  89.             { ActorSnoEnum._p610_mojo_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#484655", true, "%", 150) },              // Ursua's Trodden Effigy
  90.             { ActorSnoEnum._shoulderpads_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#397783", true, "%", 35) },            // Vile Ward
  91.             { ActorSnoEnum._x1_axe_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#447029", false, "p", 125) },                // Mordullu's Promise
  92.             { ActorSnoEnum._spear_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#486951", true, "%", 200) },                  // Arreat's Law
  93.             { ActorSnoEnum._x1_handxbow_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#318828", true, "%", 10) },             // Helltrapper
  94.             { ActorSnoEnum._x1_twohandedaxe_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#484604", true, "%", 800) },        // Blade of the Tribes
  95.             { ActorSnoEnum._p6_twohandedscythe_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#475246", true, "%", 700) },     // Maltorius
  96.             { ActorSnoEnum._p6_pants_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#485506", true, "%", 500) },               // Defiler Cuisses
  97.             { ActorSnoEnum._p6_pants_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#478510", false, "s", 25) },           // Golemskin Breeches
  98.             { ActorSnoEnum._p6_shoulderpads_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476580", true, "%", 75) },     // Corpsewhisper Pauldrons
  99.             { ActorSnoEnum._p6_chestarmor_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476585", true, "%", 125) },      // Bloodsong Mail
  100.             { ActorSnoEnum._p6_twohandedscythe_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#475251", true, "%", 400) }, // Bloodtide Blade
  101.             { ActorSnoEnum._p6_amulet_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#476583", true, "%", 200) },          // The Johnstone
  102.             { ActorSnoEnum._p6_spear_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#475254", true, "%", 15) },            // Spear of Jairo
  103.             { ActorSnoEnum._p610_bracers_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#484588", true, "%", 400) },       // Gelmindor's Marrow Guards
  104.             { ActorSnoEnum._p6_shoulderpads_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#484311", true, "%", 50) },     // Razeth's Volition
  105.             { ActorSnoEnum._p6_talisman_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#476684", true, "%", 10) },         // Lost Time
  106.             { ActorSnoEnum._p6_talisman_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#476696", true, "%", 80) },         // Leger's Disdain
  107.             { ActorSnoEnum._p6_gloves_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#484310", true, "%", 200) },          // Grasps of Essence
  108.             { ActorSnoEnum._p6_boots_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#475243", true, "%", 100) },           // Steuart's Greaves
  109.             { ActorSnoEnum._p1_belt_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#359554", true, "%", 4000) },           // Crashing Rain
  110.             { ActorSnoEnum._x1_barbbelt_norm_unique_14, new Tuple<string,bool,string,double>("Item_Power_Passive#446639", true, "%", 9) },          // Zoey's Secret
  111.             { ActorSnoEnum._p4_bracers_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#447839", true, "%", 6) },           // Vambraces of Sescheron
  112.             { ActorSnoEnum._p7_bracers_norm_unique_23, new Tuple<string,bool,string,double>("Item_Power_Passive#485504", true, "%", 100) },         // Bonds of C'Lena
  113.             { ActorSnoEnum._boots_norm_unique_075, new Tuple<string,bool,string,double>("Item_Power_Passive#485724", true, "%", 200) },             // The Crudest Boots
  114.             { ActorSnoEnum._x1_bracers_norm_unique_19, new Tuple<string,bool,string,double>("Item_Power_Passive#430289", true, "%", 60) },          // Spirit Guards
  115.             { ActorSnoEnum._fistweapon_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#484106", true, "%", 600) },         // Won Khim Lau
  116.             { ActorSnoEnum._spiritstone_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#318426", true, "%", 1400) },       // Gyana Na Kashu
  117.             { ActorSnoEnum._p3_belt_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#440598", true, "%", 5) },              // Binding of the Lost
  118.             { ActorSnoEnum._p1_fistweapon_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483791", true, "%", 800) },      // Vengeful Wind
  119.             { ActorSnoEnum._mojo_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#484270", true, "%", 150) },               // Gazing Demise
  120.             { ActorSnoEnum._helm_norm_unique_01, new Tuple<string,bool,string,double>("Gem_Attributes_Multiplier#1048575", true, "%", 100) },       // Leoric's Crown
  121.             { ActorSnoEnum._sword_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#441723", true, "%", 650) },              // Azurewrath
  122.             { ActorSnoEnum._p3_bracers_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#440790", false, "", 80000) },       // Coils of the First Spider
  123.             { ActorSnoEnum._x1_quiver_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#484295", true, "%", 600) },          // The Ninth Cirri Satchel
  124.             { ActorSnoEnum._p2_handxbow_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#447816", true, "%", 3) },          // Fortress Ballista
  125.             { ActorSnoEnum._x1_bow_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#478485", true, "%", 200) },             // Yang's Recurve
  126.             { ActorSnoEnum._p4_ring_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#446187", true, "%", 60) },             // Elusive Ring
  127.             { ActorSnoEnum._handxbow_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#446146", true, "%", 65) },            // Dawn
  128.             { ActorSnoEnum._x1_ring_norm_unique_028, new Tuple<string,bool,string,double>("Item_Power_Passive#318870", true, "%", 60) },            // Rechel's Ring of Larceny
  129.             { ActorSnoEnum._p3_bracers_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#441517", true, "%", 50) },          // Wraps of Clarity
  130.             { ActorSnoEnum._p2_belt_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#440743", true, "%", 200) },            // Hunter's Wrath
  131.             { ActorSnoEnum._p2_orb_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#478481", true, "%", 10) },              // Orb of Infinite Depth
  132.             { ActorSnoEnum._ring_norm_unique_008, new Tuple<string,bool,string,double>("Item_Power_Passive#446565", true, "%", 55) },               // Justice Lantern
  133.             { ActorSnoEnum._x1_flail2h_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#478478", true, "%", 500) },         // Fate of the Fell
  134.             { ActorSnoEnum._x1_crushield_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#318888", true, "%", 25) },        // Akarat's Awakening
  135.             { ActorSnoEnum._twohandedsword_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#454927", true, "%", 80) },      // Faithful Memory
  136.             { ActorSnoEnum._ring_norm_unique_017, new Tuple<string,bool,string,double>("Item_Power_Passive#402461", true, "%", 85) },               // Oculus Ring
  137.             { ActorSnoEnum._boots_norm_unique_045, new Tuple<string,bool,string,double>("Item_Power_Passive#447043", true, "%", 300) },             // Rivera Dancers
  138.             { ActorSnoEnum._gloves_norm_unique_044, new Tuple<string,bool,string,double>("Item_Power_Passive#451166", true, "%", 20) },             // Magefist
  139.             { ActorSnoEnum._quiver_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#478486", true, "%", 200) },             // Dead Man's Legacy
  140.             { ActorSnoEnum._p6_scythe_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#487651", true, "%", 300) },          // Funerary Pick
  141.             { ActorSnoEnum._p2_sword_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#402458", false, "s", 10) },           // In-geom
  142.             { ActorSnoEnum._belt_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#446541", true, "%", 30) },                // String of Ears
  143.             { ActorSnoEnum._pants_norm_unique_044, new Tuple<string,bool,string,double>("Item_Power_Passive#402416", true, "%", 100) },             // Depth Diggers
  144.             { ActorSnoEnum._x1_belt_norm_unique_20, new Tuple<string,bool,string,double>("Item_Power_Passive#318795", true, "%", 80) },             // Jang's Envelopment
  145.             { ActorSnoEnum._x1_gloves_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#434007", true, "%", 150) },          // St. Archew's Gage
  146.             { ActorSnoEnum._mojo_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318721", true, "%", 30) },                // Uhkapian Serpent
  147.             { ActorSnoEnum._p2_shoulderpads_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#446640", true, "%", 25) },     // Mantle of Channeling
  148.             { ActorSnoEnum._wizardhat_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#440336", false, "s", 20) },          // The Swami
  149.             { ActorSnoEnum._chestarmor_norm_unique_047, new Tuple<string,bool,string,double>("Item_Power_Passive#449064", true, "%", 90) },         // Aquila Cuirass
  150.             { ActorSnoEnum._gloves_norm_unique_043, new Tuple<string,bool,string,double>("Item_Power_Passive#451167", true, "%", 20) },             // Frostburn
  151.             { ActorSnoEnum._chestarmor_norm_unique_049, new Tuple<string,bool,string,double>("Item_Power_Passive#318790", true, "%", 30) },         // Cindercoat
  152.             { ActorSnoEnum._shoulderpads_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318801", true, "%", 65) },        // Homing Pads
  153.             { ActorSnoEnum._barbbelt_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#318419", false, "s", 6) },            // Pride of Cassius
  154.             { ActorSnoEnum._p6_ring_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#475241", true, "%", 100) },            // Krysbin's Sentence
  155.             { ActorSnoEnum._ring_norm_unique_009, new Tuple<string,bool,string,double>("Item_Power_Passive#429648", true, "%", 60) },               // Halo of Arlyse
  156.             { ActorSnoEnum._x1_bow_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#484297", true, "%", 150) },             // Odyssey's End
  157.             { ActorSnoEnum._x1_amulet_norm_unique_20, new Tuple<string,bool,string,double>("Item_Power_Passive#318759", true, "%", 80) },           // The Ess of Johan
  158.             { ActorSnoEnum._belt_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#454934", false, "", 5) },                 // Hellcat Waistguard
  159.             { ActorSnoEnum._p6_scythe_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#475250", true, "%", 200) },          // Trag'Oul's Corroded Fang
  160.             { ActorSnoEnum._x1_bracers_norm_unique_20, new Tuple<string,bool,string,double>("Item_Power_Passive#430678", true, "%", 400) },         // Drakon's Lesson
  161.             { ActorSnoEnum._p2_ring_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#430674", true, "%", 200) },            // Convention of Elements
  162.             { ActorSnoEnum._p6_talisman_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#476584", true, "%", 30) },         // Bone Ringer
  163.             { ActorSnoEnum._bracers_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#318772", true, "%", 30) },             // Strongarm Bracers
  164.             { ActorSnoEnum._helm_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#434034", true, "%", 450) },               // Andariel's Visage
  165.             { ActorSnoEnum._barbbelt_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#484602", true, "%", 500) },           // Belt of the Trove
  166.             { ActorSnoEnum._x1_dagger_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#445274", true, "%", 400) },          // Lord Greenstone's Fan
  167.             { ActorSnoEnum._p6_twohandedscythe_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#475253", false, "p", 5) }// Reilena's Shadowhook
  168.             { ActorSnoEnum._x1_pants_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318817", true, "%", 20) },            // Hexing Pants of Mr. Yan
  169.             { ActorSnoEnum._gloves_norm_unique_078, new Tuple<string,bool,string,double>("Item_Power_Passive#318731", true, "%", 50) },             // Tasker and Theo
  170.             { ActorSnoEnum._p6_twohandedscythe_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#476587", true, "%", 100) }, // Nayr's Black Death
  171.             { ActorSnoEnum._x1_barbbelt_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#318821", true, "%", 40) },         // Chilanik's Chain
  172.             { ActorSnoEnum._x1_flail2h_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#484601", true, "%", 500) },         // The Mortal Drama
  173.             { ActorSnoEnum._p3_bracers_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#483847", true, "%", 500) },         // Bracers of Destruction
  174.             { ActorSnoEnum._quiver_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483505", true, "%", 300) },             // Sin Seekers
  175.             { ActorSnoEnum._p1_flail2h_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#488910", true, "%", 40) },          // Akkhan's Leniency
  176.             { ActorSnoEnum._spear_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#446638", true, "%", 60) },               // The Three Hundredth Spear
  177.             { ActorSnoEnum._x1_flail1h_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#478513", true, "%", 350) },         // Gyrfalcon's Foote
  178.             { ActorSnoEnum._xbow_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#478483", true, "%", 300) },               // Manticore
  179.             { ActorSnoEnum._spear_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#442477", true, "%", 50) },               // Scrimshaw
  180.             { ActorSnoEnum._p1_ceremonialdagger_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483400", true, "%", 500) },// The Dagger of Darts
  181.             { ActorSnoEnum._x1_mightyweapon_1h_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#447372", true, "%", 200) }, // Oathkeeper
  182.             { ActorSnoEnum._p3_bracers_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#441279", true, "%", 500) },         // Bracers of the First Men
  183.             { ActorSnoEnum._p4_bracers_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#444929", true, "%", 150) },         // Skular's Salvation
  184.             { ActorSnoEnum._belt_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#454918", true, "%", 50) },                // Saffron Wrap
  185.             { ActorSnoEnum._x1_belt_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#451238", true, "%", 170) },            // Khassett's Cord of Righteousness
  186.             { ActorSnoEnum._p4_bracers_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#446162", true, "%", 400) },         // Bracer of Fury
  187.             { ActorSnoEnum._p1_crushield_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#478477", true, "%", 800) },       // Frydehr's Wrath
  188.             { ActorSnoEnum._x1_sword_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#318763", true, "%", 372) },           // Thunderfury, Blessed Blade of the Windseeker
  189.             { ActorSnoEnum._shield_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318816", false, "s", 1.5) },            // Freeze of Deflection
  190.             { ActorSnoEnum._p6_scythe_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#476586", true, "%", 400) },          // Scythe of the Cycle
  191.             { ActorSnoEnum._p4_bracers_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#446008", true, "%", 500) },         // Akkhan's Manacles
  192.             { ActorSnoEnum._x1_quiver_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#486306", true, "%", 200) },          // Bombardier's Rucksack
  193.             { ActorSnoEnum._x1_xbow_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#483506", true, "%", 100) },            // Wojahnni Assaulter
  194.             { ActorSnoEnum._orb_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#434849", true, "%", 400) },                // Triumvirate
  195.             { ActorSnoEnum._p2_ring_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#478538", true, "%", 80) },             // Halo of Karini
  196.             { ActorSnoEnum._p6_boots_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#475245", true, "%", 30) },            // Bryner's Journey
  197.             { ActorSnoEnum._x1_sword_norm_unique_18, new Tuple<string,bool,string,double>("Item_Power_Passive#484709", true, "%", 150) },           // The Twisted Sword
  198.             { ActorSnoEnum._x1_wizardhat_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#484116", true, "%", 300) },       // The Magistrate /
  199.             { ActorSnoEnum._p6_gloves_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476589", true, "%", 15) },           // Moribund Gauntlets
  200.             { ActorSnoEnum._x1_bracers_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#436521", true, "%", 100) },         // Gabriel's Vambraces
  201.             { ActorSnoEnum._twohandedsword_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#478476", true, "%", 800) },     // Blade of Prophecy
  202.             { ActorSnoEnum._x1_crushield_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#478514", true, "%", 400) },       // Jekangbord
  203.             { ActorSnoEnum._p6_talisman_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#487652", true, "%", 50) },         // Iron Rose
  204.             { ActorSnoEnum._p6_helm_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#478508", true, "%", 250) },            // Fate's Vow
  205.             { ActorSnoEnum._p6_belt_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#478534", true, "%", 50) },             // Dayntee's Binding
  206.             { ActorSnoEnum._polearm_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#446592", true, "%", 500) },            // Standoff
  207.             { ActorSnoEnum._mightyweapon_2h_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#397792", false, "", 10) },     // Bastion's Revered
  208.             { ActorSnoEnum._barbbelt_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#483792", true, "%", 150) },           // Lamentation
  209.             { ActorSnoEnum._ring_norm_unique_022, new Tuple<string,bool,string,double>("Item_Power_Passive#451160", true, "%", 400) },              // Skull Grasp
  210.             { ActorSnoEnum._ring_norm_unique_005, new Tuple<string,bool,string,double>("Item_Power_Passive#447060", true, "%", 80) },               // Band of Might
  211.             { ActorSnoEnum._p4_ring_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#445694", true, "%", 300) },            // Ring of Emptiness
  212.             { ActorSnoEnum._p4_bracers_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#486131", true, "", 3) },            // Lakumba's Ornament
  213.             { ActorSnoEnum._p72_belt_norm_unique_17, new Tuple<string,bool,string,double>("Item_Power_Passive#486136", true, "%", 100) },           // Brood of Araneae
  214.             { ActorSnoEnum._x1_mojo_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#486132", true, "%", 100) },            // Shukrani's Triumph
  215.             { ActorSnoEnum._dagger_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#454932", true, "%", 500) },             // The Barber
  216.             { ActorSnoEnum._ceremonialdagger_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#486133", true, "%", 800) },   // The Spider Queen's Grasp
  217.             { ActorSnoEnum._p2_orb_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#484596", true, "%", 250) },             // Etched Sigil
  218.             { ActorSnoEnum._p4_bracers_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#447295", true, "%", 150) },         // Pinto's Pride
  219.             { ActorSnoEnum._p6_helm_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476581", true, "%", 150) },            // Mask of Scarlet Death
  220.             { ActorSnoEnum._x1_staff_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#484597", true, "%", 400) },           // Valthek's Rebuke
  221.             { ActorSnoEnum._x1_chestarmor_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318779", true, "%", 25) },       // Shi Mizu's Haori
  222.             { ActorSnoEnum._dagger_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#484600", true, "%", 350) },             // Wizardspike
  223.             { ActorSnoEnum._x1_wand_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#484117", true, "%", 300) },            // Serpent's Sparker
  224.             { ActorSnoEnum._fistweapon_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#451170", true, "%", 50) },          // Crystal Fist
  225.             { ActorSnoEnum._x1_shoulderpads_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#449236", true, "%", 50) },     // Lefebvre's Soliloquy
  226.             { ActorSnoEnum._x1_wand_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#478480", true, "%", 400) },            // Wand of Woh
  227.             { ActorSnoEnum._helm_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#487972", true, "%", 400) },               // Mempo of Twilight
  228.             { ActorSnoEnum._bracers_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#449043", true, "%", 100) },            // Ashnagarr's Blood Bracer
  229.             { ActorSnoEnum._staff_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#478553", true, "%", 400) },              // The Grand Vizier
  230.             { ActorSnoEnum._quiver_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#484313", true, "%", 100) },             // Holy Point Shot
  231.             { ActorSnoEnum._x1_dagger_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#478484", true, "%", 375) },          // Karlei's Point
  232.             { ActorSnoEnum._p3_belt_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#437854", false, "", 50) },             // Fazula's Improbable Chain
  233.             { ActorSnoEnum._x1_orb_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#318734", false, "", 2) },               // Mirrorball
  234.             { ActorSnoEnum._wand_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#451242", true, "%", 15) },                // Starfire
  235.             { ActorSnoEnum._wand_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#484599", true, "%", 30) },                // Fragment of Destiny
  236.             { ActorSnoEnum._x1_bracers_norm_unique_18, new Tuple<string,bool,string,double>("Item_Power_Passive#478491", true, "%", 300) },         // Ranslor's Folly
  237.             { ActorSnoEnum._orb_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#374308", true, "%",20) },                  // The Oculus
  238.             { ActorSnoEnum._wizardhat_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#318788", false, "s", 15) },          // Dark Mage's Shade
  239.             { ActorSnoEnum._x1_flail1h_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#483790", true, "%", 1000) },        // Darklight
  240.             { ActorSnoEnum._x1_axe_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#318869", true, "%", 100) },             // Hack
  241.             { ActorSnoEnum._x1_flail2h_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#478537", true, "%", 300) },         // Golden Flense
  242.             { ActorSnoEnum._p4_bracers_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#449031", true, "%", 800) },         // Cesar's Memento
  243.             { ActorSnoEnum._x1_bracers_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#318770", true, "%", 12) },          // Ancient Parthan Defenders
  244.             { ActorSnoEnum._p3_bracers_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#485725", true, "%", 200) },         // Bindings of the Lesser Gods
  245.             { ActorSnoEnum._x1_crushield_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#318887", true, "%", 60) },        // Hallowed Bulwark
  246.             { ActorSnoEnum._p6_ring_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#475244", true, "%", 0.95) },           // Lornelle's Sunstone
  247.             { ActorSnoEnum._x1_shield_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#436481", true, "%", 250) },          // Guard of Johanna
  248.             { ActorSnoEnum._p2_helm_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#449049", true, "%", 60) },             // Warhelm of Kassar
  249.             { ActorSnoEnum._x1_shield_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#318853", true, "%", 50) },           // Eberli Charo
  250.             { ActorSnoEnum._mace_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#364325", true, "%", 40) },                // Odyn Son
  251.             { ActorSnoEnum._p6_chestarmor_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#476579", true, "%", 100) },      // Requiem Cereplate
  252.             { ActorSnoEnum._x1_fistweapon_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#447368", true, "%", 250) },      // Kyoshiro's Blade
  253.             { ActorSnoEnum._chestarmor_norm_unique_074, new Tuple<string,bool,string,double>("Item_Power_Passive#446615", true, "%", 300) },        // Heart of Iron
  254.             { ActorSnoEnum._twohandedaxe_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483516", true, "%", 10) },        // The Executioner
  255.             { ActorSnoEnum._x1_twohandedmace_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#318753", true, "%", 50) },    // The Furnace
  256.             { ActorSnoEnum._fistweapon_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#486099", true, "%", 450) },         // Rabid Strike
  257.             { ActorSnoEnum._x1_shield_norm_unique_14, new Tuple<string,bool,string,double>("Item_Power_Passive#446142", true, "%", 30) },           // Shield of Fury
  258.             { ActorSnoEnum._x1_ring_norm_unique_027, new Tuple<string,bool,string,double>("Item_Power_Passive#318861", true, "%", 100) },           // Rogar's Huge Stone
  259.             { ActorSnoEnum._x1_spiritstone_norm_unique_16, new Tuple<string,bool,string,double>("Item_Power_Passive#486180", true, "%", 50) },      // Eye of Peshkov
  260.             { ActorSnoEnum._barbbelt_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#484245", true, "%", 400) },           // The Undisputed Champion
  261.             { ActorSnoEnum._p6_ring_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#475247", false, "s", 4) },             // Circle of Nailuj's Evol
  262.             { ActorSnoEnum._barbbelt_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#451163", true, "%", 300) },           // Bakuli Jungle Wraps
  263.             { ActorSnoEnum._combatstaff_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318776", true, "%", 550) },        // Incense Torch of the Grand Temple
  264.             { ActorSnoEnum._boots_norm_set_01, new Tuple<string,bool,string,double>("Item_Power_Passive#478554", true, "%", 900) },                 // Nilfur's Boast
  265.             { ActorSnoEnum._p3_belt_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#71548", false, "p", 12) },             // The Shame of Delsere
  266.             { ActorSnoEnum._x1_sword_norm_unique_23, new Tuple<string,bool,string,double>("Item_Power_Passive#449063", true, "%", 325) },           // Deathwish
  267.             { ActorSnoEnum._x1_staff_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#487677", true, "%", 50) },            // The Smoldering Core
  268.  
  269.         };
  270.  
  271.         public ItemPowerShow()
  272.         {
  273.           Enabled = true;
  274.         }
  275.  
  276.         public override void Load(IController hud)
  277.         {
  278.             base.Load(hud);
  279.             Order = 150000;
  280.  
  281.             ShowInLegendary = true;
  282.             ShowInAncient = true;
  283.             ShowInPrimal = true;
  284.             ShowOnUnidentifiedOnly = false;
  285.             ShowInStash = true;                 // Inventory and Stash or only Inventory
  286.             TextMaxValue = "Max";               // Ex: "Max". Set to null for numeric value
  287.             NumericTextMaxValue = "[{0}{1}]";   // Format for TextMaxValue when is null // {0} numeric value , {1| -> suffix
  288.             xPor = 0.50f;                       // Item pos X  0 ... 1
  289.             yPor = 0.64f;                       // Item pos Y  0 ... 1 // items width == height (ring,amulet,belt ..)
  290.             yPorLarge = 0.77f;                  // Item pos Y  0 ... 1 // items width != height
  291.             centered = true;                    // Center text at that position X,Y
  292.  
  293.             LegendaryAffixFont = Hud.Render.CreateFont("arial", 7.5f, 255, 255, 255, 0, false, false, 250, 0, 0, 0, true);
  294.             //LegendaryAffixFontMax = Hud.Render.CreateFont("arial", 7.5f, 255, 255, 255, 0, true, false, 250, 0, 0, 0, true);
  295.             LegendaryAffixFontMax = LegendaryAffixFont;
  296.             AncientAffixFont = Hud.Render.CreateFont("arial", 7.5f, 255, 0, 255, 0, false, false, 250, 0, 0, 0, true);
  297.             //AncientAffixFontMax = Hud.Render.CreateFont("arial", 7.5f, 255, 0, 255, 0, true, false, 250, 0, 0, 0, true);
  298.             AncientAffixFontMax = AncientAffixFont;
  299.             PrimalAffixFont = Hud.Render.CreateFont("arial", 7.5f, 255, 255, 55, 55, false, false, 180, 0, 0, 0, true);
  300.             ItemDecorator = new GroundLabelDecorator(Hud)
  301.             {
  302.                 TextFont = Hud.Render.CreateFont("consolas", 8, 255, 255, 255, 255, true, false, false),
  303.                 OffsetY = -80.0f
  304.             };
  305.         }
  306.  
  307.         public double ItemIdValue(IItem item, string id = "", bool percent = true)          // a) ItemIdValue(item1);                                                       => Use default ID and percentage for this item, extracted from the dictionary
  308.         {                                                                                   // b) ItemIdValue(item2, id = "Item_Power_Passive#475241");                     => Find the specified ID and multiply the value by 100 (default behavior)
  309.             if (id == string.Empty)                                                         // c) ItemIdValue(item3, id = "Item_Power_Passive#475241", percent = false);    => Searches for the specified ID and does not multiply by 100
  310.             {                                                                               // Function return 0 if the specified ID/Stat does not exist, or double.MaxValue if the ID was omitted and the item does not exist in the dictionary
  311.                 if (Sno_IdPercent.TryGetValue(item.SnoActor.Sno,out var data))
  312.                 {
  313.                     id = data.Item1;  percent = data.Item2;                                 //  < item.SnoActor.Sno, Tuple<STAT.Id, multiply x 100, Suffix, MaxValue> >
  314.                 }
  315.                 else return double.MaxValue; // queries in the Dictionary, but the item does not exist
  316.             }
  317.             var stat = item.StatList.FirstOrDefault(s => s.Id == id);
  318.             if (stat != null)
  319.             {
  320.                 return Math.Round(stat.DoubleValue * (percent?10000:100))/100;
  321.             }
  322.             else return 0;  // stat (id) not found in item
  323.         }
  324.  
  325.         public void PaintTopInGame(ClipState clipState)
  326.         {
  327.             if (!Hud.Game.IsInGame )  return;
  328.  
  329.             if (clipState == ClipState.Inventory)
  330.             {
  331.                 if (Hud.Inventory.InventoryMainUiElement.Visible)
  332.                 {
  333.                     int stashTabAbs = Hud.Inventory.SelectedStashTabIndex + (Hud.Inventory.SelectedStashPageIndex * Hud.Inventory.MaxStashTabCountPerPage);
  334.  
  335.                     var items = Hud.Game.Items.Where(x => x.Location == ItemLocation.Inventory || (x.Location == ItemLocation.Stash && Hud.Inventory.StashMainUiElement.Visible && ShowInStash && stashTabAbs == x.InventoryY/10));
  336.                     foreach (var item in items)
  337.                     {
  338.                         if (ShowOnUnidentifiedOnly && !item.Unidentified)   continue;
  339.                         if (item.InventoryX < 0 || item.InventoryY < 0)   continue;
  340.  
  341.                         if (Sno_IdPercent.TryGetValue(item.SnoActor.Sno, out var data)) // data.Item1 = STAT.Id , data.Item2 = percent (multiply x 100), data.Item3 = Suffix(Ex: "%", "s", "p", ""), data.Item4 = MaxValue Item Power
  342.                         {
  343.                             var rect = Hud.Inventory.GetItemRect(item);
  344.                             var stat = item.StatList.FirstOrDefault(s => s.Id == data.Item1);
  345.                             if (stat != null)
  346.                             {
  347.                                 double val;
  348.                                 if (item.SnoActor.Sno == ActorSnoEnum._helm_norm_unique_01 && data.Item1 == "Gem_Attributes_Multiplier#1048575") val = Math.Round(stat.DoubleValue * 100);  // Special case, even the itempower doesn't staRt with Item_Power_Passive#
  349.                                 else val = Math.Round(stat.DoubleValue * (data.Item2?10000:100))/100;
  350.                                 string valText = string.Empty;
  351.                                 if (item.AncientRank == 2)
  352.                                 {
  353.                                     if (!ShowInPrimal) continue;
  354.                                     DefaultFont = PrimalAffixFont;
  355.                                     valText = TextMaxValue ?? (val + data.Item3);
  356.                                 }
  357.                                 else if (item.AncientRank == 1)
  358.                                 {
  359.                                     if (!ShowInAncient) continue;
  360.                                     if (val == data.Item4) { DefaultFont = AncientAffixFontMax; valText = TextMaxValue ?? string.Format(NumericTextMaxValue, val, data.Item3); }
  361.                                     else { DefaultFont = AncientAffixFont; valText = val + data.Item3; }
  362.                                 }
  363.                                 else
  364.                                 {
  365.                                     if (!ShowInLegendary) continue;
  366.                                     if (val == data.Item4) { DefaultFont = LegendaryAffixFontMax; valText = TextMaxValue ?? string.Format(NumericTextMaxValue, val, data.Item3); }
  367.                                     else { DefaultFont = LegendaryAffixFont; valText = val + data.Item3; }
  368.                                 }
  369.                                 var layout = DefaultFont.GetTextLayout(valText);
  370.                                 if (centered)
  371.                                 {
  372.                                     if (item.SnoItem.ItemWidth == item.SnoItem.ItemHeight)  DefaultFont.DrawText(layout, rect.X + rect.Width * xPor - layout.Metrics.Width/2.0f, rect.Y + rect.Height * yPor - layout.Metrics.Height/2.0f);
  373.                                     else DefaultFont.DrawText(layout, rect.X + rect.Width * xPor - layout.Metrics.Width/2.0f, rect.Y + rect.Height * yPorLarge - layout.Metrics.Height/2.0f);
  374.                                 }
  375.                                 else
  376.                                 {
  377.                                     if (item.SnoItem.ItemWidth == item.SnoItem.ItemHeight)      DefaultFont.DrawText(layout, rect.X + rect.Width * xPor, rect.Y + rect.Height * yPor);
  378.                                     else    DefaultFont.DrawText(layout, rect.X + rect.Width * xPor, rect.Y + rect.Height * yPorLarge);
  379.                                 }
  380.                             }
  381.                         }
  382.                     }
  383.                 }
  384.             }
  385.  
  386.             else if (clipState == ClipState.AfterClip)
  387.             {
  388.                 if (DebugOn && Hud.Input.IsKeyDown(Keys.LMenu) && Hud.Input.IsKeyDown(Keys.A))  // Left Alt + A with the cursor near an item on the floor to display its data and save it in the log "ItemsId" (only save each item oNce unless we toggle between items)
  389.                 {
  390.                     var cursor = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX, Hud.Window.CursorY).ToWorldCoordinate();
  391.                     var item = Hud.Game.Items.Where(i => (i.Location == ItemLocation.Floor) && i.IsOnScreen).OrderBy(o => o.FloorCoordinate.XYDistanceTo(cursor)).FirstOrDefault();
  392.                     if (item != null)
  393.                     {
  394.                         if (ItemOld != item)
  395.                         {
  396.                             ItemOld = item; logItemsId = true;
  397.                             Hud.TextLog.Log("ItemsId", string.Format("/{1} -------------------------------------------------- [{0}] ---------------------------------------------------------- {1}/", item.FullNameLocalized, "*"),false,true);
  398.                             Hud.TextLog.Log("ItemsId", string.Format(" [  ITEM => Name: \"{0}\" / Code: Hud.Sno.SnoItems.{1} / Sno: ActorSnoEnum.{2} ({3})  ]", item.SnoItem.NameEnglish, item.SnoItem.Code, item.SnoActor.Sno, (uint)item.SnoActor.Sno),false,true);
  399.                             //Hud.TextLog.Log("ItemsId", string.Format(" Width {0} , Height {1}  ]", item.SnoItem.ItemWidth, item.SnoItem.ItemHeight),false,true);
  400.  
  401.                         }
  402.                         else if (logItemsId) logItemsId = false;
  403.  
  404.                         string regexcad = @"(Item_Power_Passive|Gem_Attributes_Multiplier|Crit)"; // Display Stat/IDs coNtaining any of these strings (separated by "|", option IgnoreCase)
  405.                         string cad = string.Empty;
  406.                         foreach (var stat in item.StatList.Where(s => s.Id != null))
  407.                         {
  408.                             if (Regex.IsMatch(stat.Id,regexcad, RegexOptions.IgnoreCase))
  409.                             {
  410.                                 cad += "\n" + stat.Id + ": " + stat.DoubleValue + " (percent:" + (Math.Round(stat.DoubleValue * 10000)/100) + ")";
  411.                                 if (Sno_IdPercent.TryGetValue(item.SnoActor.Sno, out var data) && data.Item1 == stat.Id)
  412.                                 {
  413.                                     cad += string.Format("\t [Id={0}, percent={1}, Suffix={2}, MaxValue={3}]", data.Item1, data.Item2, data.Item3, data.Item4);
  414.                                 }
  415.                             }
  416.                             if (logItemsId)
  417.                             {
  418.                                 Hud.TextLog.Log("ItemsId", string.Format("Code: {0,-50} Id: {1,-55} Value: {2,-25} {3,25}",
  419.                                 (stat.Attribute == null)?"NONE":stat.Attribute.Code, stat.Id, stat.DoubleValue, stat.Id.StartsWith("Item_Power_Passive#")?"/+ --- Item Power --- +/":""),false,true);
  420.                             }
  421.                         }
  422.                         ItemDecorator.Paint(item, item.FloorCoordinate,
  423.                                 string.Format("SnoItem.Code:Hud.Sno.SnoItems.{0} \nSnoActor.Sno:ActorSnoEnum.{1} (uint:{6}) \nSnoItem.Kind:{2} \nIs:{7} , Quality:{3} , AncientRank:{4} \n{5} ",
  424.                                     item.SnoItem.Code, item.SnoActor.Sno, item.SnoItem.Kind, item.Quality, item.AncientRank, cad, (uint) item.SnoActor.Sno, ((item.IsNormal?"N":"-") + (item.IsRare?"R":"-") + (item.IsMagic?"M":"-") + (item.IsLegendary?"L":"-"))
  425.                         )   );
  426.                     }
  427.                 }
  428.             }
  429.         }
  430.     }
  431. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement