Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Turbo.Plugins.Default;
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Windows.Forms;
- namespace Turbo.Plugins.Ez
- {
- public class ItemPowerShow : BasePlugin, IInGameTopPainter
- {
- public bool DebugOn { get; set; } = false;
- public string NumericTextMaxValue { get; set; }
- public GroundLabelDecorator ItemDecorator { get; set; }
- private IItem ItemOld { get; set; } = null;
- private bool logItemsId { get; set; } = false;
- public IFont PrimalAffixFont { get; set; }
- public IFont AncientAffixFont { get; set; }
- public IFont AncientAffixFontMax { get; set; }
- public IFont LegendaryAffixFont { get; set; }
- public IFont LegendaryAffixFontMax { get; set; }
- public IFont DefaultFont { get; set; }
- public bool ShowInLegendary { get; set; }
- public bool ShowInAncient { get; set; }
- public bool ShowInPrimal { get; set; }
- public bool ShowOnUnidentifiedOnly { get; set; }
- public bool ShowInStash { get; set; } = true;
- public string TextMaxValue { get; set; }
- public float xPor { get; set; }
- public float yPor { get; set; }
- public float yPorLarge { get; set; }
- public bool centered { get; set; }
- 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> >
- {
- { ActorSnoEnum._ring_norm_unique_004, new Tuple<string,bool,string,double>("Item_Power_Passive#318375", false, "", 16) }, // Puzzle Ring
- { ActorSnoEnum._amulet_norm_unique_13, new Tuple<string,bool,string,double>("Item_Power_Passive#318719", true, "%", 15) }, // Mara's Kaleidoscope
- { ActorSnoEnum._x1_flail1h_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#359538", true, "%", 20) }, // Kassar's Retribution
- { ActorSnoEnum._x1_amulet_norm_unique_23, new Tuple<string,bool,string,double>("Item_Power_Passive#318867", true, "%", 25) }, // Dovu Energy Trap
- { ActorSnoEnum._x1_amulet_norm_unique_24, new Tuple<string,bool,string,double>("Item_Power_Passive#318410", true, "%", 4) }, // Rakoff's Glass of Life
- { ActorSnoEnum._amulet_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#318718", true, "%", 15) }, // Xephirian Amulet
- { 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
- { ActorSnoEnum._ring_norm_unique_018, new Tuple<string,bool,string,double>("Item_Power_Passive#402460", false, "s", 12) }, // Nagelring
- { ActorSnoEnum._axe_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#433993", true, "%", 20) }, // Sky Splitter
- { ActorSnoEnum._bracers_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#318871", true, "%", 6) }, // Promise of Glory
- { ActorSnoEnum._twohandedsword_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#364321", true, "%", 45) }, // Scourge
- { ActorSnoEnum._p2_twohandedsword_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#402455", false, "%", 6000) }, // Corrupted Ashbringer
- { ActorSnoEnum._x1_mace_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#318873", true, "%", 4) }, // Solanium
- { ActorSnoEnum._amulet_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#318716", true, "%", 15) }, // The Star of Azkaranth
- { ActorSnoEnum._barbbelt_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#364341", true, "%", 130) }, // Thundergod's Vigor
- { ActorSnoEnum._amulet_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#318715", true, "%", 15) }, // Talismán de Aranoch
- { ActorSnoEnum._x1_amulet_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#334880", false, "", 6) }, // Golden Gorget of Leoric
- { ActorSnoEnum._x1_belt_norm_unique_16, new Tuple<string,bool,string,double>("Item_Power_Passive#434038", true, "%", 650) }, // Sash of Knives
- { ActorSnoEnum._boots_norm_unique_085, new Tuple<string,bool,string,double>("Item_Power_Passive#434010", true, "%", 400) }, // Fire Walkers
- { ActorSnoEnum._twohandedmace_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318757", true, "%", 4) }, // Arthef's Spark of Life
- { ActorSnoEnum._x1_mace_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#318359", true, "%", 1400) }, // Mad Monarch's Scepter
- { ActorSnoEnum._x1_crushield_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#318829", true, "%", 30) }, // Salvation
- { ActorSnoEnum._x1_sword_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#441681", true, "%", 555) }, // Fulminator
- { ActorSnoEnum._x1_twohandedsword_norm_unique_13, new Tuple<string,bool,string,double>("Item_Power_Passive#402456", true, "%", 20) }, // Blood Brother
- { ActorSnoEnum._p2_dagger_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#402457", true, "%", 20) }, // Eun-jang-do
- { ActorSnoEnum._x1_belt_norm_unique_19, new Tuple<string,bool,string,double>("Item_Power_Passive#318881", true, "%", 135) }, // Harrington Waistguard
- { ActorSnoEnum._x1_belt_norm_unique_18, new Tuple<string,bool,string,double>("Item_Power_Passive#434008", false, "s", 4) }, // Cord of the Sherma
- { ActorSnoEnum._p2_ring_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#359598", true, "%", 1500) }, // Arcstone
- { ActorSnoEnum._x1_twohandedsword_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#318412", true, "%", 700) }, // Stalgard's Decimator
- { ActorSnoEnum._shoulderpads_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#434005", true, "%", 35) }, // Death Watch Mantle
- { ActorSnoEnum._x1_belt_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#318241", true, "%", 400) }, // Razor Strop
- { ActorSnoEnum._x1_helm_norm_unique_14, new Tuple<string,bool,string,double>("Item_Power_Passive#318857", true, "%", 20) }, // Deathseer's Cowl
- { ActorSnoEnum._twohandedmace_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#434033", true, "%", 850) }, // Schaefer's Hammer
- { ActorSnoEnum._quiver_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#451169", true, "%", 250) }, // Augustine's Panacea
- { ActorSnoEnum._x1_boots_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#318877", true, "%", 30) }, // Irontoe Mudsputters
- { ActorSnoEnum._x1_pants_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#318827", true, "%", 1000) }, // Death's Bargain
- { ActorSnoEnum._x1_shield_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#318747", true, "%", 60) }, // Coven's Criterion
- { ActorSnoEnum._x1_twohandedmace_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#318826", true, "%", 600) }, // Soulsmasher
- { ActorSnoEnum._x1_sword_norm_promo_02, new Tuple<string,bool,string,double>("Item_Power_Passive#359587", true, "%", 250) }, // Shard of Hate
- { ActorSnoEnum._pants_norm_unique_048, new Tuple<string,bool,string,double>("Item_Power_Passive#434009", true, "%", 550) }, // Pox Faulds
- { ActorSnoEnum._x1_amulet_norm_unique_19, new Tuple<string,bool,string,double>("Item_Power_Passive#318381", true, "%", 25) }, // Countess Julia's Cameo
- { ActorSnoEnum._axe_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#248484", true, "%", 25) }, // The Butcher's Sickle
- { ActorSnoEnum._x1_shield_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#434004", true, "%", 1000) }, // Defender of Westmarch
- { ActorSnoEnum._shield_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#435016", true, "%", 125) }, // Denial
- { ActorSnoEnum._x1_ring_norm_unique_026, new Tuple<string,bool,string,double>("Item_Power_Passive#434036", true, "%", 35) }, // Wyrdward
- { ActorSnoEnum._x1_belt_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#318800", true, "%", 80) }, // Hwoj Wrap
- { ActorSnoEnum._pants_norm_unique_077, new Tuple<string,bool,string,double>("Item_Power_Passive#446502", true, "%", 400) }, // Hammer Jammers
- { ActorSnoEnum._p3_bracers_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#441278", true, "%", 100) }, // Jeram's Bracers
- { ActorSnoEnum._p610_mojo_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#484655", true, "%", 150) }, // Ursua's Trodden Effigy
- { ActorSnoEnum._shoulderpads_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#397783", true, "%", 35) }, // Vile Ward
- { ActorSnoEnum._x1_axe_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#447029", false, "p", 125) }, // Mordullu's Promise
- { ActorSnoEnum._spear_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#486951", true, "%", 200) }, // Arreat's Law
- { ActorSnoEnum._x1_handxbow_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#318828", true, "%", 10) }, // Helltrapper
- { ActorSnoEnum._x1_twohandedaxe_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#484604", true, "%", 800) }, // Blade of the Tribes
- { ActorSnoEnum._p6_twohandedscythe_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#475246", true, "%", 700) }, // Maltorius
- { ActorSnoEnum._p6_pants_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#485506", true, "%", 500) }, // Defiler Cuisses
- { ActorSnoEnum._p6_pants_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#478510", false, "s", 25) }, // Golemskin Breeches
- { ActorSnoEnum._p6_shoulderpads_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476580", true, "%", 75) }, // Corpsewhisper Pauldrons
- { ActorSnoEnum._p6_chestarmor_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476585", true, "%", 125) }, // Bloodsong Mail
- { ActorSnoEnum._p6_twohandedscythe_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#475251", true, "%", 400) }, // Bloodtide Blade
- { ActorSnoEnum._p6_amulet_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#476583", true, "%", 200) }, // The Johnstone
- { ActorSnoEnum._p6_spear_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#475254", true, "%", 15) }, // Spear of Jairo
- { ActorSnoEnum._p610_bracers_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#484588", true, "%", 400) }, // Gelmindor's Marrow Guards
- { ActorSnoEnum._p6_shoulderpads_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#484311", true, "%", 50) }, // Razeth's Volition
- { ActorSnoEnum._p6_talisman_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#476684", true, "%", 10) }, // Lost Time
- { ActorSnoEnum._p6_talisman_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#476696", true, "%", 80) }, // Leger's Disdain
- { ActorSnoEnum._p6_gloves_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#484310", true, "%", 200) }, // Grasps of Essence
- { ActorSnoEnum._p6_boots_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#475243", true, "%", 100) }, // Steuart's Greaves
- { ActorSnoEnum._p1_belt_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#359554", true, "%", 4000) }, // Crashing Rain
- { ActorSnoEnum._x1_barbbelt_norm_unique_14, new Tuple<string,bool,string,double>("Item_Power_Passive#446639", true, "%", 9) }, // Zoey's Secret
- { ActorSnoEnum._p4_bracers_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#447839", true, "%", 6) }, // Vambraces of Sescheron
- { ActorSnoEnum._p7_bracers_norm_unique_23, new Tuple<string,bool,string,double>("Item_Power_Passive#485504", true, "%", 100) }, // Bonds of C'Lena
- { ActorSnoEnum._boots_norm_unique_075, new Tuple<string,bool,string,double>("Item_Power_Passive#485724", true, "%", 200) }, // The Crudest Boots
- { ActorSnoEnum._x1_bracers_norm_unique_19, new Tuple<string,bool,string,double>("Item_Power_Passive#430289", true, "%", 60) }, // Spirit Guards
- { ActorSnoEnum._fistweapon_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#484106", true, "%", 600) }, // Won Khim Lau
- { ActorSnoEnum._spiritstone_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#318426", true, "%", 1400) }, // Gyana Na Kashu
- { ActorSnoEnum._p3_belt_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#440598", true, "%", 5) }, // Binding of the Lost
- { ActorSnoEnum._p1_fistweapon_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483791", true, "%", 800) }, // Vengeful Wind
- { ActorSnoEnum._mojo_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#484270", true, "%", 150) }, // Gazing Demise
- { ActorSnoEnum._helm_norm_unique_01, new Tuple<string,bool,string,double>("Gem_Attributes_Multiplier#1048575", true, "%", 100) }, // Leoric's Crown
- { ActorSnoEnum._sword_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#441723", true, "%", 650) }, // Azurewrath
- { ActorSnoEnum._p3_bracers_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#440790", false, "", 80000) }, // Coils of the First Spider
- { ActorSnoEnum._x1_quiver_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#484295", true, "%", 600) }, // The Ninth Cirri Satchel
- { ActorSnoEnum._p2_handxbow_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#447816", true, "%", 3) }, // Fortress Ballista
- { ActorSnoEnum._x1_bow_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#478485", true, "%", 200) }, // Yang's Recurve
- { ActorSnoEnum._p4_ring_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#446187", true, "%", 60) }, // Elusive Ring
- { ActorSnoEnum._handxbow_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#446146", true, "%", 65) }, // Dawn
- { ActorSnoEnum._x1_ring_norm_unique_028, new Tuple<string,bool,string,double>("Item_Power_Passive#318870", true, "%", 60) }, // Rechel's Ring of Larceny
- { ActorSnoEnum._p3_bracers_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#441517", true, "%", 50) }, // Wraps of Clarity
- { ActorSnoEnum._p2_belt_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#440743", true, "%", 200) }, // Hunter's Wrath
- { ActorSnoEnum._p2_orb_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#478481", true, "%", 10) }, // Orb of Infinite Depth
- { ActorSnoEnum._ring_norm_unique_008, new Tuple<string,bool,string,double>("Item_Power_Passive#446565", true, "%", 55) }, // Justice Lantern
- { ActorSnoEnum._x1_flail2h_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#478478", true, "%", 500) }, // Fate of the Fell
- { ActorSnoEnum._x1_crushield_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#318888", true, "%", 25) }, // Akarat's Awakening
- { ActorSnoEnum._twohandedsword_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#454927", true, "%", 80) }, // Faithful Memory
- { ActorSnoEnum._ring_norm_unique_017, new Tuple<string,bool,string,double>("Item_Power_Passive#402461", true, "%", 85) }, // Oculus Ring
- { ActorSnoEnum._boots_norm_unique_045, new Tuple<string,bool,string,double>("Item_Power_Passive#447043", true, "%", 300) }, // Rivera Dancers
- { ActorSnoEnum._gloves_norm_unique_044, new Tuple<string,bool,string,double>("Item_Power_Passive#451166", true, "%", 20) }, // Magefist
- { ActorSnoEnum._quiver_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#478486", true, "%", 200) }, // Dead Man's Legacy
- { ActorSnoEnum._p6_scythe_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#487651", true, "%", 300) }, // Funerary Pick
- { ActorSnoEnum._p2_sword_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#402458", false, "s", 10) }, // In-geom
- { ActorSnoEnum._belt_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#446541", true, "%", 30) }, // String of Ears
- { ActorSnoEnum._pants_norm_unique_044, new Tuple<string,bool,string,double>("Item_Power_Passive#402416", true, "%", 100) }, // Depth Diggers
- { ActorSnoEnum._x1_belt_norm_unique_20, new Tuple<string,bool,string,double>("Item_Power_Passive#318795", true, "%", 80) }, // Jang's Envelopment
- { ActorSnoEnum._x1_gloves_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#434007", true, "%", 150) }, // St. Archew's Gage
- { ActorSnoEnum._mojo_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318721", true, "%", 30) }, // Uhkapian Serpent
- { ActorSnoEnum._p2_shoulderpads_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#446640", true, "%", 25) }, // Mantle of Channeling
- { ActorSnoEnum._wizardhat_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#440336", false, "s", 20) }, // The Swami
- { ActorSnoEnum._chestarmor_norm_unique_047, new Tuple<string,bool,string,double>("Item_Power_Passive#449064", true, "%", 90) }, // Aquila Cuirass
- { ActorSnoEnum._gloves_norm_unique_043, new Tuple<string,bool,string,double>("Item_Power_Passive#451167", true, "%", 20) }, // Frostburn
- { ActorSnoEnum._chestarmor_norm_unique_049, new Tuple<string,bool,string,double>("Item_Power_Passive#318790", true, "%", 30) }, // Cindercoat
- { ActorSnoEnum._shoulderpads_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318801", true, "%", 65) }, // Homing Pads
- { ActorSnoEnum._barbbelt_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#318419", false, "s", 6) }, // Pride of Cassius
- { ActorSnoEnum._p6_ring_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#475241", true, "%", 100) }, // Krysbin's Sentence
- { ActorSnoEnum._ring_norm_unique_009, new Tuple<string,bool,string,double>("Item_Power_Passive#429648", true, "%", 60) }, // Halo of Arlyse
- { ActorSnoEnum._x1_bow_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#484297", true, "%", 150) }, // Odyssey's End
- { ActorSnoEnum._x1_amulet_norm_unique_20, new Tuple<string,bool,string,double>("Item_Power_Passive#318759", true, "%", 80) }, // The Ess of Johan
- { ActorSnoEnum._belt_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#454934", false, "", 5) }, // Hellcat Waistguard
- { ActorSnoEnum._p6_scythe_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#475250", true, "%", 200) }, // Trag'Oul's Corroded Fang
- { ActorSnoEnum._x1_bracers_norm_unique_20, new Tuple<string,bool,string,double>("Item_Power_Passive#430678", true, "%", 400) }, // Drakon's Lesson
- { ActorSnoEnum._p2_ring_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#430674", true, "%", 200) }, // Convention of Elements
- { ActorSnoEnum._p6_talisman_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#476584", true, "%", 30) }, // Bone Ringer
- { ActorSnoEnum._bracers_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#318772", true, "%", 30) }, // Strongarm Bracers
- { ActorSnoEnum._helm_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#434034", true, "%", 450) }, // Andariel's Visage
- { ActorSnoEnum._barbbelt_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#484602", true, "%", 500) }, // Belt of the Trove
- { ActorSnoEnum._x1_dagger_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#445274", true, "%", 400) }, // Lord Greenstone's Fan
- { ActorSnoEnum._p6_twohandedscythe_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#475253", false, "p", 5) }, // Reilena's Shadowhook
- { ActorSnoEnum._x1_pants_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318817", true, "%", 20) }, // Hexing Pants of Mr. Yan
- { ActorSnoEnum._gloves_norm_unique_078, new Tuple<string,bool,string,double>("Item_Power_Passive#318731", true, "%", 50) }, // Tasker and Theo
- { ActorSnoEnum._p6_twohandedscythe_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#476587", true, "%", 100) }, // Nayr's Black Death
- { ActorSnoEnum._x1_barbbelt_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#318821", true, "%", 40) }, // Chilanik's Chain
- { ActorSnoEnum._x1_flail2h_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#484601", true, "%", 500) }, // The Mortal Drama
- { ActorSnoEnum._p3_bracers_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#483847", true, "%", 500) }, // Bracers of Destruction
- { ActorSnoEnum._quiver_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483505", true, "%", 300) }, // Sin Seekers
- { ActorSnoEnum._p1_flail2h_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#488910", true, "%", 40) }, // Akkhan's Leniency
- { ActorSnoEnum._spear_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#446638", true, "%", 60) }, // The Three Hundredth Spear
- { ActorSnoEnum._x1_flail1h_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#478513", true, "%", 350) }, // Gyrfalcon's Foote
- { ActorSnoEnum._xbow_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#478483", true, "%", 300) }, // Manticore
- { ActorSnoEnum._spear_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#442477", true, "%", 50) }, // Scrimshaw
- { ActorSnoEnum._p1_ceremonialdagger_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483400", true, "%", 500) },// The Dagger of Darts
- { ActorSnoEnum._x1_mightyweapon_1h_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#447372", true, "%", 200) }, // Oathkeeper
- { ActorSnoEnum._p3_bracers_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#441279", true, "%", 500) }, // Bracers of the First Men
- { ActorSnoEnum._p4_bracers_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#444929", true, "%", 150) }, // Skular's Salvation
- { ActorSnoEnum._belt_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#454918", true, "%", 50) }, // Saffron Wrap
- { ActorSnoEnum._x1_belt_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#451238", true, "%", 170) }, // Khassett's Cord of Righteousness
- { ActorSnoEnum._p4_bracers_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#446162", true, "%", 400) }, // Bracer of Fury
- { ActorSnoEnum._p1_crushield_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#478477", true, "%", 800) }, // Frydehr's Wrath
- { ActorSnoEnum._x1_sword_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#318763", true, "%", 372) }, // Thunderfury, Blessed Blade of the Windseeker
- { ActorSnoEnum._shield_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318816", false, "s", 1.5) }, // Freeze of Deflection
- { ActorSnoEnum._p6_scythe_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#476586", true, "%", 400) }, // Scythe of the Cycle
- { ActorSnoEnum._p4_bracers_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#446008", true, "%", 500) }, // Akkhan's Manacles
- { ActorSnoEnum._x1_quiver_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#486306", true, "%", 200) }, // Bombardier's Rucksack
- { ActorSnoEnum._x1_xbow_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#483506", true, "%", 100) }, // Wojahnni Assaulter
- { ActorSnoEnum._orb_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#434849", true, "%", 400) }, // Triumvirate
- { ActorSnoEnum._p2_ring_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#478538", true, "%", 80) }, // Halo of Karini
- { ActorSnoEnum._p6_boots_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#475245", true, "%", 30) }, // Bryner's Journey
- { ActorSnoEnum._x1_sword_norm_unique_18, new Tuple<string,bool,string,double>("Item_Power_Passive#484709", true, "%", 150) }, // The Twisted Sword
- { ActorSnoEnum._x1_wizardhat_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#484116", true, "%", 300) }, // The Magistrate /
- { ActorSnoEnum._p6_gloves_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476589", true, "%", 15) }, // Moribund Gauntlets
- { ActorSnoEnum._x1_bracers_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#436521", true, "%", 100) }, // Gabriel's Vambraces
- { ActorSnoEnum._twohandedsword_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#478476", true, "%", 800) }, // Blade of Prophecy
- { ActorSnoEnum._x1_crushield_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#478514", true, "%", 400) }, // Jekangbord
- { ActorSnoEnum._p6_talisman_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#487652", true, "%", 50) }, // Iron Rose
- { ActorSnoEnum._p6_helm_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#478508", true, "%", 250) }, // Fate's Vow
- { ActorSnoEnum._p6_belt_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#478534", true, "%", 50) }, // Dayntee's Binding
- { ActorSnoEnum._polearm_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#446592", true, "%", 500) }, // Standoff
- { ActorSnoEnum._mightyweapon_2h_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#397792", false, "", 10) }, // Bastion's Revered
- { ActorSnoEnum._barbbelt_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#483792", true, "%", 150) }, // Lamentation
- { ActorSnoEnum._ring_norm_unique_022, new Tuple<string,bool,string,double>("Item_Power_Passive#451160", true, "%", 400) }, // Skull Grasp
- { ActorSnoEnum._ring_norm_unique_005, new Tuple<string,bool,string,double>("Item_Power_Passive#447060", true, "%", 80) }, // Band of Might
- { ActorSnoEnum._p4_ring_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#445694", true, "%", 300) }, // Ring of Emptiness
- { ActorSnoEnum._p4_bracers_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#486131", true, "", 3) }, // Lakumba's Ornament
- { ActorSnoEnum._p72_belt_norm_unique_17, new Tuple<string,bool,string,double>("Item_Power_Passive#486136", true, "%", 100) }, // Brood of Araneae
- { ActorSnoEnum._x1_mojo_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#486132", true, "%", 100) }, // Shukrani's Triumph
- { ActorSnoEnum._dagger_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#454932", true, "%", 500) }, // The Barber
- { ActorSnoEnum._ceremonialdagger_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#486133", true, "%", 800) }, // The Spider Queen's Grasp
- { ActorSnoEnum._p2_orb_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#484596", true, "%", 250) }, // Etched Sigil
- { ActorSnoEnum._p4_bracers_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#447295", true, "%", 150) }, // Pinto's Pride
- { ActorSnoEnum._p6_helm_norm_unique_21, new Tuple<string,bool,string,double>("Item_Power_Passive#476581", true, "%", 150) }, // Mask of Scarlet Death
- { ActorSnoEnum._x1_staff_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#484597", true, "%", 400) }, // Valthek's Rebuke
- { ActorSnoEnum._x1_chestarmor_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318779", true, "%", 25) }, // Shi Mizu's Haori
- { ActorSnoEnum._dagger_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#484600", true, "%", 350) }, // Wizardspike
- { ActorSnoEnum._x1_wand_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#484117", true, "%", 300) }, // Serpent's Sparker
- { ActorSnoEnum._fistweapon_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#451170", true, "%", 50) }, // Crystal Fist
- { ActorSnoEnum._x1_shoulderpads_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#449236", true, "%", 50) }, // Lefebvre's Soliloquy
- { ActorSnoEnum._x1_wand_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#478480", true, "%", 400) }, // Wand of Woh
- { ActorSnoEnum._helm_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#487972", true, "%", 400) }, // Mempo of Twilight
- { ActorSnoEnum._bracers_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#449043", true, "%", 100) }, // Ashnagarr's Blood Bracer
- { ActorSnoEnum._staff_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#478553", true, "%", 400) }, // The Grand Vizier
- { ActorSnoEnum._quiver_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#484313", true, "%", 100) }, // Holy Point Shot
- { ActorSnoEnum._x1_dagger_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#478484", true, "%", 375) }, // Karlei's Point
- { ActorSnoEnum._p3_belt_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#437854", false, "", 50) }, // Fazula's Improbable Chain
- { ActorSnoEnum._x1_orb_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#318734", false, "", 2) }, // Mirrorball
- { ActorSnoEnum._wand_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#451242", true, "%", 15) }, // Starfire
- { ActorSnoEnum._wand_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#484599", true, "%", 30) }, // Fragment of Destiny
- { ActorSnoEnum._x1_bracers_norm_unique_18, new Tuple<string,bool,string,double>("Item_Power_Passive#478491", true, "%", 300) }, // Ranslor's Folly
- { ActorSnoEnum._orb_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#374308", true, "%",20) }, // The Oculus
- { ActorSnoEnum._wizardhat_norm_unique_05, new Tuple<string,bool,string,double>("Item_Power_Passive#318788", false, "s", 15) }, // Dark Mage's Shade
- { ActorSnoEnum._x1_flail1h_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#483790", true, "%", 1000) }, // Darklight
- { ActorSnoEnum._x1_axe_norm_unique_09, new Tuple<string,bool,string,double>("Item_Power_Passive#318869", true, "%", 100) }, // Hack
- { ActorSnoEnum._x1_flail2h_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#478537", true, "%", 300) }, // Golden Flense
- { ActorSnoEnum._p4_bracers_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#449031", true, "%", 800) }, // Cesar's Memento
- { ActorSnoEnum._x1_bracers_norm_unique_12, new Tuple<string,bool,string,double>("Item_Power_Passive#318770", true, "%", 12) }, // Ancient Parthan Defenders
- { ActorSnoEnum._p3_bracers_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#485725", true, "%", 200) }, // Bindings of the Lesser Gods
- { ActorSnoEnum._x1_crushield_norm_unique_03, new Tuple<string,bool,string,double>("Item_Power_Passive#318887", true, "%", 60) }, // Hallowed Bulwark
- { ActorSnoEnum._p6_ring_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#475244", true, "%", 0.95) }, // Lornelle's Sunstone
- { ActorSnoEnum._x1_shield_norm_unique_11, new Tuple<string,bool,string,double>("Item_Power_Passive#436481", true, "%", 250) }, // Guard of Johanna
- { ActorSnoEnum._p2_helm_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#449049", true, "%", 60) }, // Warhelm of Kassar
- { ActorSnoEnum._x1_shield_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#318853", true, "%", 50) }, // Eberli Charo
- { ActorSnoEnum._mace_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#364325", true, "%", 40) }, // Odyn Son
- { ActorSnoEnum._p6_chestarmor_norm_unique_22, new Tuple<string,bool,string,double>("Item_Power_Passive#476579", true, "%", 100) }, // Requiem Cereplate
- { ActorSnoEnum._x1_fistweapon_norm_unique_15, new Tuple<string,bool,string,double>("Item_Power_Passive#447368", true, "%", 250) }, // Kyoshiro's Blade
- { ActorSnoEnum._chestarmor_norm_unique_074, new Tuple<string,bool,string,double>("Item_Power_Passive#446615", true, "%", 300) }, // Heart of Iron
- { ActorSnoEnum._twohandedaxe_norm_unique_02, new Tuple<string,bool,string,double>("Item_Power_Passive#483516", true, "%", 10) }, // The Executioner
- { ActorSnoEnum._x1_twohandedmace_norm_unique_08, new Tuple<string,bool,string,double>("Item_Power_Passive#318753", true, "%", 50) }, // The Furnace
- { ActorSnoEnum._fistweapon_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#486099", true, "%", 450) }, // Rabid Strike
- { ActorSnoEnum._x1_shield_norm_unique_14, new Tuple<string,bool,string,double>("Item_Power_Passive#446142", true, "%", 30) }, // Shield of Fury
- { ActorSnoEnum._x1_ring_norm_unique_027, new Tuple<string,bool,string,double>("Item_Power_Passive#318861", true, "%", 100) }, // Rogar's Huge Stone
- { ActorSnoEnum._x1_spiritstone_norm_unique_16, new Tuple<string,bool,string,double>("Item_Power_Passive#486180", true, "%", 50) }, // Eye of Peshkov
- { ActorSnoEnum._barbbelt_norm_unique_06, new Tuple<string,bool,string,double>("Item_Power_Passive#484245", true, "%", 400) }, // The Undisputed Champion
- { ActorSnoEnum._p6_ring_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#475247", false, "s", 4) }, // Circle of Nailuj's Evol
- { ActorSnoEnum._barbbelt_norm_unique_07, new Tuple<string,bool,string,double>("Item_Power_Passive#451163", true, "%", 300) }, // Bakuli Jungle Wraps
- { ActorSnoEnum._combatstaff_norm_unique_01, new Tuple<string,bool,string,double>("Item_Power_Passive#318776", true, "%", 550) }, // Incense Torch of the Grand Temple
- { ActorSnoEnum._boots_norm_set_01, new Tuple<string,bool,string,double>("Item_Power_Passive#478554", true, "%", 900) }, // Nilfur's Boast
- { ActorSnoEnum._p3_belt_norm_unique_04, new Tuple<string,bool,string,double>("Item_Power_Passive#71548", false, "p", 12) }, // The Shame of Delsere
- { ActorSnoEnum._x1_sword_norm_unique_23, new Tuple<string,bool,string,double>("Item_Power_Passive#449063", true, "%", 325) }, // Deathwish
- { ActorSnoEnum._x1_staff_norm_unique_10, new Tuple<string,bool,string,double>("Item_Power_Passive#487677", true, "%", 50) }, // The Smoldering Core
- };
- public ItemPowerShow()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- Order = 150000;
- ShowInLegendary = true;
- ShowInAncient = true;
- ShowInPrimal = true;
- ShowOnUnidentifiedOnly = false;
- ShowInStash = true; // Inventory and Stash or only Inventory
- TextMaxValue = "Max"; // Ex: "Max". Set to null for numeric value
- NumericTextMaxValue = "[{0}{1}]"; // Format for TextMaxValue when is null // {0} numeric value , {1| -> suffix
- xPor = 0.50f; // Item pos X 0 ... 1
- yPor = 0.64f; // Item pos Y 0 ... 1 // items width == height (ring,amulet,belt ..)
- yPorLarge = 0.77f; // Item pos Y 0 ... 1 // items width != height
- centered = true; // Center text at that position X,Y
- LegendaryAffixFont = Hud.Render.CreateFont("arial", 7.5f, 255, 255, 255, 0, false, false, 250, 0, 0, 0, true);
- //LegendaryAffixFontMax = Hud.Render.CreateFont("arial", 7.5f, 255, 255, 255, 0, true, false, 250, 0, 0, 0, true);
- LegendaryAffixFontMax = LegendaryAffixFont;
- AncientAffixFont = Hud.Render.CreateFont("arial", 7.5f, 255, 0, 255, 0, false, false, 250, 0, 0, 0, true);
- //AncientAffixFontMax = Hud.Render.CreateFont("arial", 7.5f, 255, 0, 255, 0, true, false, 250, 0, 0, 0, true);
- AncientAffixFontMax = AncientAffixFont;
- PrimalAffixFont = Hud.Render.CreateFont("arial", 7.5f, 255, 255, 55, 55, false, false, 180, 0, 0, 0, true);
- ItemDecorator = new GroundLabelDecorator(Hud)
- {
- TextFont = Hud.Render.CreateFont("consolas", 8, 255, 255, 255, 255, true, false, false),
- OffsetY = -80.0f
- };
- }
- 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
- { // b) ItemIdValue(item2, id = "Item_Power_Passive#475241"); => Find the specified ID and multiply the value by 100 (default behavior)
- 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
- { // 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
- if (Sno_IdPercent.TryGetValue(item.SnoActor.Sno,out var data))
- {
- id = data.Item1; percent = data.Item2; // < item.SnoActor.Sno, Tuple<STAT.Id, multiply x 100, Suffix, MaxValue> >
- }
- else return double.MaxValue; // queries in the Dictionary, but the item does not exist
- }
- var stat = item.StatList.FirstOrDefault(s => s.Id == id);
- if (stat != null)
- {
- return Math.Round(stat.DoubleValue * (percent?10000:100))/100;
- }
- else return 0; // stat (id) not found in item
- }
- public void PaintTopInGame(ClipState clipState)
- {
- if (!Hud.Game.IsInGame ) return;
- if (clipState == ClipState.Inventory)
- {
- if (Hud.Inventory.InventoryMainUiElement.Visible)
- {
- int stashTabAbs = Hud.Inventory.SelectedStashTabIndex + (Hud.Inventory.SelectedStashPageIndex * Hud.Inventory.MaxStashTabCountPerPage);
- var items = Hud.Game.Items.Where(x => x.Location == ItemLocation.Inventory || (x.Location == ItemLocation.Stash && Hud.Inventory.StashMainUiElement.Visible && ShowInStash && stashTabAbs == x.InventoryY/10));
- foreach (var item in items)
- {
- if (ShowOnUnidentifiedOnly && !item.Unidentified) continue;
- if (item.InventoryX < 0 || item.InventoryY < 0) continue;
- 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
- {
- var rect = Hud.Inventory.GetItemRect(item);
- var stat = item.StatList.FirstOrDefault(s => s.Id == data.Item1);
- if (stat != null)
- {
- double val;
- 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#
- else val = Math.Round(stat.DoubleValue * (data.Item2?10000:100))/100;
- string valText = string.Empty;
- if (item.AncientRank == 2)
- {
- if (!ShowInPrimal) continue;
- DefaultFont = PrimalAffixFont;
- valText = TextMaxValue ?? (val + data.Item3);
- }
- else if (item.AncientRank == 1)
- {
- if (!ShowInAncient) continue;
- if (val == data.Item4) { DefaultFont = AncientAffixFontMax; valText = TextMaxValue ?? string.Format(NumericTextMaxValue, val, data.Item3); }
- else { DefaultFont = AncientAffixFont; valText = val + data.Item3; }
- }
- else
- {
- if (!ShowInLegendary) continue;
- if (val == data.Item4) { DefaultFont = LegendaryAffixFontMax; valText = TextMaxValue ?? string.Format(NumericTextMaxValue, val, data.Item3); }
- else { DefaultFont = LegendaryAffixFont; valText = val + data.Item3; }
- }
- var layout = DefaultFont.GetTextLayout(valText);
- if (centered)
- {
- 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);
- else DefaultFont.DrawText(layout, rect.X + rect.Width * xPor - layout.Metrics.Width/2.0f, rect.Y + rect.Height * yPorLarge - layout.Metrics.Height/2.0f);
- }
- else
- {
- if (item.SnoItem.ItemWidth == item.SnoItem.ItemHeight) DefaultFont.DrawText(layout, rect.X + rect.Width * xPor, rect.Y + rect.Height * yPor);
- else DefaultFont.DrawText(layout, rect.X + rect.Width * xPor, rect.Y + rect.Height * yPorLarge);
- }
- }
- }
- }
- }
- }
- else if (clipState == ClipState.AfterClip)
- {
- 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)
- {
- var cursor = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX, Hud.Window.CursorY).ToWorldCoordinate();
- var item = Hud.Game.Items.Where(i => (i.Location == ItemLocation.Floor) && i.IsOnScreen).OrderBy(o => o.FloorCoordinate.XYDistanceTo(cursor)).FirstOrDefault();
- if (item != null)
- {
- if (ItemOld != item)
- {
- ItemOld = item; logItemsId = true;
- Hud.TextLog.Log("ItemsId", string.Format("/{1} -------------------------------------------------- [{0}] ---------------------------------------------------------- {1}/", item.FullNameLocalized, "*"),false,true);
- 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);
- //Hud.TextLog.Log("ItemsId", string.Format(" Width {0} , Height {1} ]", item.SnoItem.ItemWidth, item.SnoItem.ItemHeight),false,true);
- }
- else if (logItemsId) logItemsId = false;
- string regexcad = @"(Item_Power_Passive|Gem_Attributes_Multiplier|Crit)"; // Display Stat/IDs coNtaining any of these strings (separated by "|", option IgnoreCase)
- string cad = string.Empty;
- foreach (var stat in item.StatList.Where(s => s.Id != null))
- {
- if (Regex.IsMatch(stat.Id,regexcad, RegexOptions.IgnoreCase))
- {
- cad += "\n" + stat.Id + ": " + stat.DoubleValue + " (percent:" + (Math.Round(stat.DoubleValue * 10000)/100) + ")";
- if (Sno_IdPercent.TryGetValue(item.SnoActor.Sno, out var data) && data.Item1 == stat.Id)
- {
- cad += string.Format("\t [Id={0}, percent={1}, Suffix={2}, MaxValue={3}]", data.Item1, data.Item2, data.Item3, data.Item4);
- }
- }
- if (logItemsId)
- {
- Hud.TextLog.Log("ItemsId", string.Format("Code: {0,-50} Id: {1,-55} Value: {2,-25} {3,25}",
- (stat.Attribute == null)?"NONE":stat.Attribute.Code, stat.Id, stat.DoubleValue, stat.Id.StartsWith("Item_Power_Passive#")?"/+ --- Item Power --- +/":""),false,true);
- }
- }
- ItemDecorator.Paint(item, item.FloorCoordinate,
- 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} ",
- 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":"-"))
- ) );
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement