├── .gitattributes ├── .gitignore ├── README.md ├── Release ├── Antlr4.Runtime.dll ├── Gma.System.MouseKeyHook.dll ├── ImGui.NET.dll ├── Newtonsoft.Json.dll ├── PoeFilterParser.dll ├── PoeHUD.exe ├── SharpDX.Desktop.dll ├── SharpDX.Direct3D9.dll ├── SharpDX.Mathematics.dll ├── SharpDX.dll ├── System.Buffers.dll ├── System.Numerics.Vectors.dll ├── System.Runtime.CompilerServices.Unsafe.dll ├── Trinet.Core.IO.Ntfs.dll ├── cimgui.dll ├── config │ ├── NeverSink-SEMI-STRICT.filter │ ├── NeverSink-UBER-STRICT.filter │ ├── ZiggyLoot.filter │ ├── crafting_bases.txt │ ├── currency.txt │ ├── debuffPanel.json │ ├── monster_mod_alerts.txt │ ├── monster_name_alerts.txt │ ├── preload_alerts.txt │ └── themes │ │ ├── Default.hudtheme │ │ └── ODEN.hudtheme ├── plugins │ └── Creating plugins.txt ├── sounds │ ├── alert.wav │ ├── attention.wav │ ├── beast.wav │ ├── bomb.wav │ ├── corrupted.wav │ ├── danger.wav │ ├── elemental.wav │ ├── inception.wav │ ├── physical.wav │ ├── treasure.wav │ └── volatile.wav └── textures │ ├── cell.png │ ├── chest.png │ ├── corrupted.png │ ├── currency.png │ ├── debuff_panel.png │ ├── directions.png │ ├── done.png │ ├── dot_black.png │ ├── dot_blue.png │ ├── dot_green.png │ ├── dot_map.png │ ├── dot_orange.png │ ├── dot_purple.png │ ├── dot_red.png │ ├── dot_rgb.png │ ├── dot_white.png │ ├── dot_yellow.png │ ├── eReflect.png │ ├── esbar.png │ ├── healthbar.png │ ├── healthbar_bg.png │ ├── healthbar_increment.png │ ├── item_icons.png │ ├── lightBackground.png │ ├── menu-background.png │ ├── menu-colors.png │ ├── minimap_default_icon.png │ ├── monster_ally.png │ ├── monster_enemy.png │ ├── monster_enemy_blue.png │ ├── monster_enemy_orange.png │ ├── monster_enemy_yellow.png │ ├── monster_rare_1.png │ ├── monster_rare_2.png │ ├── monster_rare_3.png │ ├── monster_rare_4.png │ ├── ms-blue-gray.png │ ├── ms-blue.png │ ├── ms-cyan.png │ ├── ms-ghost.png │ ├── ms-green.png │ ├── ms-orange.png │ ├── ms-purple-gray.png │ ├── ms-purple.png │ ├── ms-red-gray.png │ ├── ms-red.png │ ├── ms-talisman.png │ ├── ms-white.png │ ├── ms-yellow-gray.png │ ├── ms-yellow.png │ ├── openFile.png │ ├── pReflect.png │ ├── poehud.ico │ ├── preload-end.png │ ├── preload-start.png │ ├── strongbox.png │ ├── strongboxes │ ├── chest.png │ ├── chest_armory.png │ ├── chest_divination.png │ ├── chest_gemscutter.png │ ├── chest_jewelers.png │ ├── chest_large.png │ ├── chest_map.png │ ├── chest_no_quality.png │ ├── chest_ornate.png │ ├── chest_quality.png │ ├── chest_weapon.png │ └── icon_sources.psd │ ├── treasure.png │ ├── volatile.png │ └── wealth.png ├── shortcut.bat └── src ├── Controllers ├── AreaController.cs ├── FsController.cs ├── GameController.cs ├── GameStateController.cs └── StashTabController.cs ├── ExileHUD.sln ├── Framework ├── Aero.cs ├── ChooseColor.cs ├── ColorUtils.cs ├── Coroutine.cs ├── Enums │ └── ProcessAccessFlags.cs ├── GameWindow.cs ├── Helpers │ ├── ActionHelper.cs │ ├── ConvertHelper.cs │ ├── CoroutineExtension.cs │ ├── LinqHelper.cs │ ├── MathHepler.cs │ └── SoundHelper.cs ├── IntRange.cs ├── Memory.cs ├── MemoryControl.cs ├── Runner.cs ├── Tools │ ├── Generator.cs │ └── Scrambler.cs └── WinApi.cs ├── Hud ├── AdvancedTooltip │ ├── AdvancedTooltipPlugin.cs │ ├── AdvancedTooltipSettings.cs │ ├── ItemLevelSettings.cs │ ├── ItemModsSettings.cs │ ├── ModValue.cs │ └── WeaponDpsSettings.cs ├── CustomColorDialog.cs ├── DPS │ ├── DpsMeterPlugin.cs │ └── DpsMeterSettings.cs ├── DebugPlugin │ ├── DebugPlugin.cs │ └── DebugPluginSettings.cs ├── ExternalOverlay.cs ├── Health │ ├── CreatureType.cs │ ├── DebuffPanelConfig.cs │ ├── HealthBarPlugin.cs │ ├── HealthBarSettings.cs │ ├── Healthbar.cs │ └── UnitSettings.cs ├── HudSkin.cs ├── HudTexture.cs ├── Icons │ ├── LargeMapPlugin.cs │ ├── MapIconsSettings.cs │ └── MinimapPlugin.cs ├── Interfaces │ ├── IPanelChild.cs │ ├── IPlugin.cs │ └── IPluginWithMapIcons.cs ├── KillCounter │ ├── KillCounterPlugin.cs │ └── KillCounterSettings.cs ├── Loot │ ├── AlertDrawStyle.cs │ ├── BorderSettings.cs │ ├── CraftingBase.cs │ ├── ItemAlertPlugin.cs │ ├── ItemAlertSettings.cs │ ├── ItemCounterPlugin.cs │ ├── ItemCounterSettings.cs │ ├── ItemUsefulProperties.cs │ ├── PoeFilterVisitor.cs │ ├── QualityItemSettings.cs │ └── QualityItemsSettings.cs ├── MapIcon.cs ├── Menu │ ├── CoreSettings.cs │ ├── MainMenuWindow.cs │ ├── MenuPlugin.cs │ └── SettingsDrawers │ │ └── BaseSettingsDrawer.cs ├── Performance.cs ├── Plugin.cs ├── PluginExtension │ ├── ExternalPluginHolder.cs │ ├── FileOperationAPIWrapper.cs │ ├── PluginExtensionPlugin.cs │ └── PluginHolder.cs ├── PluginPanel.cs ├── PluginWithMapIcons.cs ├── Preload │ ├── PreloadAlertPlugin.cs │ └── PreloadAlertSettings.cs ├── Settings │ ├── ButtonNode.cs │ ├── ColorNode.cs │ ├── Converters │ │ ├── ColorNodeConverter.cs │ │ ├── FileNodeConverter.cs │ │ └── ToggleNodeConverter.cs │ ├── EmptyNode.cs │ ├── FileNode.cs │ ├── HotkeyNode.cs │ ├── ListNode.cs │ ├── RangeNode.cs │ ├── SettingsBase.cs │ ├── SettingsHub.cs │ ├── SortContractResolver.cs │ ├── StashTabNode.cs │ ├── TextNode.cs │ └── ToggleNode.cs ├── SizedPlugin.cs ├── SizedPluginWithMapIcons.cs ├── Sounds.cs ├── Themes │ ├── ThemeConfig.cs │ └── ThemeEditor.cs ├── Trackers │ ├── MonsterTracker.cs │ ├── MonsterTrackerSettings.cs │ ├── PoiTracker.cs │ └── PoiTrackerSettings.cs ├── UI │ ├── Graphics.cs │ ├── ImGuiExtension.cs │ ├── Renderers │ │ ├── FontRenderer.cs │ │ ├── ImGuiRender.cs │ │ └── TextureRenderer.cs │ └── Vertexes │ │ ├── ColoredVertex.cs │ │ ├── GuiVertex.cs │ │ └── TexturedVertex.cs └── XpRate │ ├── XpRatePlugin.cs │ └── XpRateSettings.cs ├── Models ├── AreaInstance.cs ├── Attributes │ ├── HideInReflectionAttibute.cs │ └── StaticOffsetFieldDebugAttribute.cs ├── BaseItemType.cs ├── Cache.cs ├── CacheComponent │ └── PlayerCache.cs ├── ConfigLineBase.cs ├── Constants.cs ├── EntityListWrapper.cs ├── EntityWrapper.cs ├── Enums │ ├── DamageType.cs │ ├── DiagnosticInfoType.cs │ ├── GameStat.cs │ ├── InventoryIndex.cs │ ├── InventoryType.cs │ ├── ItemRarity.cs │ ├── ItemStatEnum.cs │ └── MonsterRarity.cs ├── Interfaces │ └── IEntity.cs ├── ItemClass.cs ├── ItemStats.cs ├── MonsterConfigLine.cs ├── Pattern.cs ├── PreloadConfigLine.cs └── StatTranslator.cs ├── Plugins ├── BasePlugin.cs ├── BaseSettingsPlugin.cs └── MenuAttribute.cs ├── Poe ├── Component.cs ├── Components │ ├── Actor.cs │ ├── Animated.cs │ ├── AnimatedComponents │ │ └── ClientAnimationController.cs │ ├── AreaTransition.cs │ ├── Armour.cs │ ├── AttributeRequirements.cs │ ├── Base.cs │ ├── Charges.cs │ ├── Chest.cs │ ├── CurrencyInfo.cs │ ├── DiesAfterTime.cs │ ├── Flask.cs │ ├── Inventories.cs │ ├── Life.cs │ ├── Localstats.cs │ ├── Magnetic.cs │ ├── Map.cs │ ├── Mods.cs │ ├── Monolith.cs │ ├── Monster.cs │ ├── NPC.cs │ ├── ObjectMagicProperties.cs │ ├── Player.cs │ ├── Portal.cs │ ├── Positioned.cs │ ├── Prophecy.cs │ ├── Quality.cs │ ├── Render.cs │ ├── RenderItem.cs │ ├── Shrine.cs │ ├── SkillGem.cs │ ├── Sockets.cs │ ├── Stack.cs │ ├── Stats.cs │ ├── Targetable.cs │ ├── TimerComponent.cs │ ├── Transitionable.cs │ ├── TriggerableBlockage.cs │ ├── Usable.cs │ ├── Weapon.cs │ └── WorldItem.cs ├── Element.cs ├── Elements │ ├── EntityLabel.cs │ ├── HPbarElement.cs │ ├── HoverItemIcon.cs │ ├── IncursionWindow.cs │ ├── InventoryElement.cs │ ├── InventoryElements │ │ ├── CurrencyInventoryItem.cs │ │ ├── DivinationInventoryItem.cs │ │ ├── EssenceInventoryItem.cs │ │ ├── FragmentInventoryItem.cs │ │ ├── MapStashTabElement.cs │ │ └── NormalInventoryItem.cs │ ├── ItemOnGroundTooltip.cs │ ├── ItemsOnGroundLabelElement.cs │ ├── Map.cs │ ├── PoeChatElement.cs │ ├── SkillBarElement.cs │ ├── SkillElement.cs │ ├── StashElement.cs │ ├── SubterraneanChart.cs │ ├── SyndicatePanel.cs │ ├── WindowState.cs │ └── WorldMapElement.cs ├── Entity.cs ├── Extensions.cs ├── FileInMemory.cs ├── FilesInMemory │ ├── Base │ │ └── UniversalFileWrapper.cs │ ├── BaseItemTypes.cs │ ├── BestiaryCapturableMonsters.cs │ ├── ChestsDat.cs │ ├── GenericFilesInMemory.cs │ ├── ItemClasses.cs │ ├── LabyrinthTrials.cs │ ├── ModsDat.cs │ ├── MonsterVarieties.cs │ ├── PassiveSkills.cs │ ├── PropheciesDat.cs │ ├── QuestStates.cs │ ├── StatsDat.cs │ ├── TagsDat.cs │ └── WorldAreas.cs ├── Offsets.cs ├── Pathfinding.cs ├── RemoteMemoryObject.cs └── RemoteMemoryObjects │ ├── ActiveSkillWrapper.cs │ ├── ActorSkill.cs │ ├── ActorVaalSkill.cs │ ├── AreaTemplate.cs │ ├── AtlasNode.cs │ ├── BestiaryCapturableMonster.cs │ ├── BestiaryFamily.cs │ ├── BestiaryGenus.cs │ ├── BestiaryGroup.cs │ ├── BestiaryRecipe.cs │ ├── BestiaryRecipeComponent.cs │ ├── BetrayalChoice.cs │ ├── BetrayalChoiceAction.cs │ ├── BetrayalData.cs │ ├── BetrayalDialogue.cs │ ├── BetrayalEventData.cs │ ├── BetrayalJob.cs │ ├── BetrayalRank.cs │ ├── BetrayalReward.cs │ ├── BetrayalSyndicateLeadersData.cs │ ├── BetrayalSyndicateState.cs │ ├── BetrayalTarget.cs │ ├── Buff.cs │ ├── Camera.cs │ ├── ChestDat.cs │ ├── DeployedObject.cs │ ├── DiagnosticElement.cs │ ├── EntityList.cs │ ├── GenericFileInMemory.cs │ ├── GrantedEffectsPerLevel.cs │ ├── HideoutWrapper.cs │ ├── IngameData.cs │ ├── IngameState.cs │ ├── IngameUIElements.cs │ ├── Inventory.cs │ ├── InventoryHolder.cs │ ├── InventoryList.cs │ ├── ItemMod.cs │ ├── LabelOnGround.cs │ ├── Labyrinth │ └── LabyrinthData.cs │ ├── MonsterVariety.cs │ ├── NativeStringReader.cs │ ├── ProphecyDat.cs │ ├── Quest.cs │ ├── QuestState.cs │ ├── ServerData.cs │ ├── ServerInventory.cs │ ├── ServerStashTab.cs │ ├── SkillGemWrapper.cs │ ├── TheGame.cs │ └── WorldArea.cs ├── PoeHUD.csproj ├── Program.cs ├── Properties └── AssemblyInfo.cs ├── Tools ├── Generators.fs ├── Scrambler.fs ├── Script.fsx └── Tools.fsproj ├── app.config ├── app.manifest ├── bin └── x64 │ └── Debug │ └── cimgui.dll ├── packages.config └── poehud.ico /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | *_i.c 26 | *_p.c 27 | *_i.h 28 | *.ilk 29 | *.meta 30 | *.obj 31 | *.pch 32 | *.pdb 33 | *.pgc 34 | *.pgd 35 | *.rsp 36 | *.sbr 37 | *.tlb 38 | *.tli 39 | *.tlh 40 | *.tmp 41 | *.tmp_proj 42 | *.log 43 | *.vspscc 44 | *.vssscc 45 | .builds 46 | *.pidb 47 | *.svclog 48 | *.scc 49 | 50 | # MSTest test Results 51 | [Tt]est[Rr]esult*/ 52 | [Bb]uild[Ll]og.* 53 | 54 | # Visual Studio profiler 55 | *.psess 56 | *.vsp 57 | *.vspx 58 | *.sap 59 | 60 | # NuGet Packages 61 | *.nupkg 62 | # The packages folder can be ignored because of Package Restore 63 | **/packages/* 64 | # except build/, which is used as an MSBuild target. 65 | !**/packages/build/ 66 | # Uncomment if necessary however generally it will be regenerated when needed 67 | #!**/packages/repositories.config 68 | # NuGet v3's project.json files produces more ignoreable files 69 | *.nuget.props 70 | *.nuget.targets 71 | 72 | # FAKE - F# Make 73 | .fake/ 74 | 75 | # JetBrains Rider 76 | .idea/ 77 | *.sln.iml 78 | 79 | settings.json -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PoeHud 2 | ====== 3 | 4 | This version is deprecated. Please use Qvin's version found [here](https://github.com/Qvin0000/ExileApi). 5 | -------------------------------------------------------------------------------- /Release/Antlr4.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/Antlr4.Runtime.dll -------------------------------------------------------------------------------- /Release/Gma.System.MouseKeyHook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/Gma.System.MouseKeyHook.dll -------------------------------------------------------------------------------- /Release/ImGui.NET.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/ImGui.NET.dll -------------------------------------------------------------------------------- /Release/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Release/PoeFilterParser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/PoeFilterParser.dll -------------------------------------------------------------------------------- /Release/PoeHUD.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/PoeHUD.exe -------------------------------------------------------------------------------- /Release/SharpDX.Desktop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/SharpDX.Desktop.dll -------------------------------------------------------------------------------- /Release/SharpDX.Direct3D9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/SharpDX.Direct3D9.dll -------------------------------------------------------------------------------- /Release/SharpDX.Mathematics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/SharpDX.Mathematics.dll -------------------------------------------------------------------------------- /Release/SharpDX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/SharpDX.dll -------------------------------------------------------------------------------- /Release/System.Buffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/System.Buffers.dll -------------------------------------------------------------------------------- /Release/System.Numerics.Vectors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/System.Numerics.Vectors.dll -------------------------------------------------------------------------------- /Release/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /Release/Trinet.Core.IO.Ntfs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/Trinet.Core.IO.Ntfs.dll -------------------------------------------------------------------------------- /Release/cimgui.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/cimgui.dll -------------------------------------------------------------------------------- /Release/config/crafting_bases.txt: -------------------------------------------------------------------------------- 1 | #Gold Ring,10,0,Normal 2 | #Gold Amulet,10,0,Normal -------------------------------------------------------------------------------- /Release/config/currency.txt: -------------------------------------------------------------------------------- 1 | Cartographer's Chisel 2 | Glassblower's Bauble 3 | Gemcutter's Prism 4 | Jeweller's Orb 5 | Chromatic Orb 6 | Orb of Fusing 7 | Orb of Transmutation 8 | Orb of Chance 9 | Orb of Alchemy 10 | Regal Orb 11 | Orb of Augmentation 12 | Exalted Orb 13 | Orb of Alteration 14 | Chaos Orb 15 | Blessed Orb 16 | Divine Orb 17 | Orb of Scouring 18 | Mirror of Kalandra 19 | Orb of Regret 20 | Vaal Orb 21 | Albino Rhoa Feather 22 | Splinter of Esh 23 | Splinter of Tul 24 | Splinter of Xoph 25 | Splinter of Chayula 26 | Splinter of Uul-Netol 27 | Thaumaturgical Net 28 | Necromancy Net 29 | Orb Of Annulment 30 | -------------------------------------------------------------------------------- /Release/config/debuffPanel.json: -------------------------------------------------------------------------------- 1 | /* 2 | Filter: 3 | 0 - any 4 | 1 - hostiles 5 | 2 - players & minions 6 | */ 7 | { 8 | "Bleeding": { 9 | "puncture":0, 10 | "puncture_moving":0, 11 | "physical_damage_and_bleed":0, 12 | "bleeding":0 13 | }, 14 | "Corruption": { 15 | "corrupted_blood":0, 16 | "corrupted_blood_rain":0 17 | }, 18 | "Poisoned": { 19 | "poison":0, 20 | "viper_strike_orb":0, 21 | "monster_aura_pus_puke_degen":2, 22 | "monster_aura_chaos_degen":2, 23 | "monster_aura_physical_degen":2, 24 | "ground_desecration":0, 25 | "caustic_cloud":0, 26 | "chaos_bond_in_beam":0 27 | }, 28 | "Frozen": { 29 | "frozen":0, 30 | "cold_damage_and_freeze":0 31 | }, 32 | "Chilled": { 33 | "chilled":0, 34 | "ground_ice_chill":0, 35 | "chilling_bond_in_beam":0, 36 | "monster_aura_chill":2 37 | }, 38 | "Burning": { 39 | "ground_fire_burn":0, 40 | "ignited":0, 41 | "searing_bond_in_beam":0, 42 | "fire_damage_and_ignite":0, 43 | "monster_aura_burning":2, 44 | "demon_righteous_fire_aura":2, 45 | "righteous_fire_aura":2 46 | }, 47 | "Shocked": { 48 | "shocked":0, 49 | "ground_lightning_shock":0, 50 | "seawitch_lightning_beam":0, 51 | "lightning_damage_and_shock":0, 52 | "monster_aura_shock":2 53 | }, 54 | "WeakenedSlowed": { 55 | "monster_aura_slow":2, 56 | "curse_enfeeble":0, 57 | "curse_temporal_chains":0, 58 | "curse_elemental_weakness":0, 59 | "curse_fire_weakness":0, 60 | "curse_cold_weakness":0, 61 | "curse_lightning_weakness":0, 62 | "curse_warlords_mark":0, 63 | "curse_punishment":0, 64 | "curse_assassins_mark":0, 65 | "curse_projectile_weakness":0, 66 | "curse_vulnerability":0, 67 | "curse_poachers_mark":0, 68 | "beartrap_debuff":0, 69 | "ground_tar_slow":0, 70 | "blinded":0, 71 | "frozen_damage_increase":0, 72 | "piety_transformed_debuff":0, 73 | "ground_smoke_blind":0, 74 | "curse_silence":0, 75 | "sea_witch_screech_debuff":0, 76 | "pinned":0, 77 | "bleeding_movespeed_penalty":0, 78 | "stun_display_buff":0 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Release/sounds/alert.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/alert.wav -------------------------------------------------------------------------------- /Release/sounds/attention.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/attention.wav -------------------------------------------------------------------------------- /Release/sounds/beast.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/beast.wav -------------------------------------------------------------------------------- /Release/sounds/bomb.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/bomb.wav -------------------------------------------------------------------------------- /Release/sounds/corrupted.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/corrupted.wav -------------------------------------------------------------------------------- /Release/sounds/danger.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/danger.wav -------------------------------------------------------------------------------- /Release/sounds/elemental.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/elemental.wav -------------------------------------------------------------------------------- /Release/sounds/inception.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/inception.wav -------------------------------------------------------------------------------- /Release/sounds/physical.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/physical.wav -------------------------------------------------------------------------------- /Release/sounds/treasure.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/treasure.wav -------------------------------------------------------------------------------- /Release/sounds/volatile.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/sounds/volatile.wav -------------------------------------------------------------------------------- /Release/textures/cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/cell.png -------------------------------------------------------------------------------- /Release/textures/chest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/chest.png -------------------------------------------------------------------------------- /Release/textures/corrupted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/corrupted.png -------------------------------------------------------------------------------- /Release/textures/currency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/currency.png -------------------------------------------------------------------------------- /Release/textures/debuff_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/debuff_panel.png -------------------------------------------------------------------------------- /Release/textures/directions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/directions.png -------------------------------------------------------------------------------- /Release/textures/done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/done.png -------------------------------------------------------------------------------- /Release/textures/dot_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_black.png -------------------------------------------------------------------------------- /Release/textures/dot_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_blue.png -------------------------------------------------------------------------------- /Release/textures/dot_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_green.png -------------------------------------------------------------------------------- /Release/textures/dot_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_map.png -------------------------------------------------------------------------------- /Release/textures/dot_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_orange.png -------------------------------------------------------------------------------- /Release/textures/dot_purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_purple.png -------------------------------------------------------------------------------- /Release/textures/dot_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_red.png -------------------------------------------------------------------------------- /Release/textures/dot_rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_rgb.png -------------------------------------------------------------------------------- /Release/textures/dot_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_white.png -------------------------------------------------------------------------------- /Release/textures/dot_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/dot_yellow.png -------------------------------------------------------------------------------- /Release/textures/eReflect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/eReflect.png -------------------------------------------------------------------------------- /Release/textures/esbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/esbar.png -------------------------------------------------------------------------------- /Release/textures/healthbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/healthbar.png -------------------------------------------------------------------------------- /Release/textures/healthbar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/healthbar_bg.png -------------------------------------------------------------------------------- /Release/textures/healthbar_increment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/healthbar_increment.png -------------------------------------------------------------------------------- /Release/textures/item_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/item_icons.png -------------------------------------------------------------------------------- /Release/textures/lightBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/lightBackground.png -------------------------------------------------------------------------------- /Release/textures/menu-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/menu-background.png -------------------------------------------------------------------------------- /Release/textures/menu-colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/menu-colors.png -------------------------------------------------------------------------------- /Release/textures/minimap_default_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/minimap_default_icon.png -------------------------------------------------------------------------------- /Release/textures/monster_ally.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_ally.png -------------------------------------------------------------------------------- /Release/textures/monster_enemy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_enemy.png -------------------------------------------------------------------------------- /Release/textures/monster_enemy_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_enemy_blue.png -------------------------------------------------------------------------------- /Release/textures/monster_enemy_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_enemy_orange.png -------------------------------------------------------------------------------- /Release/textures/monster_enemy_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_enemy_yellow.png -------------------------------------------------------------------------------- /Release/textures/monster_rare_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_rare_1.png -------------------------------------------------------------------------------- /Release/textures/monster_rare_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_rare_2.png -------------------------------------------------------------------------------- /Release/textures/monster_rare_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_rare_3.png -------------------------------------------------------------------------------- /Release/textures/monster_rare_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/monster_rare_4.png -------------------------------------------------------------------------------- /Release/textures/ms-blue-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-blue-gray.png -------------------------------------------------------------------------------- /Release/textures/ms-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-blue.png -------------------------------------------------------------------------------- /Release/textures/ms-cyan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-cyan.png -------------------------------------------------------------------------------- /Release/textures/ms-ghost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-ghost.png -------------------------------------------------------------------------------- /Release/textures/ms-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-green.png -------------------------------------------------------------------------------- /Release/textures/ms-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-orange.png -------------------------------------------------------------------------------- /Release/textures/ms-purple-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-purple-gray.png -------------------------------------------------------------------------------- /Release/textures/ms-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-purple.png -------------------------------------------------------------------------------- /Release/textures/ms-red-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-red-gray.png -------------------------------------------------------------------------------- /Release/textures/ms-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-red.png -------------------------------------------------------------------------------- /Release/textures/ms-talisman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-talisman.png -------------------------------------------------------------------------------- /Release/textures/ms-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-white.png -------------------------------------------------------------------------------- /Release/textures/ms-yellow-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-yellow-gray.png -------------------------------------------------------------------------------- /Release/textures/ms-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/ms-yellow.png -------------------------------------------------------------------------------- /Release/textures/openFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/openFile.png -------------------------------------------------------------------------------- /Release/textures/pReflect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/pReflect.png -------------------------------------------------------------------------------- /Release/textures/poehud.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/poehud.ico -------------------------------------------------------------------------------- /Release/textures/preload-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/preload-end.png -------------------------------------------------------------------------------- /Release/textures/preload-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/preload-start.png -------------------------------------------------------------------------------- /Release/textures/strongbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongbox.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_armory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_armory.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_divination.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_divination.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_gemscutter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_gemscutter.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_jewelers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_jewelers.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_large.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_map.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_no_quality.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_no_quality.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_ornate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_ornate.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_quality.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_quality.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/chest_weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/chest_weapon.png -------------------------------------------------------------------------------- /Release/textures/strongboxes/icon_sources.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/strongboxes/icon_sources.psd -------------------------------------------------------------------------------- /Release/textures/treasure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/treasure.png -------------------------------------------------------------------------------- /Release/textures/volatile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/volatile.png -------------------------------------------------------------------------------- /Release/textures/wealth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/Release/textures/wealth.png -------------------------------------------------------------------------------- /shortcut.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for %%i in (*.exe) do start "*.exe" /b "%%i" 3 | -------------------------------------------------------------------------------- /src/Controllers/AreaController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PoeHUD.Models; 3 | 4 | namespace PoeHUD.Controllers 5 | { 6 | public class AreaController 7 | { 8 | private readonly GameController _gController; 9 | 10 | public AreaController(GameController gameController) 11 | { 12 | _gController = gameController; 13 | } 14 | 15 | public AreaInstance CurrentArea { get; private set; } 16 | [Obsolete("Use OnAreaChange event in plugin to avoid memory leek")] 17 | public event Action OnAreaChange; 18 | public event Action AreaChange; 19 | 20 | public void RefreshState() 21 | { 22 | if (!_gController.InGame) 23 | return; 24 | 25 | _gController.Cache.UpdateCache(); 26 | var ingameData = _gController.Game.IngameState.Data; 27 | var areaTemplate = ingameData.CurrentArea; 28 | var curAreaHash = ingameData.CurrentAreaHash; 29 | 30 | if (CurrentArea != null && curAreaHash == CurrentArea.Hash) 31 | return; 32 | 33 | CurrentArea = new AreaInstance(areaTemplate, curAreaHash, ingameData.CurrentAreaLevel); 34 | AreaChange?.Invoke(this); 35 | OnAreaChange?.Invoke(this); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/ExileHUD.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoeHUD", "PoeHUD.csproj", "{E86368B2-AE1E-4489-A749-E29A0AB48F83}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Debug|Any CPU.ActiveCfg = Debug|x64 19 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Debug|Any CPU.Build.0 = Debug|x64 20 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Debug|x64.ActiveCfg = Debug|x64 21 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Debug|x64.Build.0 = Debug|x64 22 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Debug|x86.ActiveCfg = Debug|x86 23 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Debug|x86.Build.0 = Debug|x86 24 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Release|Any CPU.ActiveCfg = Release|x64 25 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Release|Any CPU.Build.0 = Release|x64 26 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Release|x64.ActiveCfg = Release|x64 27 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Release|x64.Build.0 = Release|x64 28 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Release|x86.ActiveCfg = Release|x86 29 | {E86368B2-AE1E-4489-A749-E29A0AB48F83}.Release|x86.Build.0 = Release|x86 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {A2B5144F-207D-4F84-A8F1-8000326C38D2} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /src/Framework/ChooseColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Framework 4 | { 5 | public delegate IntPtr CCHookProc(IntPtr hWnd, UInt16 msg, Int32 wParam, Int32 lParam); 6 | 7 | public struct ChooseColor 8 | { 9 | public Int32 lStructSize; 10 | public IntPtr hwndOwner; 11 | public IntPtr hInstance; 12 | public Int32 rgbResult; 13 | public IntPtr lpCustColors; 14 | public Int32 Flags; 15 | public IntPtr lCustData; 16 | public CCHookProc lpfnHook; 17 | public IntPtr lpTemplateName; 18 | }; 19 | } -------------------------------------------------------------------------------- /src/Framework/ColorUtils.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | 4 | namespace PoeHUD.Framework 5 | { 6 | public static class ColorUtils 7 | { 8 | public static Color ColorFromHsv(double hue, double saturation, double value) 9 | { 10 | int hi = Convert.ToInt32(Math.Floor(hue / 60)) % 6; 11 | double f = hue / 60 - Math.Floor(hue / 60); 12 | 13 | value = value * 255; 14 | byte v = Convert.ToByte(value); 15 | byte p = Convert.ToByte(value * (1 - saturation)); 16 | byte q = Convert.ToByte(value * (1 - f * saturation)); 17 | byte t = Convert.ToByte(value * (1 - (1 - f) * saturation)); 18 | 19 | switch (hi) 20 | { 21 | case 0: 22 | return new ColorBGRA(v, t, p, 255); 23 | 24 | case 1: 25 | return new ColorBGRA(q, v, p, 255); 26 | 27 | case 2: 28 | return new ColorBGRA(p, v, t, 255); 29 | 30 | case 3: 31 | return new ColorBGRA(p, q, v, 255); 32 | 33 | case 4: 34 | return new ColorBGRA(t, p, v, 255); 35 | 36 | default: 37 | return new ColorBGRA(v, p, q, 255); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Framework/Enums/ProcessAccessFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Framework.Enums 4 | { 5 | [Flags] 6 | public enum ProcessAccessFlags : uint 7 | { 8 | All = 0x001F0FFF, 9 | Terminate = 0x00000001, 10 | CreateThread = 0x00000002, 11 | VirtualMemoryOperation = 0x00000008, 12 | VirtualMemoryRead = 0x00000010, 13 | DuplicateHandle = 0x00000040, 14 | CreateProcess = 0x000000080, 15 | SetQuota = 0x00000100, 16 | SetInformation = 0x00000200, 17 | QueryInformation = 0x00000400, 18 | QueryLimitedInformation = 0x00001000, 19 | Synchronize = 0x00100000 20 | } 21 | } -------------------------------------------------------------------------------- /src/Framework/GameWindow.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | using System.Diagnostics; 4 | using PoeHUD.Controllers; 5 | using Point = System.Drawing.Point; 6 | using Rectangle = System.Drawing.Rectangle; 7 | 8 | namespace PoeHUD.Framework 9 | { 10 | public class GameWindow 11 | { 12 | private readonly IntPtr handle; 13 | 14 | public GameWindow(Process process) 15 | { 16 | Process = process; 17 | handle = process.MainWindowHandle; 18 | } 19 | 20 | public Process Process { get; private set; } 21 | 22 | public RectangleF GetWindowRectangle() 23 | { 24 | if (GameController.Instance.Cache.Enable) 25 | { 26 | return GameController.Instance.Cache.Window; 27 | } 28 | return GetWindowRectangleReal(); 29 | } 30 | public RectangleF GetWindowRectangleReal() 31 | { 32 | Rectangle rectangle = WinApi.GetClientRectangle(handle); 33 | return new RectangleF(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); 34 | } 35 | 36 | public bool IsForeground() 37 | { 38 | return WinApi.IsForegroundWindow(handle); 39 | } 40 | 41 | public Vector2 ScreenToClient(int x, int y) 42 | { 43 | var point = new Point(x, y); 44 | WinApi.ScreenToClient(handle, ref point); 45 | return new Vector2(point.X, point.Y); 46 | } 47 | 48 | public Vector2 ClientToScreen(int x, int y) 49 | { 50 | var point = new Point(x, y); 51 | WinApi.ClientToScreen(handle, ref point); 52 | return new Vector2(point.X, point.Y); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/Framework/Helpers/ActionHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Framework.Helpers 4 | { 5 | public static class ActionHelper 6 | { 7 | public static void SafeInvoke(this Action action, T parameter) 8 | { 9 | action?.Invoke(parameter); 10 | } 11 | 12 | public static void SafeInvoke(this Action action, T1 parameter1, T2 parameter2, T3 parameter3) 13 | { 14 | action?.Invoke(parameter1, parameter2, parameter3); 15 | } 16 | 17 | public static void SafeInvoke(this Action action) 18 | { 19 | action?.Invoke(); 20 | } 21 | 22 | public static void ThrowIf(bool condition) 23 | where TException : Exception, new() 24 | { 25 | if (condition) 26 | { 27 | throw new TException(); 28 | } 29 | } 30 | 31 | public static bool TryInvoke(this Action action) 32 | { 33 | try 34 | { 35 | action(); 36 | return true; 37 | } 38 | catch 39 | { 40 | return false; 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/Framework/Helpers/ConvertHelper.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | using System.Globalization; 4 | 5 | namespace PoeHUD.Framework.Helpers 6 | { 7 | public static class ConvertHelper 8 | { 9 | public static string ToShorten(double value, string format = "0") 10 | { 11 | double abs = Math.Abs(value); 12 | if (abs >= 1000000) 13 | { 14 | return string.Concat((value / 1000000).ToString("F2"), "M"); 15 | } 16 | 17 | if (abs >= 1000) 18 | { 19 | return string.Concat((value / 1000).ToString("F1"), "K"); 20 | } 21 | 22 | return value.ToString(format); 23 | } 24 | 25 | public static Color ToBGRAColor(this string value) 26 | { 27 | uint bgra; 28 | return uint.TryParse(value, NumberStyles.HexNumber, null, out bgra) 29 | ? Color.FromBgra(bgra) 30 | : Color.Black; 31 | } 32 | 33 | public static Color? ConfigColorValueExtractor(this string[] line, int index) 34 | { 35 | return IsNotNull(line, index) ? (Color?)line[index].ToBGRAColor() : null; 36 | } 37 | 38 | public static string ConfigValueExtractor(this string[] line, int index) 39 | { 40 | return IsNotNull(line, index) ? line[index] : null; 41 | } 42 | 43 | private static bool IsNotNull(string[] line, int index) 44 | { 45 | return line.Length > index && !string.IsNullOrEmpty(line[index]); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/Framework/Helpers/CoroutineExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using PoeHUD.Controllers; 3 | 4 | namespace PoeHUD.Framework.Helpers 5 | { 6 | public static class CoroutineExtension 7 | { 8 | public static Coroutine Run(this Coroutine coroutine) => GameController.Instance.CoroutineRunner.Run(coroutine); 9 | 10 | public static Coroutine Run(this IEnumerator iEnumeratorCor,string owner, string name =null) => GameController.Instance.CoroutineRunner.Run(iEnumeratorCor,owner,name); 11 | 12 | public static Coroutine GetCopy(this Coroutine coroutine) => coroutine.GetCopy(coroutine); 13 | 14 | public static Coroutine AutoRestart(this Coroutine coroutine, Runner runner) 15 | { 16 | runner.AddToAutoupdate(coroutine); 17 | return coroutine; 18 | } 19 | 20 | 21 | public static Coroutine RunParallel(this Coroutine coroutine) => 22 | GameController.Instance.CoroutineRunnerParallel.Run(coroutine); 23 | 24 | public static Coroutine RunParallel(this IEnumerator iEnumeratorCor, string owner, string name = null) => 25 | GameController.Instance.CoroutineRunnerParallel.Run(iEnumeratorCor, owner, name); 26 | 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /src/Framework/Helpers/LinqHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PoeHUD.Framework.Helpers 5 | { 6 | public static class LinqHelper 7 | { 8 | public static void ForEach(this IEnumerable enumerable, Action action) 9 | { 10 | foreach (T item in enumerable) 11 | { 12 | action(item); 13 | } 14 | } 15 | 16 | public static void ForEach(this IEnumerable> dictionary, 17 | Action action) 18 | { 19 | foreach (KeyValuePair pair in dictionary) 20 | { 21 | action(pair.Key, pair.Value); 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Framework/Helpers/MathHepler.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | using System.Linq; 4 | 5 | namespace PoeHUD.Framework.Helpers 6 | { 7 | public static class MathHepler 8 | { 9 | private const string CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 10 | 11 | static MathHepler() 12 | { 13 | Randomizer = new Random(); 14 | } 15 | 16 | public static Random Randomizer { get; } 17 | 18 | public static double GetPolarCoordinates(this Vector2 vector, out double phi) 19 | { 20 | double distance = vector.Length(); 21 | phi = Math.Acos(vector.X / distance); 22 | if (vector.Y < 0) 23 | { 24 | phi = MathUtil.TwoPi - phi; 25 | } 26 | return distance; 27 | } 28 | 29 | public static string GetRandomWord(int length) 30 | { 31 | var array = new char[length]; 32 | for (int i = 0; i < length; i++) 33 | { 34 | array[i] = CHARS[Randomizer.Next(CHARS.Length)]; 35 | } 36 | return new string(array); 37 | } 38 | 39 | public static float Max(params float[] values) 40 | { 41 | float max = values.First(); 42 | for (int i = 1; i < values.Length; i++) 43 | { 44 | max = Math.Max(max, values[i]); 45 | } 46 | return max; 47 | } 48 | 49 | public static Vector2 Translate(this Vector2 vector, float dx, float dy) 50 | { 51 | return new Vector2(vector.X + dx, vector.Y + dy); 52 | } 53 | 54 | public static Vector3 Translate(this Vector3 vector, float dx, float dy, float dz) 55 | { 56 | return new Vector3(vector.X + dx, vector.Y + dy, vector.Z + dz); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/Framework/Helpers/SoundHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Media; 3 | 4 | namespace PoeHUD.Framework.Helpers 5 | { 6 | public static class SoundHelper 7 | { 8 | public static void Play(this SoundPlayer player, int volume) 9 | { 10 | const ushort MAX_VOLUME = 100; 11 | var newVolume = (ushort)((float)volume / MAX_VOLUME * ushort.MaxValue); 12 | var stereo = newVolume | (uint)newVolume << 16; 13 | WinApi.waveOutSetVolume(IntPtr.Zero, stereo); 14 | player.Play(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Framework/IntRange.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Framework 4 | { 5 | public class IntRange 6 | { 7 | public int Min { get; private set; } 8 | public int Max { get; private set; } 9 | 10 | public void Include(int value) 11 | { 12 | if (value < Min) Min = value; 13 | if (value > Max) Max = value; 14 | } 15 | 16 | public IntRange(int min, int max) 17 | { 18 | Min = min; 19 | Max = max; 20 | } 21 | 22 | public IntRange() 23 | { 24 | Min = int.MaxValue; 25 | Max = int.MinValue; 26 | } 27 | 28 | public override string ToString() 29 | { 30 | return String.Concat(Min, " - ", Max); 31 | } 32 | 33 | internal float GetPercentage(int val) 34 | { 35 | if (Min == Max) 36 | return 1; 37 | return (float)(val - Min) / (Max - Min); 38 | } 39 | 40 | internal bool HasSpread() 41 | { 42 | return Max != Min; 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/Framework/MemoryControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Windows.Forms; 4 | 5 | namespace PoeHUD.Framework 6 | { 7 | public class MemoryControl 8 | { 9 | private static MemoryControl memoryControl; 10 | private long lastTime; 11 | 12 | private MemoryControl() 13 | { 14 | lastTime = DateTime.Now.Ticks; 15 | Application.Idle += delegate 16 | { 17 | try 18 | { 19 | long ticks = DateTime.Now.Ticks; 20 | if (ticks - lastTime > 10000000L) 21 | { 22 | lastTime = ticks; 23 | MemoryFree(); 24 | } 25 | } 26 | catch 27 | { 28 | // ignored 29 | } 30 | }; 31 | } 32 | 33 | private void MemoryFree() 34 | { 35 | try 36 | { 37 | using (Process currentProcess = Process.GetCurrentProcess()) 38 | { 39 | WinApi.SetProcessWorkingSetSize(currentProcess.Handle, -1, -1); 40 | } 41 | } 42 | catch 43 | { 44 | // ignored 45 | } 46 | } 47 | 48 | public static void Start() 49 | { 50 | try 51 | { 52 | if (memoryControl == null && Environment.OSVersion.Platform == PlatformID.Win32NT) 53 | { 54 | memoryControl = new MemoryControl(); 55 | } 56 | } 57 | catch 58 | { 59 | // ignored 60 | } 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /src/Framework/Tools/Generator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Security.Cryptography; 4 | 5 | namespace PoeHUD.Framework.Tools 6 | { 7 | public static class Generators 8 | { 9 | private const string Table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 10 | private static readonly Random Randomizer = new Random(); 11 | 12 | public static string GenerateName(int min, int max, Func invalid) 13 | { 14 | while (true) 15 | { 16 | string value = new string(Enumerable.Repeat(Table, max) 17 | .Select(s => s[Randomizer.Next(s.Length)]) 18 | .ToArray()).Substring(0, Randomizer.Next(min, max)); 19 | 20 | string name = value + ".exe"; 21 | if (invalid(name)) 22 | { 23 | GenerateName(min, max, invalid); 24 | } 25 | 26 | return name; 27 | } 28 | } 29 | 30 | public static byte[] GenerateCryptoSum(int size) 31 | { 32 | byte[] cryptoSum = new byte[size]; 33 | using (RNGCryptoServiceProvider rngCryptoServiceProvider = new RNGCryptoServiceProvider()) 34 | { 35 | rngCryptoServiceProvider.GetBytes(cryptoSum); 36 | } 37 | 38 | return cryptoSum; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Hud/AdvancedTooltip/AdvancedTooltipSettings.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | using PoeHUD.Hud.Settings; 4 | 5 | namespace PoeHUD.Hud.AdvancedTooltip 6 | { 7 | public class AdvancedTooltipSettings : SettingsBase 8 | { 9 | public AdvancedTooltipSettings() 10 | { 11 | Enable = true; 12 | ItemLevel = new ItemLevelSettings(); 13 | ItemMods = new ItemModsSettings(); 14 | WeaponDps = new WeaponDpsSettings(); 15 | } 16 | 17 | [PoeHUD.Plugins.IgnoreMenu] 18 | [JsonProperty("Item level")] 19 | public ItemLevelSettings ItemLevel { get; set; } 20 | 21 | [PoeHUD.Plugins.IgnoreMenu] 22 | [JsonProperty("Item mods")] 23 | public ItemModsSettings ItemMods { get; set; } 24 | 25 | [PoeHUD.Plugins.IgnoreMenu] 26 | [JsonProperty("Weapon DPS")] 27 | public WeaponDpsSettings WeaponDps { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Hud/AdvancedTooltip/ItemLevelSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.AdvancedTooltip 5 | { 6 | public sealed class ItemLevelSettings : SettingsBase 7 | { 8 | public ItemLevelSettings() 9 | { 10 | Enable = true; 11 | TextSize = new RangeNode(16, 10, 50); 12 | TextColor = new ColorBGRA(255, 255, 0, 255); 13 | BackgroundColor = new ColorBGRA(0, 0, 0, 230); 14 | } 15 | 16 | public RangeNode TextSize { get; set; } 17 | public ColorNode TextColor { get; set; } 18 | public ColorNode BackgroundColor { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Hud/AdvancedTooltip/ItemModsSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.AdvancedTooltip 5 | { 6 | public sealed class ItemModsSettings : SettingsBase 7 | { 8 | public ItemModsSettings() 9 | { 10 | Enable = false; 11 | ModTextSize = new RangeNode(13, 10, 50); 12 | BackgroundColor = new ColorBGRA(0, 0, 0, 220); 13 | PrefixColor = new ColorBGRA(136, 136, 255, 255); 14 | SuffixColor = new ColorBGRA(0, 206, 209, 255); 15 | T1Color = new ColorBGRA(255, 0, 255, 255); 16 | T2Color = new ColorBGRA(255, 255, 0, 255); 17 | T3Color = new ColorBGRA(0, 255, 0, 255); 18 | } 19 | 20 | public RangeNode ModTextSize { get; set; } 21 | public ColorNode BackgroundColor { get; set; } 22 | public ColorNode PrefixColor { get; set; } 23 | public ColorNode SuffixColor { get; set; } 24 | public ColorNode T1Color { get; set; } 25 | public ColorNode T2Color { get; set; } 26 | public ColorNode T3Color { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Hud/AdvancedTooltip/WeaponDpsSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.AdvancedTooltip 5 | { 6 | public sealed class WeaponDpsSettings : SettingsBase 7 | { 8 | public WeaponDpsSettings() 9 | { 10 | Enable = true; 11 | TextColor = new ColorBGRA(254, 192, 118, 255); 12 | DpsTextSize = new RangeNode(16, 10, 50); 13 | DpsNameTextSize = new RangeNode(13, 10, 50); 14 | BackgroundColor = new ColorBGRA(255, 255, 0, 255); 15 | DmgColdColor = new ColorBGRA(54, 100, 146, 255); 16 | DmgFireColor = new ColorBGRA(150, 0, 0, 255); 17 | DmgLightningColor = new ColorBGRA(255, 215, 0, 255); 18 | DmgChaosColor = new ColorBGRA(208, 31, 144, 255); 19 | pDamageColor = new ColorBGRA(255, 255, 255, 255); 20 | eDamageColor = new ColorBGRA(0, 255, 255, 255); 21 | } 22 | 23 | public ColorNode TextColor { get; set; } 24 | public RangeNode DpsTextSize { get; set; } 25 | public RangeNode DpsNameTextSize { get; set; } 26 | public ColorNode BackgroundColor { get; set; } 27 | public ColorNode DmgFireColor { get; set; } 28 | public ColorNode DmgColdColor { get; set; } 29 | public ColorNode DmgLightningColor { get; set; } 30 | public ColorNode DmgChaosColor { get; set; } 31 | public ColorNode pDamageColor { get; set; } 32 | public ColorNode eDamageColor { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Hud/DPS/DpsMeterSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | using PoeHUD.Plugins; 4 | using PoeHUD.Hud.Settings; 5 | 6 | namespace PoeHUD.Hud.Dps 7 | { 8 | public sealed class DpsMeterSettings : SettingsBase 9 | { 10 | public DpsMeterSettings() 11 | { 12 | Enable = false; 13 | ShowInTown = false; 14 | DpsFontColor = new ColorBGRA(220, 190, 130, 255); 15 | PeakFontColor = new ColorBGRA(220, 190, 130, 255); 16 | BackgroundColor = new ColorBGRA(0, 0, 0, 255); 17 | ClearNode = new ButtonNode(); 18 | } 19 | 20 | public ToggleNode ShowInTown { get; set; } 21 | public RangeNode TextSize { get; set; } = new RangeNode(16, 10, 20); 22 | public ColorNode DpsFontColor { get; set; } 23 | public ColorNode PeakFontColor { get; set; } 24 | public ColorNode BackgroundColor { get; set; } 25 | public ButtonNode ClearNode { get; set; } 26 | 27 | [Menu("Show AOE")] 28 | public ToggleNode ShowAOE { get; set; } = true; 29 | public ToggleNode ShowCurrentHitDamage { get; set; } = true; 30 | public ToggleNode HasCullingStrike { get; set; } = false; 31 | } 32 | } -------------------------------------------------------------------------------- /src/Hud/DebugPlugin/DebugPluginSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.DebugPlug 4 | { 5 | public class DebugPluginSettings : SettingsBase 6 | { 7 | public DebugPluginSettings() 8 | { 9 | Enable = true; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hud/Health/CreatureType.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Hud.Health 2 | { 3 | public enum CreatureType 4 | { 5 | Player, 6 | Minion, 7 | Normal, 8 | Magic, 9 | Rare, 10 | Unique 11 | } 12 | } -------------------------------------------------------------------------------- /src/Hud/Health/DebuffPanelConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PoeHUD.Hud.Health 4 | { 5 | public class DebuffPanelConfig 6 | { 7 | public Dictionary Bleeding { get; set; } 8 | public Dictionary Corruption { get; set; } 9 | public Dictionary Poisoned { get; set; } 10 | public Dictionary Frozen { get; set; } 11 | public Dictionary Chilled { get; set; } 12 | public Dictionary Burning { get; set; } 13 | public Dictionary Shocked { get; set; } 14 | public Dictionary WeakenedSlowed { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Hud/Health/HealthBarSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.Hud.Health 4 | { 5 | public sealed class HealthBarSettings : SettingsBase 6 | { 7 | public HealthBarSettings() 8 | { 9 | Enable = false; 10 | ShowInTown = false; 11 | ShowES = true; 12 | ShowIncrements = true; 13 | ShowEnemies = true; 14 | Players = new UnitSettings(0x008000ff, 0); 15 | Minions = new UnitSettings(0x90ee90ff, 0); 16 | NormalEnemy = new UnitSettings(0xff0000ff, 0, 0x66ff66ff, false); 17 | MagicEnemy = new UnitSettings(0xff0000ff, 0x8888ffff, 0x66ff99ff, false); 18 | RareEnemy = new UnitSettings(0xff0000ff, 0xffff77ff, 0x66ff99ff, false); 19 | UniqueEnemy = new UnitSettings(0xff0000ff, 0xffa500ff, 0x66ff99ff, false); 20 | ShowDebuffPanel = false; 21 | DebuffPanelIconSize = new RangeNode(20, 15, 40); 22 | } 23 | 24 | public ToggleNode ShowInTown { get; set; } 25 | public ToggleNode ShowES { get; set; } 26 | public ToggleNode ShowIncrements { get; set; } 27 | public ToggleNode ShowEnemies { get; set; } 28 | 29 | [PoeHUD.Plugins.IgnoreMenu] 30 | public UnitSettings Players { get; set; } 31 | [PoeHUD.Plugins.IgnoreMenu] 32 | public UnitSettings Minions { get; set; } 33 | [PoeHUD.Plugins.IgnoreMenu] 34 | public UnitSettings NormalEnemy { get; set; } 35 | [PoeHUD.Plugins.IgnoreMenu] 36 | public UnitSettings MagicEnemy { get; set; } 37 | [PoeHUD.Plugins.IgnoreMenu] 38 | public UnitSettings RareEnemy { get; set; } 39 | [PoeHUD.Plugins.IgnoreMenu] 40 | public UnitSettings UniqueEnemy { get; set; } 41 | 42 | [PoeHUD.Plugins.Menu("Show Debuffs", 0)] 43 | public ToggleNode ShowDebuffPanel { get; set; } 44 | 45 | [PoeHUD.Plugins.Menu("Icon size", 1, 0)] 46 | public RangeNode DebuffPanelIconSize { get; set; } 47 | } 48 | } -------------------------------------------------------------------------------- /src/Hud/HudSkin.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Hud 4 | { 5 | public static class HudSkin 6 | { 7 | public static readonly Color CurrencyColor = new ColorBGRA(170, 158, 130, 0xFF); 8 | 9 | public static readonly Color MagicColor = new ColorBGRA(136, 136, 255, 0xFF); 10 | 11 | public static readonly Color RareColor = new ColorBGRA(255, 255, 119, 0xFF); 12 | 13 | public static readonly Color UniqueColor = new ColorBGRA(175, 96, 37, 0xFF); 14 | 15 | public static readonly Color DivinationCardColor = new ColorBGRA(220, 0, 0, 0xFF); 16 | 17 | public static readonly Color TalismanColor = new ColorBGRA(208, 31, 144, 0xFF); 18 | 19 | public static readonly Color SkillGemColor = new ColorBGRA(26, 162, 155, 0xFF); 20 | 21 | public static readonly Color DmgFireColor = new ColorBGRA(150, 0, 0, 0xFF); 22 | 23 | public static readonly Color DmgColdColor = new ColorBGRA(54, 100, 146, 0xFF); 24 | 25 | public static readonly Color DmgLightingColor = new ColorBGRA(255, 215, 0, 0xFF); 26 | 27 | public static readonly Color DmgChaosColor = new ColorBGRA(208, 31, 144, 0xFF); 28 | } 29 | } -------------------------------------------------------------------------------- /src/Hud/HudTexture.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.UI; 2 | using PoeHUD.Models.Enums; 3 | using SharpDX; 4 | using PoeHUD.Hud.UI.Vertexes; 5 | 6 | namespace PoeHUD.Hud 7 | { 8 | public class HudTexture 9 | { 10 | private string fileName; 11 | private readonly Color color; 12 | 13 | public HudTexture(string fileName) : this(fileName, Color.White) 14 | { 15 | } 16 | 17 | public HudTexture(string fileName, MonsterRarity rarity) 18 | : this(fileName, Color.White) 19 | { 20 | switch (rarity) 21 | { 22 | case MonsterRarity.Magic: 23 | color = HudSkin.MagicColor; 24 | break; 25 | 26 | case MonsterRarity.Rare: 27 | color = HudSkin.RareColor; 28 | break; 29 | 30 | case MonsterRarity.Unique: 31 | color = HudSkin.UniqueColor; 32 | break; 33 | } 34 | } 35 | 36 | public HudTexture(string fileName, Color color) 37 | { 38 | this.fileName = fileName; 39 | this.color = color; 40 | } 41 | 42 | public void Draw(Graphics graphics, RectangleF rectangle) 43 | { 44 | graphics.DrawImage(fileName, rectangle, color); 45 | } 46 | 47 | public void DrawPluginImage(Graphics graphics, RectangleF rectangle) 48 | { 49 | graphics.DrawPluginImage(fileName, rectangle, color); 50 | } 51 | 52 | public void DrawPluginImage(Graphics graphics, TexturedVertex[] data) 53 | { 54 | graphics.DrawPluginImage(fileName, data); 55 | } 56 | 57 | public string FileName 58 | { 59 | get { return fileName; } 60 | set 61 | { 62 | if (fileName != null && fileName != value) 63 | fileName = value; 64 | } 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /src/Hud/Icons/MapIconsSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.Hud.Icons 4 | { 5 | public sealed class MapIconsSettings : SettingsBase 6 | { 7 | public MapIconsSettings() 8 | { 9 | Enable = true; 10 | IconsOnMinimap = true; 11 | IconsOnLargeMap = true; 12 | } 13 | 14 | public ToggleNode IconsOnMinimap { get; set; } 15 | public ToggleNode IconsOnLargeMap { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Hud/Interfaces/IPanelChild.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | 4 | namespace PoeHUD.Hud.Interfaces 5 | { 6 | public interface IPanelChild 7 | { 8 | Size2F Size { get; } 9 | Func StartDrawPointFunc { get; set; } 10 | Vector2 Margin { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Hud/Interfaces/IPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Hud.Interfaces 4 | { 5 | public interface IPlugin : IDisposable 6 | { 7 | void Render(); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Hud/Interfaces/IPluginWithMapIcons.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PoeHUD.Hud.Interfaces 4 | { 5 | public interface IPluginWithMapIcons 6 | { 7 | IEnumerable GetIcons(); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Hud/KillCounter/KillCounterSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.KillCounter 5 | { 6 | public sealed class KillCounterSettings : SettingsBase 7 | { 8 | public KillCounterSettings() 9 | { 10 | Enable = false; 11 | ShowDetail = true; 12 | ShowInTown = false; 13 | TextColor = new ColorBGRA(220, 190, 130, 255); 14 | BackgroundColor = new ColorBGRA(0, 0, 0, 255); 15 | LabelTextSize = new RangeNode(16, 10, 20); 16 | KillsTextSize = new RangeNode(16, 10, 20); 17 | } 18 | 19 | public ToggleNode ShowInTown { get; set; } 20 | public ToggleNode ShowDetail { get; set; } 21 | public ColorNode TextColor { get; set; } 22 | public ColorNode BackgroundColor { get; set; } 23 | public RangeNode LabelTextSize { get; set; } 24 | public RangeNode KillsTextSize { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Hud/Loot/AlertDrawStyle.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Models.Enums; 2 | using SharpDX; 3 | using System.Collections.Generic; 4 | 5 | namespace PoeHUD.Hud.Loot 6 | { 7 | public sealed class AlertDrawStyle 8 | { 9 | public static readonly Color DefaultBackgroundColor = new ColorBGRA(0, 0, 0, 180); 10 | 11 | private static readonly Dictionary colors = new Dictionary 12 | { 13 | { ItemRarity.Normal, Color.White }, 14 | { ItemRarity.Magic, HudSkin.MagicColor }, 15 | { ItemRarity.Rare, HudSkin.RareColor }, 16 | { ItemRarity.Unique, HudSkin.UniqueColor } 17 | }; 18 | 19 | public AlertDrawStyle(object colorRef, int borderWidth, string text, int iconIndex) 20 | { 21 | BorderWidth = borderWidth; 22 | Text = text; 23 | IconIndex = iconIndex; 24 | 25 | if (colorRef is Color) 26 | { 27 | TextColor = (Color)colorRef; 28 | } 29 | else 30 | { 31 | TextColor = GetTextColorByRarity((ItemRarity)colorRef); 32 | } 33 | BorderColor = TextColor; 34 | BackgroundColor = DefaultBackgroundColor; 35 | } 36 | 37 | public static Color GetTextColorByRarity(ItemRarity itemRarity) 38 | { 39 | Color tempColor; 40 | return colors.TryGetValue(itemRarity, out tempColor) ? tempColor : Color.White; 41 | } 42 | 43 | public AlertDrawStyle(string text, Color textColor, int borderWidth, Color borderColor, Color backgroundColor, int iconIndex) 44 | { 45 | TextColor = textColor; 46 | BorderWidth = borderWidth; 47 | BorderColor = borderColor; 48 | Text = text; 49 | IconIndex = iconIndex; 50 | BackgroundColor = backgroundColor; 51 | } 52 | 53 | public Color TextColor { get; } 54 | public int BorderWidth { get; private set; } 55 | public Color BorderColor { get; private set; } 56 | public Color BackgroundColor { get; private set; } 57 | public string Text { get; private set; } 58 | public int IconIndex { get; private set; } 59 | } 60 | } -------------------------------------------------------------------------------- /src/Hud/Loot/BorderSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.Loot 5 | { 6 | public sealed class BorderSettings : SettingsBase 7 | { 8 | public BorderSettings() 9 | { 10 | Enable = false; 11 | BorderColor = Color.FromAbgr(0xbb252ff); 12 | CantPickUpBorderColor = Color.Red; 13 | NotMyItemBorderColor = Color.Yellow; 14 | ShowTimer = true; 15 | BorderWidth = new RangeNode(1, 1, 10); 16 | TimerTextSize = new RangeNode(10, 8, 40); 17 | } 18 | 19 | public ColorNode BorderColor { get; set; } 20 | public ColorNode CantPickUpBorderColor { get; set; } 21 | public ColorNode NotMyItemBorderColor { get; set; } 22 | public ToggleNode ShowTimer { get; set; } 23 | public RangeNode BorderWidth { get; set; } 24 | public RangeNode TimerTextSize { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Hud/Loot/CraftingBase.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Models.Enums; 2 | using System; 3 | 4 | namespace PoeHUD.Hud.Loot 5 | { 6 | public struct CraftingBase 7 | { 8 | public string Name { get; set; } 9 | public int MinItemLevel { get; set; } 10 | public int MinQuality { get; set; } 11 | public ItemRarity[] Rarities { get; set; } 12 | 13 | public override int GetHashCode() 14 | { 15 | return Name.ToLowerInvariant().GetHashCode(); 16 | } 17 | 18 | public override bool Equals(object obj) 19 | { 20 | var strct = (CraftingBase)obj; 21 | return Name.Equals(strct.Name, StringComparison.InvariantCultureIgnoreCase); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Hud/Loot/ItemCounterSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.Hud.Loot 4 | { 5 | public sealed class ItemCounterSettings : SettingsBase 6 | { 7 | public ItemCounterSettings() 8 | { 9 | Enable = false; 10 | ShowDetail = true; 11 | } 12 | 13 | public ToggleNode ShowDetail { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Hud/Loot/QualityItemSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.Hud.Loot 4 | { 5 | public sealed class QualityItemSettings : SettingsBase 6 | { 7 | public QualityItemSettings() 8 | { 9 | } 10 | 11 | public QualityItemSettings(bool enable, int minQuality) 12 | { 13 | Enable = enable; 14 | MinQuality = new RangeNode(minQuality, 0, 20); 15 | } 16 | 17 | public RangeNode MinQuality { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Hud/Loot/QualityItemsSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.Hud.Loot 4 | { 5 | public class QualityItemsSettings : SettingsBase 6 | { 7 | public QualityItemsSettings() 8 | { 9 | Enable = true; 10 | Weapon = new QualityItemSettings(false, 12); 11 | Armour = new QualityItemSettings(false, 12); 12 | Flask = new QualityItemSettings(false, 10); 13 | SkillGem = new QualityItemSettings(true, 0); 14 | } 15 | 16 | public QualityItemSettings Weapon { get; set; } 17 | public QualityItemSettings Armour { get; set; } 18 | public QualityItemSettings Flask { get; set; } 19 | public QualityItemSettings SkillGem { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Hud/Performance.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | 3 | namespace PoeHUD.Hud.Performance 4 | { 5 | public sealed class PerformanceSettings: SettingsBase 6 | { 7 | 8 | 9 | public PerformanceSettings() 10 | { 11 | Enable = true; 12 | 13 | UpdateEntityDataLimit = new RangeNode(25,10,200); 14 | UpdateAreaLimit = new RangeNode(100,25,1000); 15 | UpdateIngemeStateLimit = new RangeNode(100,25,1000); 16 | IterCoroutinePerLoop = new RangeNode(3,1,20); 17 | RenderLimit = new RangeNode(60, 10,200); 18 | LoopLimit = new RangeNode(5, 1,300); 19 | ParallelCoroutineLimit = new RangeNode(3, 1,300); 20 | DpsUpdateTime = new RangeNode(200, 20,600); 21 | Cache = new ToggleNode(true); 22 | ParallelEntityUpdate = new ToggleNode(false); 23 | AlwaysForeground = new ToggleNode(false); 24 | } 25 | 26 | 27 | public RangeNode UpdateEntityDataLimit { get; set; } 28 | public RangeNode IterCoroutinePerLoop { get; set; } 29 | public RangeNode UpdateIngemeStateLimit { get; set; } 30 | public RangeNode UpdateAreaLimit { get; set; } 31 | public RangeNode RenderLimit { get; set; } 32 | public RangeNode LoopLimit { get; set; } 33 | public RangeNode ParallelCoroutineLimit { get; set; } 34 | public RangeNode DpsUpdateTime { get; set; } 35 | public ToggleNode Cache { get; set; } 36 | public ToggleNode ParallelEntityUpdate { get; set; } 37 | public ToggleNode AlwaysForeground { get; set; } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Hud/PluginWithMapIcons.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | using PoeHUD.Hud.Interfaces; 3 | using PoeHUD.Hud.Settings; 4 | using PoeHUD.Hud.UI; 5 | using PoeHUD.Models; 6 | using System.Collections.Generic; 7 | 8 | namespace PoeHUD.Hud 9 | { 10 | public abstract class PluginWithMapIcons : Plugin, IPluginWithMapIcons where TSettings : SettingsBase 11 | { 12 | protected readonly Dictionary CurrentIcons; 13 | 14 | protected PluginWithMapIcons(GameController gameController, Graphics graphics, TSettings settings) : base(gameController, graphics, settings) 15 | { 16 | CurrentIcons = new Dictionary(); 17 | GameController.Area.AreaChange += delegate 18 | { 19 | CurrentIcons.Clear(); 20 | }; 21 | toRemove = new EntityWrapper[512]; 22 | } 23 | 24 | protected override void OnEntityRemoved(EntityWrapper entityWrapper) 25 | { 26 | base.OnEntityRemoved(entityWrapper); 27 | CurrentIcons.Remove(entityWrapper); 28 | } 29 | 30 | private EntityWrapper[] toRemove; 31 | private int index; 32 | public IEnumerable GetIcons() 33 | { 34 | index = 0; 35 | foreach (var kv in CurrentIcons) 36 | { 37 | if (kv.Value.IsEntityStillValid()) 38 | yield return kv.Value; 39 | else 40 | { 41 | toRemove[index] = kv.Key; 42 | index++; 43 | } 44 | } 45 | for (int i = 0; i < index; i++) 46 | { 47 | EntityWrapper entityToRemove = toRemove[index]; 48 | if (entityToRemove != null) 49 | CurrentIcons.Remove(entityToRemove); 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /src/Hud/Settings/ButtonNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace PoeHUD.Hud.Settings 5 | { 6 | public class ButtonNode 7 | { 8 | [JsonIgnore] 9 | public Action OnPressed = delegate { }; 10 | 11 | public ButtonNode() 12 | { 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Hud/Settings/ColorNode.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Hud.Settings 4 | { 5 | public sealed class ColorNode 6 | { 7 | public ColorNode() 8 | { 9 | } 10 | 11 | public ColorNode(uint color) 12 | { 13 | Value = Color.FromAbgr(color); 14 | } 15 | 16 | public ColorNode(Color color) 17 | { 18 | Value = color; 19 | } 20 | 21 | public Color Value { get; set; } 22 | 23 | public static implicit operator Color(ColorNode node) 24 | { 25 | return node.Value; 26 | } 27 | 28 | public static implicit operator ColorNode(uint value) 29 | { 30 | return new ColorNode(value); 31 | } 32 | 33 | public static implicit operator ColorNode(Color value) 34 | { 35 | return new ColorNode(value); 36 | } 37 | 38 | public static implicit operator ColorNode(ColorBGRA value) 39 | { 40 | return new ColorNode(value); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Hud/Settings/Converters/ColorNodeConverter.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Converters; 3 | using System; 4 | using System.Globalization; 5 | 6 | namespace PoeHUD.Hud.Settings.Converters 7 | { 8 | public class ColorNodeConverter : CustomCreationConverter 9 | { 10 | public override bool CanWrite => true; 11 | public override bool CanRead => true; 12 | 13 | public override ColorNode Create(Type objectType) 14 | { 15 | return new ColorNode(); 16 | } 17 | 18 | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 19 | { 20 | uint argb; 21 | return uint.TryParse(reader.Value.ToString(), NumberStyles.HexNumber, null, out argb) 22 | ? new ColorNode(argb) 23 | : Create(objectType); 24 | } 25 | 26 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 27 | { 28 | var color = (ColorNode)value; 29 | serializer.Serialize(writer, $"{color.Value.ToAbgr():x8}"); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Hud/Settings/Converters/FileNodeConverter.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Converters; 3 | using System; 4 | 5 | namespace PoeHUD.Hud.Settings.Converters 6 | { 7 | public class FileNodeConverter : CustomCreationConverter 8 | { 9 | public override bool CanWrite => true; 10 | public override bool CanRead => true; 11 | 12 | public override FileNode Create(Type objectType) 13 | { 14 | return string.Empty; 15 | } 16 | 17 | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 18 | { 19 | return new FileNode(serializer.Deserialize(reader)); 20 | } 21 | 22 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 23 | { 24 | var fileNode = value as FileNode; 25 | if (fileNode != null) serializer.Serialize(writer, fileNode.Value); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Hud/Settings/Converters/ToggleNodeConverter.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Converters; 3 | using System; 4 | 5 | namespace PoeHUD.Hud.Settings.Converters 6 | { 7 | public class ToggleNodeConverter : CustomCreationConverter 8 | { 9 | public override bool CanWrite => true; 10 | public override bool CanRead => true; 11 | 12 | public override ToggleNode Create(Type objectType) 13 | { 14 | return false; 15 | } 16 | 17 | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 18 | { 19 | return new ToggleNode(serializer.Deserialize(reader)); 20 | } 21 | 22 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 23 | { 24 | var toggleNode = value as ToggleNode; 25 | serializer.Serialize(writer, toggleNode != null && toggleNode.Value); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Hud/Settings/EmptyNode.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Hud.Settings 2 | { 3 | public class EmptyNode 4 | { 5 | public EmptyNode() 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Hud/Settings/FileNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace PoeHUD.Hud.Settings 5 | { 6 | public sealed class FileNode 7 | { 8 | public FileNode() 9 | { 10 | } 11 | 12 | public FileNode(string value) 13 | { 14 | Value = value; 15 | } 16 | 17 | [JsonIgnore] 18 | public Action OnFileChanged = delegate { }; 19 | 20 | private string value; 21 | 22 | public string Value 23 | { 24 | get { return value; } 25 | set 26 | { 27 | this.value = value; 28 | OnFileChanged(); 29 | } 30 | } 31 | 32 | public static implicit operator string(FileNode node) 33 | { 34 | return node.Value; 35 | } 36 | 37 | public static implicit operator FileNode(string value) 38 | { 39 | return new FileNode(value); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/Hud/Settings/HotkeyNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using Newtonsoft.Json; 4 | using PoeHUD.Framework; 5 | 6 | namespace PoeHUD.Hud.Settings 7 | { 8 | public class HotkeyNode 9 | { 10 | [JsonIgnore] 11 | public Action OnValueChanged = delegate { }; 12 | private Keys value; 13 | 14 | public HotkeyNode() 15 | { 16 | value = Keys.Space; 17 | } 18 | 19 | public HotkeyNode(Keys value) 20 | { 21 | Value = value; 22 | } 23 | 24 | public Keys Value 25 | { 26 | get { return value; } 27 | set 28 | { 29 | if (this.value != value) 30 | { 31 | this.value = value; 32 | 33 | try 34 | { 35 | OnValueChanged(); 36 | } 37 | catch 38 | { 39 | DebugPlug.DebugPlugin.LogMsg("Error in function that subscribed for: HotkeyNode.OnValueChanged", 10, SharpDX.Color.Red); 40 | } 41 | } 42 | } 43 | } 44 | 45 | public static implicit operator Keys(HotkeyNode node) 46 | { 47 | return node.Value; 48 | } 49 | 50 | public static implicit operator HotkeyNode(Keys value) 51 | { 52 | return new HotkeyNode(value); 53 | } 54 | 55 | private bool _pressed; 56 | public bool PressedOnce() 57 | { 58 | if(WinApi.IsKeyDown(value)) 59 | { 60 | if (_pressed) 61 | return false; 62 | _pressed = true; 63 | return true; 64 | } 65 | 66 | _pressed = false; 67 | return false; 68 | } 69 | 70 | private bool _unPressed; 71 | public bool UnpressedOnce() 72 | { 73 | if(WinApi.IsKeyDown(value)) 74 | { 75 | _unPressed = true; 76 | } 77 | else 78 | { 79 | if (_unPressed) 80 | { 81 | _unPressed = false; 82 | return true; 83 | } 84 | } 85 | 86 | return false; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/Hud/Settings/ListNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | using PoeHUD.Hud.Menu; 4 | using System.Collections.Generic; 5 | 6 | namespace PoeHUD.Hud.Settings 7 | { 8 | public class ListNode 9 | { 10 | [JsonIgnore] 11 | public Action OnValueSelected = delegate { }; 12 | [JsonIgnore] 13 | public Action OnValueSelectedPre = delegate { }; 14 | 15 | private string value; 16 | 17 | public ListNode() 18 | { 19 | } 20 | 21 | public string Value 22 | { 23 | get { return value; } 24 | set 25 | { 26 | if (this.value != value) 27 | { 28 | try 29 | { 30 | OnValueSelectedPre(value); 31 | } 32 | catch 33 | { 34 | DebugPlug.DebugPlugin.LogMsg("Error in function that subscribed for: ListNode.OnValueSelectedPre", 10, SharpDX.Color.Red); 35 | } 36 | 37 | this.value = value; 38 | 39 | try 40 | { 41 | OnValueSelected(value); 42 | } 43 | catch (Exception ex) 44 | { 45 | DebugPlug.DebugPlugin.LogMsg($"Error in function that subscribed for: ListNode.OnValueSelected. Error: {ex.Message}", 10, SharpDX.Color.Red); 46 | } 47 | } 48 | } 49 | } 50 | 51 | public static implicit operator string(ListNode node) 52 | { 53 | return node.Value; 54 | } 55 | 56 | public List Values = new List(); 57 | 58 | public void SetListValues(List values) 59 | { 60 | Values = values; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/Hud/Settings/RangeNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace PoeHUD.Hud.Settings 5 | { 6 | public sealed class RangeNode where T : struct 7 | { 8 | private T _value; 9 | public RangeNode() 10 | { 11 | } 12 | 13 | public RangeNode(T value, T min, T max) 14 | { 15 | Value = value; 16 | Min = min; 17 | Max = max; 18 | } 19 | 20 | public T Value 21 | { 22 | get => _value; 23 | set 24 | { 25 | if (!value.Equals(_value)) 26 | { 27 | _value = value; 28 | try 29 | { 30 | OnValueChanged(); 31 | } 32 | catch (Exception) 33 | { 34 | 35 | DebugPlug.DebugPlugin.LogMsg("Error in function that subscribed for: RangeNode.OnValueChanged", 10, SharpDX.Color.Red); 36 | } 37 | } 38 | } 39 | } 40 | 41 | public event Action OnValueChanged = delegate { }; 42 | 43 | [JsonIgnore] 44 | public T Min { get; set; } 45 | [JsonIgnore] 46 | public T Max { get; set; } 47 | 48 | public static implicit operator T(RangeNode node) 49 | { 50 | return node.Value; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /src/Hud/Settings/SettingsBase.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Hud.Settings 2 | { 3 | public abstract class SettingsBase 4 | { 5 | public SettingsBase() 6 | { 7 | Enable = true; 8 | } 9 | public ToggleNode Enable { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Hud/Settings/SortContractResolver.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Serialization; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Reflection; 7 | 8 | namespace PoeHUD.Hud.Settings 9 | { 10 | public sealed class SortContractResolver : DefaultContractResolver 11 | { 12 | private const int MAX_PROPERTIES_PER_CONTRACT = 1000; 13 | 14 | protected override IList CreateProperties(Type type, MemberSerialization memberSerialization) 15 | { 16 | List members = GetSerializableMembers(type); 17 | if (members == null) 18 | { 19 | throw new JsonSerializationException("Null collection of serializable members returned."); 20 | } 21 | 22 | return members.Select(member => CreateProperty(member, memberSerialization)) 23 | .Where(x => x != null) 24 | .OrderBy(x => MAX_PROPERTIES_PER_CONTRACT * GetTypeDepth(x.DeclaringType) + (x.Order ?? 0)) 25 | .ToList(); 26 | } 27 | 28 | private static int GetTypeDepth(Type type) 29 | { 30 | int depth = 0; 31 | while ((type = type.BaseType) != null) 32 | { 33 | depth++; 34 | } 35 | return depth; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/Hud/Settings/StashTabNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Newtonsoft.Json; 7 | using PoeHUD.Poe.RemoteMemoryObjects; 8 | 9 | namespace PoeHUD.Hud.Settings 10 | { 11 | public class StashTabNode 12 | { 13 | public const string EMPTYNAME = "-NoName-"; 14 | public StashTabNode() { } 15 | public StashTabNode(string name, int visibleIndex) 16 | { 17 | Name = name; 18 | VisibleIndex = visibleIndex; 19 | } 20 | 21 | public StashTabNode(ServerStashTab serverTab, int id) 22 | { 23 | Name = serverTab.Name; 24 | VisibleIndex = serverTab.VisibleIndex; 25 | IsRemoveOnly = (serverTab.Flags & ServerStashTab.InventoryTabFlags.RemoveOnly) == ServerStashTab.InventoryTabFlags.RemoveOnly; 26 | Id = id; 27 | } 28 | 29 | public string Name { get; set; } = EMPTYNAME; 30 | public int VisibleIndex { get; set; } = -1;//-1 = Ignore 31 | 32 | [JsonIgnore] 33 | public bool Exist { get; set; } 34 | [JsonIgnore] 35 | internal int Id { get; set; } = -1; 36 | [JsonIgnore] 37 | public bool IsRemoveOnly { get; set; } 38 | 39 | public override string ToString() 40 | { 41 | return $"Name: {Name}, Id: {Id}, Exist: {Exist}, IsRemoveOnly: {IsRemoveOnly}"; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Hud/Settings/TextNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Newtonsoft.Json; 7 | 8 | namespace PoeHUD.Hud.Settings 9 | { 10 | public class TextNode 11 | { 12 | [JsonIgnore] 13 | public Action OnValueChanged = delegate { }; 14 | private string value = ""; 15 | 16 | public TextNode() 17 | { 18 | } 19 | 20 | public TextNode(string value) 21 | { 22 | Value = value; 23 | } 24 | 25 | public void SetValueNoEvent(string newValue) 26 | { 27 | value = newValue; 28 | } 29 | 30 | public string Value 31 | { 32 | get { return value; } 33 | set 34 | { 35 | if (this.value != value) 36 | { 37 | this.value = value; 38 | 39 | try 40 | { 41 | OnValueChanged(); 42 | } 43 | catch (Exception) 44 | { 45 | 46 | DebugPlug.DebugPlugin.LogMsg("Error in function that subscribed for: TextNode.OnValueChanged", 10, SharpDX.Color.Red); 47 | } 48 | } 49 | } 50 | } 51 | 52 | public static implicit operator string(TextNode node) 53 | { 54 | return node.Value; 55 | } 56 | 57 | public static implicit operator TextNode(string value) 58 | { 59 | return new TextNode(value); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Hud/Settings/ToggleNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace PoeHUD.Hud.Settings 5 | { 6 | public sealed class ToggleNode 7 | { 8 | [JsonIgnore] 9 | public Action OnValueChanged = delegate { }; 10 | private bool value; 11 | 12 | public ToggleNode() 13 | { 14 | } 15 | 16 | public ToggleNode(bool value) 17 | { 18 | Value = value; 19 | } 20 | 21 | public void SetValueNoEvent(bool newValue) 22 | { 23 | value = newValue; 24 | } 25 | 26 | public bool Value 27 | { 28 | get { return value; } 29 | set 30 | { 31 | if (this.value != value) 32 | { 33 | this.value = value; 34 | try 35 | { 36 | OnValueChanged(); 37 | } 38 | catch (Exception) 39 | { 40 | DebugPlug.DebugPlugin.LogMsg("Error in function that subscribed for: ToggleNode.OnValueChanged", 10, SharpDX.Color.Red); 41 | } 42 | } 43 | } 44 | } 45 | 46 | public static implicit operator bool(ToggleNode node) 47 | { 48 | return node.Value; 49 | } 50 | 51 | public static implicit operator ToggleNode(bool value) 52 | { 53 | return new ToggleNode(value); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/Hud/SizedPlugin.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | using PoeHUD.Hud.Interfaces; 3 | using PoeHUD.Hud.Settings; 4 | using PoeHUD.Hud.UI; 5 | using SharpDX; 6 | using System; 7 | 8 | namespace PoeHUD.Hud 9 | { 10 | public abstract class SizedPlugin : Plugin, IPanelChild where TSettings : SettingsBase 11 | { 12 | protected SizedPlugin(GameController gameController, Graphics graphics, TSettings settings) 13 | : base(gameController, graphics, settings) 14 | { } 15 | 16 | public Size2F Size { get; set; } 17 | public Func StartDrawPointFunc { get; set; } 18 | public Vector2 Margin { get; set; } 19 | 20 | public override void Render() 21 | { 22 | Size = new Size2F(); 23 | Margin = new Vector2(0, 0); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Hud/SizedPluginWithMapIcons.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | using PoeHUD.Hud.Interfaces; 3 | using PoeHUD.Hud.Settings; 4 | using PoeHUD.Hud.UI; 5 | using SharpDX; 6 | using System; 7 | 8 | namespace PoeHUD.Hud 9 | { 10 | public abstract class SizedPluginWithMapIcons : PluginWithMapIcons, IPanelChild 11 | where TSettings : SettingsBase 12 | { 13 | protected SizedPluginWithMapIcons(GameController gameController, Graphics graphics, TSettings settings) 14 | : base(gameController, graphics, settings) 15 | { } 16 | 17 | public Size2F Size { get; protected set; } 18 | public Func StartDrawPointFunc { get; set; } 19 | public Vector2 Margin { get; private set; } 20 | 21 | public override void Render() 22 | { 23 | Size = new Size2F(); 24 | Margin = new Vector2(0, 0); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Hud/Trackers/MonsterTrackerSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.Trackers 5 | { 6 | public sealed class MonsterTrackerSettings : SettingsBase 7 | { 8 | public MonsterTrackerSettings() 9 | { 10 | Enable = true; 11 | Monsters = true; 12 | Minions = true; 13 | PlaySound = true; 14 | ShowText = true; 15 | SoundVolume = new RangeNode(50, 0, 100); 16 | TextSize = new RangeNode(24, 10, 50); 17 | BackgroundColor = new ColorBGRA(192, 192, 192, 230); 18 | TextPositionX = new RangeNode(50, 0, 100); 19 | TextPositionY = new RangeNode(85, 0, 100); 20 | DefaultTextColor = Color.Red; 21 | MinionsIcon = new RangeNode(3, 1, 6); 22 | WhiteMobIcon = new RangeNode(4, 1, 8); 23 | MagicMobIcon = new RangeNode(6, 1, 12); 24 | RareMobIcon = new RangeNode(8, 1, 16); 25 | UniqueMobIcon = new RangeNode(10, 1, 20); 26 | } 27 | 28 | public ToggleNode Monsters { get; set; } 29 | public ToggleNode Minions { get; set; } 30 | public ToggleNode PlaySound { get; set; } 31 | public RangeNode SoundVolume { get; set; } 32 | public ToggleNode ShowText { get; set; } 33 | public RangeNode TextSize { get; set; } 34 | public ColorNode DefaultTextColor { get; set; } 35 | public ColorNode BackgroundColor { get; set; } 36 | public RangeNode TextPositionX { get; set; } 37 | public RangeNode TextPositionY { get; set; } 38 | public RangeNode MinionsIcon { get; set; } 39 | public RangeNode WhiteMobIcon { get; set; } 40 | public RangeNode MagicMobIcon { get; set; } 41 | public RangeNode RareMobIcon { get; set; } 42 | public RangeNode UniqueMobIcon { get; set; } 43 | } 44 | } -------------------------------------------------------------------------------- /src/Hud/UI/Vertexes/ColoredVertex.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using SharpDX.Direct3D9; 3 | 4 | namespace PoeHUD.Hud.UI.Vertexes 5 | { 6 | public struct ColoredVertex 7 | { 8 | public static readonly VertexElement[] VertexElements = 9 | { 10 | new VertexElement(0, 0, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.Position, 0), 11 | new VertexElement(0, 8, DeclarationType.Color, DeclarationMethod.Default, DeclarationUsage.Color, 0), 12 | VertexElement.VertexDeclarationEnd 13 | }; 14 | 15 | private Vector2 position; 16 | private ColorBGRA color; 17 | 18 | public ColoredVertex(float x, float y, ColorBGRA color) 19 | { 20 | position = new Vector2(x, y); 21 | this.color = color; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Hud/UI/Vertexes/GuiVertex.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using SharpDX; 3 | using SharpDX.Direct3D9; 4 | 5 | namespace PoeHUD.Hud.UI.Vertexes 6 | { 7 | [StructLayout(LayoutKind.Sequential)] 8 | public struct GuiVertex 9 | { 10 | public static readonly VertexElement[] VertexElements = 11 | { 12 | new VertexElement(0, 0, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.Position, 0), 13 | new VertexElement(0, 8, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0), 14 | new VertexElement(0, 16, DeclarationType.Color, DeclarationMethod.Default, DeclarationUsage.Color, 0), 15 | 16 | VertexElement.VertexDeclarationEnd 17 | }; 18 | 19 | public Vector2 pos; 20 | public Vector2 uv; 21 | public uint col; 22 | 23 | 24 | public GuiVertex(float x, float y, float u, float v, uint diffuse) 25 | { 26 | pos = new Vector2(x, y); 27 | uv = new Vector2(u, v); 28 | this.col = diffuse; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Hud/UI/Vertexes/TexturedVertex.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using SharpDX.Direct3D9; 3 | 4 | namespace PoeHUD.Hud.UI.Vertexes 5 | { 6 | public struct TexturedVertex 7 | { 8 | public static readonly VertexElement[] VertexElements = 9 | { 10 | new VertexElement(0, 0, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.Position, 0), 11 | new VertexElement(0, 8, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0), 12 | new VertexElement(0, 16, DeclarationType.Color, DeclarationMethod.Default, DeclarationUsage.Color, 0), 13 | VertexElement.VertexDeclarationEnd 14 | }; 15 | 16 | private Vector2 position, textureUV; 17 | private ColorBGRA diffuse; 18 | 19 | public TexturedVertex(float x, float y, float u, float v, ColorBGRA diffuse) 20 | { 21 | position = new Vector2(x, y); 22 | textureUV = new Vector2(u, v); 23 | this.diffuse = diffuse; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Hud/XpRate/XpRateSettings.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Hud.Settings; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Hud.XpRate 5 | { 6 | public sealed class XpRateSettings : SettingsBase 7 | { 8 | public XpRateSettings() 9 | { 10 | Enable = true; 11 | OnlyAreaName = false; 12 | ShowLatency = true; 13 | ShowFps = true; 14 | ShowInTown = true; 15 | TextSize = new RangeNode(16, 10, 20); 16 | BackgroundColor = new ColorBGRA(0, 0, 0, 255); 17 | AreaTextColor = new ColorBGRA(140, 200, 255, 255); 18 | XphTextColor = new ColorBGRA(220, 190, 130, 255); 19 | TimeLeftColor = new ColorBGRA(220, 190, 130, 255); 20 | FpsTextColor = new ColorBGRA(220, 190, 130, 255); 21 | TimerTextColor = new ColorBGRA(220, 190, 130, 255); 22 | LatencyTextColor = new ColorBGRA(220, 190, 130, 255); 23 | DelveInfoTextcolor = new ColorBGRA(220, 190, 130, 255); 24 | } 25 | 26 | public ToggleNode ShowInTown { get; set; } 27 | public ToggleNode ShowLatency { get; set; } 28 | public ToggleNode ShowFps { get; set; } 29 | public ToggleNode OnlyAreaName { get; set; } 30 | public RangeNode TextSize { get; set; } 31 | public ColorNode BackgroundColor { get; set; } 32 | public ColorNode AreaTextColor { get; set; } 33 | public ColorNode XphTextColor { get; set; } 34 | public ColorNode TimeLeftColor { get; set; } 35 | public ColorNode FpsTextColor { get; set; } 36 | public ColorNode TimerTextColor { get; set; } 37 | public ColorNode LatencyTextColor { get; set; } 38 | public ColorNode DelveInfoTextcolor { get; set; } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Models/AreaInstance.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe.RemoteMemoryObjects; 2 | using System; 3 | 4 | namespace PoeHUD.Models 5 | { 6 | public sealed class AreaInstance 7 | { 8 | public int RealLevel { get; } 9 | public string Name { get; } 10 | public int Act { get; } 11 | public bool IsTown { get; } 12 | public bool IsHideout { get; } 13 | public bool HasWaypoint { get; } 14 | public bool IsMap { get; } 15 | public uint Hash { get; } 16 | public bool IsCombatArea => !IsTown && !IsHideout; 17 | 18 | public DateTime TimeEntered = DateTime.Now; 19 | 20 | public AreaTemplate Area { get; } 21 | 22 | public AreaInstance(AreaTemplate area, uint hash, int realLevel) 23 | { 24 | Area = area; 25 | Hash = hash; 26 | RealLevel = realLevel; 27 | Name = area.Name; 28 | Act = area.Act; 29 | IsTown = area.IsTown; 30 | HasWaypoint = area.HasWaypoint; 31 | IsMap = area.IsMap; 32 | IsHideout = area.RawName.ToLower().Contains("hideout"); 33 | } 34 | 35 | public override string ToString() 36 | { 37 | return $"{Name} ({RealLevel}) #{Hash}"; 38 | } 39 | 40 | public string DisplayName => String.Concat(Name, " (", RealLevel, ")"); 41 | 42 | public static string GetTimeString(TimeSpan timeSpent) 43 | { 44 | int allsec = (int)timeSpent.TotalSeconds; 45 | int secs = allsec % 60; 46 | int mins = allsec / 60; 47 | int hours = mins / 60; 48 | mins = mins % 60; 49 | return String.Format(hours > 0 ? "{0}:{1:00}:{2:00}" : "{1}:{2:00}", hours, mins, secs); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/Models/Attributes/HideInReflectionAttibute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Models.Attributes 8 | { 9 | /// Used to hide some class members from preview in plugins like ImGUI Developer due to useless information 10 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Method)] 11 | public class HideInReflectionAttribute : Attribute 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Models/Attributes/StaticOffsetFieldDebugAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Attributes 2 | { 3 | using System; 4 | 5 | /// 6 | /// Used by ImguiDebug plugin. Adds a slider to static field to fix some offset by dragging it 7 | /// Implements the 8 | /// 9 | /// 10 | public class StaticOffsetFieldDebugAttribute : Attribute 11 | { 12 | public int SliderMin = -1; 13 | public int SliderMax; 14 | 15 | public StaticOffsetFieldDebugAttribute() 16 | { 17 | } 18 | 19 | /// 20 | /// Initializes a new instance of the class. 21 | /// 22 | /// You can set the slider min max using this. 23 | public StaticOffsetFieldDebugAttribute(int sliderMin, int sliderMax) 24 | { 25 | SliderMin = sliderMin; 26 | SliderMax = sliderMax; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Models/BaseItemType.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models 2 | { 3 | public class BaseItemType 4 | { 5 | public string ClassName { get; set; } 6 | public int Width { get; set; } 7 | public int Height { get; set; } 8 | public int DropLevel { get; set; } 9 | public string BaseName { get; set; } 10 | public string[] Tags; 11 | public string[] MoreTagsFromPath; 12 | } 13 | } -------------------------------------------------------------------------------- /src/Models/CacheComponent/PlayerCache.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe; 2 | using PoeHUD.Poe.Components; 3 | 4 | namespace PoeHUD.Models.CacheComponent 5 | { 6 | public class PlayerCache 7 | { 8 | public Entity Player { get; private set; } 9 | private Positioned _positioned; 10 | private Actor _actor; 11 | 12 | 13 | public Positioned Positioned => _positioned ?? (_positioned = Player.GetComponent()); 14 | public Actor Actor => _actor ?? (_actor = Player.GetComponent()); 15 | 16 | public PlayerCache(Entity Player) 17 | { 18 | this.Player = Player; 19 | } 20 | 21 | public void UpdateCache(Entity player) 22 | { 23 | Player = player; 24 | _positioned = Player.GetComponent(); 25 | _actor = Player.GetComponent(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Models/ConfigLineBase.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Models 4 | { 5 | public abstract class ConfigLineBase 6 | { 7 | public string Text { get; set; } 8 | public Color? Color { get; set; } 9 | 10 | public override bool Equals(object obj) 11 | { 12 | return Text == ((ConfigLineBase)obj).Text; 13 | } 14 | 15 | public override int GetHashCode() 16 | { 17 | return Text.GetHashCode(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Models/Enums/DamageType.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum DamageType 4 | { 5 | Physical, 6 | Fire, 7 | Cold, 8 | Lightning, 9 | Chaos 10 | } 11 | } -------------------------------------------------------------------------------- /src/Models/Enums/DiagnosticInfoType.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum DiagnosticInfoType 4 | { 5 | Off, 6 | Full, 7 | Short 8 | } 9 | } -------------------------------------------------------------------------------- /src/Models/Enums/InventoryIndex.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum InventoryIndex 4 | { 5 | None, 6 | Helm, 7 | Amulet, 8 | Chest, 9 | LWeapon, 10 | RWeapon, 11 | LWeaponSwap, 12 | RWeaponSwap, 13 | LRing, 14 | RRing, 15 | Gloves, 16 | Belt, 17 | Boots, 18 | PlayerInventory, 19 | Flask 20 | //Stash1 = 24, 21 | //Stash2 22 | } 23 | } -------------------------------------------------------------------------------- /src/Models/Enums/InventoryType.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum InventoryType 4 | { 5 | InvalidInventory, //Incase inventory isn't opened. 6 | PlayerInventory, 7 | NormalStash, 8 | QuadStash, 9 | CurrencyStash, 10 | EssenceStash, 11 | DivinationStash, 12 | MapStash, 13 | FragmentStash 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Models/Enums/ItemRarity.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum ItemRarity 4 | { 5 | Normal = 0, 6 | Magic = 1, 7 | Rare = 2, 8 | Unique = 3 9 | } 10 | } -------------------------------------------------------------------------------- /src/Models/Enums/ItemStatEnum.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum ItemStatEnum 4 | { 5 | Armor, 6 | EnergyShield, 7 | Evasion, 8 | AverageElementalDamage, 9 | AveragePhysicalDamage, 10 | AttackPerSecond, 11 | DPS, 12 | PhysicalDPS, 13 | WeaponCritChance, 14 | Sockets, 15 | LinkedSockets, 16 | Strength, 17 | Dexterity, 18 | Intelligence, 19 | AddedHP, 20 | AddedMana, 21 | AddedES, 22 | AddedESPercent, 23 | LightningResistance, 24 | FireResistance, 25 | ColdResistance, 26 | ChaosResistance, 27 | ElementalResistance, 28 | TotalResistance, 29 | LifeLeech, 30 | ManaLeech, 31 | Rarity, 32 | Quantity, 33 | CritChance, 34 | CritMultiplier, 35 | MovementSpeed, 36 | WeaponElementalDamagePercent, 37 | AddedLightningDamage, 38 | AddedFireDamage, 39 | AddedColdDamage, 40 | AddedPhysicalDamage, 41 | SpellDamage, 42 | FireDamagePercent, 43 | LightningDamagePercent, 44 | ColdDamagePercent, 45 | SpellCriticalChance, 46 | CastSpeed, 47 | ProjectileSpeed, 48 | MinionSkillLevel, 49 | FireSkillLevel, 50 | ColdSkillLevel, 51 | LightningSkillLevel, 52 | LocalPhysicalDamage, 53 | LocalPhysicalDamagePercent, 54 | LocalCritChance, 55 | LocalAttackSpeed, 56 | LocalAddedFireDamage, 57 | LocalAddedColdDamage, 58 | LocalAddedLightningDamage, 59 | LocalES, 60 | LocalEV, 61 | LocalArmor, 62 | LocalESPercent, 63 | LocalEVPercent, 64 | LocalArmorPercent 65 | } 66 | } -------------------------------------------------------------------------------- /src/Models/Enums/MonsterRarity.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models.Enums 2 | { 3 | public enum MonsterRarity 4 | { 5 | White, 6 | Magic, 7 | Rare, 8 | Unique 9 | } 10 | } -------------------------------------------------------------------------------- /src/Models/Interfaces/IEntity.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe; 2 | 3 | namespace PoeHUD.Models.Interfaces 4 | { 5 | public interface IEntity 6 | { 7 | string Path { get; } 8 | uint Id { get; } 9 | bool IsValid { get; } 10 | bool IsHostile { get; } 11 | long Address { get; } 12 | 13 | bool HasComponent() where T : Component, new(); 14 | 15 | T GetComponent() where T : Component, new(); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Models/ItemClass.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models 2 | { 3 | public class ItemClass 4 | { 5 | public string ClassName { get; set; } 6 | public string ClassCategory { get; set; } 7 | public ItemClass(string className, string classCategory) 8 | { 9 | ClassName = className; 10 | ClassCategory = classCategory; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Models/MonsterConfigLine.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Models 2 | { 3 | public class MonsterConfigLine : ConfigLineBase 4 | { 5 | public string SoundFile { get; set; } 6 | public string MinimapIcon { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/Models/Pattern.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | 5 | namespace PoeHUD.Models 6 | { 7 | public struct Pattern 8 | { 9 | public byte[] Bytes; 10 | public string Mask; 11 | 12 | public Pattern(byte[] pattern, string mask) 13 | { 14 | Bytes = pattern; 15 | Mask = mask; 16 | } 17 | 18 | public Pattern(string pattern, string mask) 19 | { 20 | var arr = pattern.Split(new[] { "\\x" }, StringSplitOptions.RemoveEmptyEntries); 21 | Bytes = arr.Select(y => byte.Parse(y, NumberStyles.HexNumber)).ToArray(); 22 | Mask = mask; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Models/PreloadConfigLine.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | 4 | namespace PoeHUD.Models 5 | { 6 | public class PreloadConfigLine : ConfigLineBase 7 | { 8 | public Func FastColor; 9 | } 10 | } -------------------------------------------------------------------------------- /src/Plugins/MenuAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Plugins 4 | { 5 | [AttributeUsage(AttributeTargets.Property)] 6 | public class MenuAttribute : Attribute 7 | { 8 | public string MenuName = ""; 9 | public string Tooltip; 10 | public int index = -1; 11 | public int parentIndex = -1; 12 | 13 | public MenuAttribute(string menuName) 14 | { 15 | MenuName = menuName; 16 | } 17 | public MenuAttribute(string menuName, string tooltip) : this(menuName) 18 | { 19 | Tooltip = tooltip; 20 | } 21 | public MenuAttribute(string menuName, int index) 22 | { 23 | MenuName = menuName; 24 | this.index = index; 25 | } 26 | 27 | public MenuAttribute(string menuName, string tooltip, int index) : this(menuName, index) 28 | { 29 | Tooltip = tooltip; 30 | } 31 | 32 | public MenuAttribute(string menuName, int index, int parentIndex) 33 | { 34 | MenuName = menuName; 35 | this.index = index; 36 | this.parentIndex = parentIndex; 37 | } 38 | 39 | public MenuAttribute(string menuName, string tooltip, int index, int parentIndex) : this(menuName, index, parentIndex) 40 | { 41 | Tooltip = tooltip; 42 | } 43 | } 44 | 45 | [AttributeUsage(AttributeTargets.Property)] 46 | public class IgnoreMenuAttribute : Attribute 47 | { 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Poe/Component.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe 2 | { 3 | public abstract class Component : RemoteMemoryObject 4 | { 5 | protected Entity Owner => ReadObject(Address + 8); 6 | } 7 | } -------------------------------------------------------------------------------- /src/Poe/Components/Animated.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.Components 8 | { 9 | public class Animated : Component 10 | { 11 | public Entity BaseAnimatedObjectEntity => GetObject(M.ReadLong(Address + 0x88)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Poe/Components/AnimatedComponents/ClientAnimationController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.Components 8 | { 9 | public class ClientAnimationController : Component 10 | { 11 | public int AnimKey => M.ReadInt(Address + 0x9c); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Poe/Components/AreaTransition.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | using PoeHUD.Poe.RemoteMemoryObjects; 3 | 4 | namespace PoeHUD.Poe.Components 5 | { 6 | public class AreaTransition : Component 7 | { 8 | public int WorldAreaId => M.ReadUShort(Address + 0x28); 9 | public WorldArea WorldArea => GameController.Instance.Files.WorldAreas.GetAreaByAreaId(WorldAreaId); 10 | public AreaTransitionType TransitionType => (AreaTransitionType)M.ReadByte(Address + 0x2A); 11 | 12 | public enum AreaTransitionType 13 | { 14 | Normal = 0, 15 | Local = 1, 16 | NormalToCorrupted = 2, 17 | CorruptedToNormal = 3, 18 | Labyrinth = 5 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Poe/Components/Armour.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Armour : Component 4 | { 5 | public int EvasionScore 6 | { 7 | get 8 | { 9 | return this.Address != 0 ? this.M.ReadInt(this.Address + 0x10, 0x10) : 0; 10 | } 11 | } 12 | public int ArmourScore 13 | { 14 | get 15 | { 16 | return this.Address != 0 ? this.M.ReadInt(this.Address + 0x10, 0x14) : 0; 17 | } 18 | } 19 | public int EnergyShieldScore 20 | { 21 | get 22 | { 23 | return this.Address != 0 ? this.M.ReadInt(this.Address + 0x10, 0x18) : 0; 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Poe/Components/AttributeRequirements.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.EntityComponents 2 | { 3 | public class AttributeRequirements : Component 4 | { 5 | public int strength => (Address != 0) ? M.ReadInt(Address + 0x10, 0x10) : 0; 6 | public int dexterity => (Address != 0) ? M.ReadInt(Address + 0x10, 0x14) : 0; 7 | public int intelligence => (Address != 0) ? M.ReadInt(Address + 0x10, 0x18) : 0; 8 | } 9 | } -------------------------------------------------------------------------------- /src/Poe/Components/Base.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe.RemoteMemoryObjects; 2 | 3 | namespace PoeHUD.Poe.Components 4 | { 5 | public class Base : Component 6 | { 7 | 8 | public string Name 9 | { 10 | get 11 | { 12 | return NativeStringReader.ReadString(M.ReadLong(Address + 0x10) + 0x18); 13 | } 14 | } 15 | 16 | public int ItemCellsSizeX => M.ReadInt(Address + 0x10, 0x10); 17 | public int ItemCellsSizeY => M.ReadInt(Address + 0x10, 0x14); 18 | public bool isCorrupted => M.ReadByte(Address + 0xD8) == 1; 19 | public bool isShaper => M.ReadByte(Address + 0xD9) == 1; 20 | public bool isElder => M.ReadByte(Address + 0xDA) == 1; 21 | 22 | // 0x8 - link to base item 23 | // +0x10 - Name 24 | // +0x30 - Use hint 25 | // +0x50 - Link to Data/BaseItemTypes.dat 26 | 27 | // 0xC (+4) fileref to visual identity 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Poe/Components/Charges.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Charges : Component 4 | { 5 | public int NumCharges => Address != 0 ? M.ReadInt(Address + 0x18) : 0; 6 | 7 | public int ChargesPerUse => Address != 0 ? M.ReadInt(Address + 0x10, 0x14) : 0; 8 | 9 | public int ChargesMax => Address != 0 ? M.ReadInt(Address + 0x10, 0x10) : 0; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Poe/Components/Chest.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Chest : Component 4 | { 5 | public bool IsOpened => Address != 0 && M.ReadByte(Address + 0x78) == 1; 6 | public bool IsLocked => Address != 0 && M.ReadByte(Address + 0x79) > 1; 7 | public bool IsStrongbox => Address != 0 && M.ReadLong(Address + 0xB8) > 0; 8 | public byte Quality => M.ReadByte(Address + 0x7C); 9 | 10 | private long StrongboxData => M.ReadLong(Address + 0x20); 11 | public bool DestroyingAfterOpen => Address != 0 && M.ReadByte(StrongboxData + 0x20) == 1; 12 | public bool IsLarge => Address != 0 && M.ReadByte(StrongboxData + 0x21) == 1; 13 | public bool Stompable => Address != 0 && M.ReadByte(StrongboxData + 0x22) == 1; 14 | public bool OpenOnDamage => Address != 0 && M.ReadByte(StrongboxData + 0x25) == 1; 15 | public bool OpenWhenDeamonsDie => Address != 0 && M.ReadByte(StrongboxData + 0x28) == 1; 16 | } 17 | } -------------------------------------------------------------------------------- /src/Poe/Components/CurrencyInfo.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class CurrencyInfo : Component 4 | { 5 | public int MaxStackSize => Address != 0 ? M.ReadInt(Address + 0x28) : 0; 6 | } 7 | } -------------------------------------------------------------------------------- /src/Poe/Components/DiesAfterTime.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class DiesAfterTime : Component 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/Poe/Components/Flask.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Flask : Component { } 4 | } -------------------------------------------------------------------------------- /src/Poe/Components/Inventories.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Inventories : Component 4 | { 5 | public InventoryVisual LeftHand => ReadVisual(0); 6 | public InventoryVisual RightHand => ReadVisual(1); 7 | public InventoryVisual Chest => ReadVisual(2); 8 | public InventoryVisual Helm => ReadVisual(3); 9 | public InventoryVisual Gloves => ReadVisual(4); 10 | public InventoryVisual Boots => ReadVisual(5); 11 | public InventoryVisual Unknown => ReadVisual(6); 12 | public InventoryVisual LeftRing => ReadVisual(7); 13 | public InventoryVisual RightRing => ReadVisual(8); 14 | public InventoryVisual Belt => ReadVisual(9); 15 | 16 | internal InventoryVisual ReadVisual(int index) 17 | { 18 | index++;//Mean (Address + 0x40 + index * 0x40) 19 | return ReadObject(Address + index * 0x40); 20 | } 21 | } 22 | 23 | public class InventoryVisual : RemoteMemoryObject 24 | { 25 | public string Name => M.ReadStringU(M.ReadLong(Address)); 26 | public string Texture => M.ReadStringU(M.ReadLong(Address + 0x8)); 27 | public string Model => M.ReadStringU(M.ReadLong(Address + 0x10)); 28 | } 29 | } -------------------------------------------------------------------------------- /src/Poe/Components/Localstats.cs: -------------------------------------------------------------------------------- 1 | // (c) by c.huede 2 | // if used in any program the sourcecode for thios has to be provided ! 3 | namespace PoeHUD.Poe.EntityComponents 4 | { 5 | public class LocalStats : Component 6 | { 7 | public LocalStats() 8 | { 9 | } 10 | 11 | public int Type 12 | { 13 | get 14 | { 15 | return this.Address != 0 ? this.M.ReadInt(this.Address) : 0; 16 | } 17 | } 18 | 19 | public int Value 20 | { 21 | get 22 | { 23 | return this.Address != 0 ? this.M.ReadInt(this.Address + 4) : 0; 24 | } 25 | } 26 | // To be implemented 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Poe/Components/Magnetic.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | //Azurite shard component 4 | public class Magnetic : Component 5 | { 6 | public int Force => M.ReadInt(Address + 0x30); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Poe/Components/Map.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe.RemoteMemoryObjects; 2 | using PoeHUD.Controllers; 3 | 4 | namespace PoeHUD.Poe.Components 5 | { 6 | public class Map : Component 7 | { 8 | public WorldArea Area => GameController.Instance.Files.WorldAreas.GetByAddress(M.ReadLong(Address + 0x10, 0x28)); 9 | public int Tier => M.ReadByte(Address + 0x7B);//let it be int to not break some plugins 10 | public InventoryTabMapSeries MapSeries => (InventoryTabMapSeries)M.ReadByte(Address + 0x10, 0x9c); 11 | } 12 | 13 | public enum InventoryTabMapSeries : byte 14 | { 15 | Atlas_of_Worlds = 3, 16 | None = 0, 17 | Original = 1, 18 | The_Awakening = 2, 19 | War_for_the_Atlas = 4, 20 | Bestiary = 5, 21 | } 22 | } -------------------------------------------------------------------------------- /src/Poe/Components/Mods.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Models; 2 | using PoeHUD.Models.Enums; 3 | using PoeHUD.Poe.RemoteMemoryObjects; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | 7 | namespace PoeHUD.Poe.Components 8 | { 9 | public class Mods : Component 10 | { 11 | public string UniqueName => M.ReadStringU(M.ReadLong(Address + 0x30, 0x8, 0x4)) + M.ReadStringU(M.ReadLong(Address + 0x30, 0x18, 4)); 12 | public bool Identified => M.ReadByte(Address + 0x88) == 1; 13 | public ItemRarity ItemRarity => (ItemRarity) M.ReadInt(Address + 0x8C); 14 | 15 | public List ItemMods 16 | { 17 | get 18 | { 19 | var implicitMods = GetMods(0x90, 0x98); 20 | var explicitMods = GetMods(0xA8, 0xB0); 21 | return implicitMods.Concat(explicitMods).ToList(); 22 | } 23 | } 24 | 25 | public int FracturedMods => M.ReadByte(Address + 0x89); 26 | public bool Synthesised => M.ReadByte(Address + 0x437) == 1; 27 | 28 | public int ItemLevel => M.ReadInt(Address + 0x434); 29 | public int RequiredLevel => M.ReadInt(Address + 0x438); 30 | public bool IsUsable => M.ReadByte(Address + 0x370) != 0; 31 | public bool IsMirrored => M.ReadByte(Address + 0x371) != 0; 32 | public ItemStats ItemStats => new ItemStats(Owner); 33 | 34 | private List GetMods(int startOffset, int endOffset) 35 | { 36 | var list = new List(); 37 | 38 | if (Address == 0) 39 | return list; 40 | 41 | long begin = M.ReadLong(Address + startOffset); 42 | long end = M.ReadLong(Address + endOffset); 43 | long count = (end - begin) / 0x28; 44 | 45 | if (count > 12) 46 | return list; 47 | 48 | //System.Windows.Forms.MessageBox.Show(begin.ToString("x")); 49 | 50 | for (long i = begin; i < end; i += 0x28) 51 | list.Add(GetObject(i)); 52 | 53 | return list; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Poe/Components/Monolith.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Monolith : Component 4 | { 5 | //EssenceTypes: 0x28-0x20 is a range, then read double pointer struct (each second pointer) 6 | public int OpenStage => M.ReadByte(Address + 0x70); 7 | public bool IsOpened => OpenStage == 4;//After killing monsters (or on time) this objects disappear 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Poe/Components/Monster.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Monster : Component 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /src/Poe/Components/NPC.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class NPC : Component 4 | { 5 | public bool HasIconOverhead => M.ReadLong(Address + 0x48) != 0; 6 | public bool IsIgnoreHidden => M.ReadByte(Address + 0x20) == 1; 7 | public bool IsMinimapLabelVisible => M.ReadByte(Address + 0x21) == 1; 8 | } 9 | } -------------------------------------------------------------------------------- /src/Poe/Components/ObjectMagicProperties.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Models.Enums; 2 | using System.Collections.Generic; 3 | 4 | namespace PoeHUD.Poe.Components 5 | { 6 | public class ObjectMagicProperties : Component 7 | { 8 | public MonsterRarity Rarity 9 | { 10 | get 11 | { 12 | if (Address != 0) 13 | { 14 | return (MonsterRarity)M.ReadInt(Address + 0x7C); 15 | } 16 | return MonsterRarity.White; 17 | } 18 | } 19 | 20 | public List Mods 21 | { 22 | get 23 | { 24 | if (Address == 0) 25 | { 26 | return new List(); 27 | } 28 | long begin = M.ReadLong(Address + 0x98); 29 | long end = M.ReadLong(Address + 0xA0); 30 | var list = new List(); 31 | if (begin == 0 || end == 0) 32 | { 33 | return list; 34 | } 35 | for (long i = begin; i < end; i += 0x28) 36 | { 37 | string mod = M.ReadStringU(M.ReadLong(i + 0x20, 0)); 38 | list.Add(mod); 39 | } 40 | return list; 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/Poe/Components/Portal.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe.RemoteMemoryObjects; 2 | using PoeHUD.Controllers; 3 | 4 | namespace PoeHUD.Poe.Components 5 | { 6 | public class Portal : Component 7 | { 8 | public WorldArea Area => GameController.Instance.Files.WorldAreas.GetByAddress(M.ReadLong(Address + 0x28)); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Poe/Components/Positioned.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Poe.Components 4 | { 5 | using Models.Attributes; 6 | 7 | public class Positioned : Component 8 | { 9 | public int GridX => Address != 0 ? M.ReadInt(Address + 0xEC) : 0; 10 | public int GridY => Address != 0 ? M.ReadInt(Address + 0xF0) : 0; 11 | public Vector2 GridPos => new Vector2(GridX, GridY); 12 | 13 | public float WorldX => M.ReadFloat(Address + 0x118); 14 | public float WorldY => M.ReadFloat(Address + 0x11C); 15 | public Vector2 WorldPos => new Vector2(WorldX, WorldY); 16 | 17 | public float Rotation => M.ReadFloat(Address + 0xF0); // Radians, btw 18 | public float RotationDeg => Rotation * (180 / MathUtil.Pi); 19 | 20 | public byte Reaction => M.ReadByte(Address + 0x58); 21 | } 22 | } -------------------------------------------------------------------------------- /src/Poe/Components/Prophecy.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.FilesInMemory; 10 | using PoeHUD.Poe.RemoteMemoryObjects; 11 | 12 | namespace PoeHUD.Poe.Components 13 | { 14 | public class Prophecy : Component 15 | { 16 | public ProphecyDat DatProphecy => GameController.Instance.Files.Prophecies.GetByAddress(M.ReadLong(Address + 0x20)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Poe/Components/Quality.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Quality : Component 4 | { 5 | public int ItemQuality => Address != 0 ? M.ReadInt(Address + 0x18) : 0; 6 | } 7 | } -------------------------------------------------------------------------------- /src/Poe/Components/Render.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using PoeHUD.Poe.RemoteMemoryObjects; 3 | 4 | namespace PoeHUD.Poe.Components 5 | { 6 | public class Render : Component 7 | { 8 | public float X => Address != 0 ? M.ReadFloat(Address + 0x78) : 0f; 9 | public float Y => Address != 0 ? M.ReadFloat(Address + 0x7C) : 0f; 10 | public float Z => Address != 0 ? M.ReadFloat(Address + 0x80) : 0f; 11 | public Vector3 Pos => new Vector3(X, Y, Z); 12 | 13 | public string Name => GetObject(Address + 0x98).Text; 14 | public Vector3 Bounds => new Vector3(M.ReadFloat(Address + 0x84), M.ReadFloat(Address + 0x88), M.ReadFloat(Address + 0x8C)); 15 | public Vector3 MeshRoration => new Vector3(M.ReadFloat(Address + 0xB8), M.ReadFloat(Address + 0xBC), M.ReadFloat(Address + 0xC0)); 16 | 17 | public float TerrainHeight => M.ReadFloat(Address + 0xD4); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Poe/Components/RenderItem.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class RenderItem : Component 4 | { 5 | public string ResourcePath => M.ReadStringU(M.ReadLong(Address + 0x20)); 6 | } 7 | } -------------------------------------------------------------------------------- /src/Poe/Components/Shrine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.Components 8 | { 9 | public class Shrine : Component 10 | { 11 | public bool IsAvailable => Address != 0 && M.ReadByte(Address + 0x1c) == 0; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Poe/Components/SkillGem.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class SkillGem : Component 4 | { 5 | public int GemLevel => M.ReadByte(Address + 0x34); 6 | } 7 | } -------------------------------------------------------------------------------- /src/Poe/Components/Stack.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Stack : Component 4 | { 5 | public int Size => Address == 0 ? 0 : M.ReadInt(Address + 0x18);//0xC ? 6 | public CurrencyInfo Info => Address != 0 ? ReadObject(Address + 0x10) : null; 7 | } 8 | } -------------------------------------------------------------------------------- /src/Poe/Components/Stats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using PoeHUD.Models.Enums; 4 | 5 | namespace PoeHUD.Poe.Components 6 | { 7 | public class Stats : Component 8 | { 9 | //Stats goes as sequence of 2 values, 4 byte each. First goes stat ID then goes stat value 10 | public Dictionary StatDictionary 11 | { 12 | get 13 | { 14 | var statPtrStart = M.ReadLong(Address + 0x98); 15 | var statPtrEnd = M.ReadLong(Address + 0xA0); 16 | 17 | if (Math.Abs(statPtrEnd - statPtrStart) / 8 > 3000) 18 | { 19 | return new Dictionary(); 20 | } 21 | 22 | int key = 0; 23 | int value = 0; 24 | int total_stats = (int)(statPtrEnd - statPtrStart); 25 | var bytes = M.ReadBytes(statPtrStart, total_stats); 26 | var result = new Dictionary(total_stats / 8); 27 | for (int i = 0; i < bytes.Length; i += 8) 28 | { 29 | key = BitConverter.ToInt32(bytes, i); 30 | value = BitConverter.ToInt32(bytes, i + 0x04); 31 | result[key] = value; 32 | } 33 | return result; 34 | } 35 | } 36 | 37 | public Dictionary GameStatDictionary 38 | { 39 | get 40 | { 41 | var statPtrStart = M.ReadLong(Address + 0x98); 42 | var statPtrEnd = M.ReadLong(Address + 0xA0); 43 | 44 | if (Math.Abs(statPtrEnd - statPtrStart) / 8 > 3000) 45 | { 46 | return new Dictionary(); 47 | } 48 | 49 | var total_stats = (int)(statPtrEnd - statPtrStart); 50 | var bytes = M.ReadBytes(statPtrStart, total_stats); 51 | var result = new Dictionary(total_stats / 8); 52 | for (var i = 0; i < bytes.Length; i += 8) 53 | { 54 | var key = BitConverter.ToInt32(bytes, i); 55 | var value = BitConverter.ToInt32(bytes, i + 0x04); 56 | result.Add((GameStat)key, value); 57 | } 58 | return result; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Poe/Components/Targetable.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Targetable : Component 4 | { 5 | public bool isTargetable => Address != 0 && M.ReadByte(Address + 0x30) == 1; 6 | public bool isTargeted => Address != 0 && M.ReadByte(Address + 0x32) == 1; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Poe/Components/TimerComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.Components 8 | { 9 | public class TimerComponent : Component 10 | { 11 | public float TimeLeft => M.ReadFloat(Address + 0x18); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Poe/Components/Transitionable.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Transitionable : Component 4 | { 5 | public byte Flag1 => M.ReadByte(Address + 0x120); 6 | public byte Flag2 => M.ReadByte(Address + 0x124); 7 | } 8 | } -------------------------------------------------------------------------------- /src/Poe/Components/TriggerableBlockage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace PoeHUD.Poe.Components 9 | { 10 | public class TriggerableBlockage : Component 11 | { 12 | public bool IsClosed => Address != 0 && M.ReadByte(Address + 0x30) == 1; 13 | 14 | public Point Min => new Point(M.ReadInt(Address + 0x50), M.ReadInt(Address + 0x54)); 15 | public Point Max => new Point(M.ReadInt(Address + 0x58), M.ReadInt(Address + 0x5C)); 16 | 17 | public byte[] Data 18 | { 19 | get 20 | { 21 | var start = M.ReadLong(Address + 0x38); 22 | var end = M.ReadLong(Address + 0x40); 23 | return M.ReadBytes(start, (int)(end - start)); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Poe/Components/Usable.cs: -------------------------------------------------------------------------------- 1 | // (c) by c.huede 2 | // if used in any program the sourcecode for thios has to be provided ! 3 | namespace PoeHUD.Poe.EntityComponents 4 | { 5 | public class Usable : Component 6 | { 7 | public Usable() 8 | { 9 | } 10 | 11 | // To be implemented 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Poe/Components/Weapon.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class Weapon : Component 4 | { 5 | public int DamageMin => Address != 0 ? M.ReadInt(Address + 0x28, 0x14) : 0; 6 | public int DamageMax => Address != 0 ? M.ReadInt(Address + 0x28, 0x18) : 0; 7 | public int AttackTime => Address != 0 ? M.ReadInt(Address + 0x28, 0x1C) : 1; 8 | public int CritChance => Address != 0 ? M.ReadInt(Address + 0x28, 0x20) : 0; 9 | } 10 | } -------------------------------------------------------------------------------- /src/Poe/Components/WorldItem.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Components 2 | { 3 | public class WorldItem : Component 4 | { 5 | public Entity ItemEntity => Address != 0 ? ReadObject(Address + 0x28) : GetObject(0); 6 | } 7 | } -------------------------------------------------------------------------------- /src/Poe/Elements/EntityLabel.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | using RemoteMemoryObjects; 4 | 5 | public class EntityLabel : Element 6 | { 7 | public string Text => NativeStringReader.ReadString(Address + 0x2E8); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Poe/Elements/HPbarElement.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class HPbarElement : Element 6 | { 7 | public Entity MonsterEntity => ReadObject(Address + 0x96C); 8 | public new List Children => GetChildren(); 9 | } 10 | } -------------------------------------------------------------------------------- /src/Poe/Elements/IncursionWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class IncursionWindow : Element 6 | { 7 | public Element AcceptElement 8 | { 9 | get 10 | { 11 | try 12 | { 13 | var button = GetChildFromIndices(3, 13, 2); 14 | 15 | if (button.GetChildAtIndex(0).Text == "enter incursion") 16 | return button; 17 | } 18 | catch 19 | { 20 | } 21 | return null; 22 | } 23 | } 24 | public string Reward1 => GetChildFromIndices(3, 13, 3).Text; 25 | public string Reward2 => GetChildFromIndices(3, 13, 4).Text; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Poe/Elements/InventoryElement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PoeHUD.Models.Enums; 3 | using PoeHUD.Poe.RemoteMemoryObjects; 4 | 5 | namespace PoeHUD.Poe.Elements 6 | { 7 | public class InventoryElement : Element 8 | { 9 | private InventoryList AllInventories => GetObjectAt(0x340); 10 | public Inventory this[InventoryIndex k] 11 | { 12 | get 13 | { 14 | return AllInventories[k]; 15 | } 16 | } 17 | 18 | //for debug 19 | [Obsolete("This property is for debug only, use indexer [InventoryIndex.PlayerInventory] instead")] 20 | private Inventory PlayerInventory => this[InventoryIndex.PlayerInventory]; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Poe/Elements/InventoryElements/CurrencyInventoryItem.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class CurrencyInventoryItem : NormalInventoryItem 6 | { 7 | // Inventory Position in Currency Stash is always invalid. 8 | // Also, as items are fixed, so Inventory Position doesn't matter. 9 | public override int InventPosX => 0; 10 | public override int InventPosY => 0; 11 | 12 | public override RectangleF GetClientRect() 13 | { 14 | return Parent.GetClientRect(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Poe/Elements/InventoryElements/DivinationInventoryItem.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class DivinationInventoryItem : NormalInventoryItem 6 | { 7 | // Inventory Position in Essence Stash is always invalid. 8 | // Also, as items are fixed, so Inventory Position doesn't matter. 9 | public override int InventPosX => 0; 10 | public override int InventPosY => 0; 11 | 12 | public override RectangleF GetClientRect() 13 | { 14 | var tmp = Parent.GetClientRect(); 15 | 16 | // div stash tab scrollbar element scroll value calculator 17 | var addr = this.Parent.Parent.Parent.Parent.Children[2].Address + 0xA64; 18 | float sub = M.ReadInt(addr) * (float)107.5; 19 | tmp.Y -= sub; 20 | 21 | return tmp; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Poe/Elements/InventoryElements/EssenceInventoryItem.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class EssenceInventoryItem : NormalInventoryItem 6 | { 7 | // Inventory Position in Essence Stash is always invalid. 8 | // Also, as items are fixed, so Inventory Position doesn't matter. 9 | public override int InventPosX => 0; 10 | public override int InventPosY => 0; 11 | 12 | public override RectangleF GetClientRect() 13 | { 14 | return Parent.GetClientRect(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Poe/Elements/InventoryElements/FragmentInventoryItem.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class FragmentInventoryItem : NormalInventoryItem 6 | { 7 | // Inventory Position in Currency Stash is always invalid. 8 | // Also, as items are fixed, so Inventory Position doesn't matter. 9 | public override int InventPosX => 0; 10 | public override int InventPosY => 0; 11 | 12 | public override RectangleF GetClientRect() 13 | { 14 | return Parent.GetClientRect(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Poe/Elements/InventoryElements/NormalInventoryItem.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Poe.RemoteMemoryObjects; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | public class NormalInventoryItem : Element 6 | { 7 | public virtual int InventPosX => M.ReadInt(Address + 0x390); 8 | //public ServerInventory.InventSlotItem ServerInventoryItem => ReadObject(Address + 0x18);//should work but it doesnt(. Offset is 0x18 9 | public virtual int InventPosY => M.ReadInt(Address + 0x394); 10 | public virtual int ItemWidth => M.ReadInt(Address + 0x398); 11 | public virtual int ItemHeight => M.ReadInt(Address + 0x39c); 12 | public Entity Item => ReadObject(Address + 0x388); 13 | public ToolTipType toolTipType => ToolTipType.InventoryItem; 14 | public Element ToolTip => ReadObject(Address + 0xB20); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Poe/Elements/ItemOnGroundTooltip.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class ItemOnGroundTooltip : Element 4 | { 5 | public Element ItemFrame => GetChildAtIndex(0) == null ? null : GetChildAtIndex(0).GetChildAtIndex(0); 6 | public Element Tooltip => GetChildAtIndex(0) == null ? null : GetChildAtIndex(0).GetChildAtIndex(1); 7 | public Element TooltipUI => GetChildAtIndex(0) == null ? null : GetChildAtIndex(0).GetChildAtIndex(0); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Poe/Elements/ItemsOnGroundLabelElement.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PoeHUD.Poe.RemoteMemoryObjects; 3 | 4 | namespace PoeHUD.Poe.Elements 5 | { 6 | public class ItemsOnGroundLabelElement : Element 7 | { 8 | public Element LabelOnHover 9 | { 10 | get 11 | { 12 | var readObjectAt = ReadObjectAt(0x248); 13 | return readObjectAt.Address == 0 ? null : readObjectAt; 14 | } 15 | } 16 | 17 | public Entity ItemOnHover 18 | { 19 | get 20 | { 21 | var readObjectAt = ReadObjectAt(0x250); 22 | return readObjectAt.Address == 0 ? null : readObjectAt; 23 | } 24 | } 25 | 26 | public string ItemOnHoverPath => ItemOnHover != null ? ItemOnHover.Path : "Null"; 27 | public string LabelOnHoverText => LabelOnHover != null ? LabelOnHover.Text : "Null"; 28 | 29 | 30 | public int CountLabels => M.ReadInt(Address + 0x268); 31 | public int CountLabels2 => M.ReadInt(Address + 0x2A8); 32 | 33 | public new List LabelsOnGround 34 | { 35 | get 36 | { 37 | long address = M.ReadLong(Address + 0x2A0); 38 | var breakCounter = 1000; 39 | var result = new List(); 40 | if (address <= 0) 41 | return null; 42 | var limit = 0; 43 | for (long nextAddress = M.ReadLong(address); nextAddress != address; nextAddress = M.ReadLong(nextAddress)) 44 | { 45 | result.Add(GetObject(nextAddress)); 46 | limit++; 47 | if (limit > 1000) 48 | return null; 49 | } 50 | 51 | return result; 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/Poe/Elements/Map.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class Map : Element 4 | { 5 | //public Element MapProperties => ReadObjectAt(0x1FC + OffsetBuffers); 6 | 7 | public Element LargeMap => ReadObjectAt(0x324 + OffsetBuffers); 8 | public float LargeMapShiftX => M.ReadFloat(LargeMap.Address + 0x2B4 + OffsetBuffers); 9 | public float LargeMapShiftY => M.ReadFloat(LargeMap.Address + 0x2B8 + OffsetBuffers); 10 | public float LargeMapZoom => M.ReadFloat(LargeMap.Address + 0x2F8 + OffsetBuffers); 11 | 12 | public Element SmallMinimap => ReadObjectAt(0x32C + OffsetBuffers); 13 | public float SmallMinimapX => M.ReadFloat(SmallMinimap.Address + 0x1C0); 14 | public float SmallMinimapY => M.ReadFloat(SmallMinimap.Address + 0x1C4); 15 | public float SmallMinimapZoom => M.ReadFloat(SmallMinimap.Address + 0x204); 16 | 17 | 18 | public Element OrangeWords => ReadObjectAt(0x250); 19 | public Element BlueWords => ReadObjectAt(0x2A8); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Poe/Elements/PoeChatElement.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PoeHUD.Poe.Elements 4 | { 5 | using RemoteMemoryObjects; 6 | 7 | public class PoeChatElement : Element 8 | { 9 | public long TotalMessageCount => ChildCount; 10 | public string this[int index] 11 | { 12 | get 13 | { 14 | if (index < TotalMessageCount) 15 | return Children[index].AsObject().Text; 16 | return null; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Poe/Elements/SkillBarElement.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class SkillBarElement : Element 4 | { 5 | public long TotalSkills => ChildCount; 6 | public SkillElement this[int k] 7 | { 8 | get 9 | { 10 | return Children[k].AsObject(); 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Poe/Elements/SkillElement.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class SkillElement : Element 4 | { 5 | public bool isValid => unknown1 != 0; 6 | 7 | // Usefull for aura/golums, if they are active or assigned to a key, it's value would be true. 8 | public bool IsAssignedKeyOrIsActive => M.ReadInt(unknown1 + 0x08) > 3; 9 | 10 | // Couldn't find the skill path, but found skillicon path. 11 | public string SkillIconPath => M.ReadStringU(M.ReadLong(unknown1 + 0x10), 100).TrimEnd('0'); 12 | 13 | // Number of time a skill is used ... reset on area change. 14 | public int totalUses => M.ReadInt(unknown3 + 0x50); 15 | 16 | // Usefull for channeling skills only. 17 | public bool isUsing => M.ReadByte(unknown3 + 0x08) > 2; 18 | 19 | // A variable is unknown. 20 | private long unknown1 => M.ReadLong( Address + OffsetBuffers + 0x244); 21 | private long unknown3 => M.ReadLong(Address + OffsetBuffers + 0x32C); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Poe/Elements/SubterraneanChart.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class SubterraneanChart : Element 4 | { 5 | public Element GridElement => Address != 0 ? GetObject(M.ReadLong(Address + 0x1C0, 0x690/* + 0x9A8, 0x110, 0x178, 0x178, 0x178, 0x178, 0x10*/)) : null; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Poe/Elements/SyndicatePanel.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class SyndicatePanel : Element 4 | { 5 | public Element EventElement => GetChildFromIndices(0, 24); 6 | public Element TextElement => EventElement.GetChildFromIndices(5, 1); 7 | public string EventText => TextElement.AsObject().Text; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Poe/Elements/WindowState.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | 3 | { 4 | public class WindowState : Element 5 | { 6 | public new bool IsVisibleLocal => M.ReadInt(Address + 0x860) == 1; 7 | } 8 | } -------------------------------------------------------------------------------- /src/Poe/Elements/WorldMapElement.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.Elements 2 | { 3 | public class WorldMapElement : Element 4 | { 5 | public Element Panel => GetObject(M.ReadLong(Address + 0xAB8, 0xC10)); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Poe/Extensions.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using System; 3 | 4 | namespace PoeHUD.Poe 5 | { 6 | public static class Extensions 7 | { 8 | private const float MarsEllipticOrbit = 0.092f; 9 | private const float Offset = 5.434783f; 10 | 11 | public static Vector2 GridToWorld(this Vector2 v) 12 | { 13 | return new Vector2(v.X / MarsEllipticOrbit + Offset, v.Y / MarsEllipticOrbit + Offset); 14 | } 15 | 16 | public static Vector3 GridToWorld(this Vector2 v, float z) 17 | { 18 | return new Vector3(v.X / MarsEllipticOrbit + Offset, v.Y / MarsEllipticOrbit + Offset, z); 19 | } 20 | 21 | public static Vector2 WorldToGrid(this Vector3 v) 22 | { 23 | return new Vector2((float)Math.Floor(v.X * MarsEllipticOrbit), (float)Math.Floor(v.Y * MarsEllipticOrbit)); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Poe/FileInMemory.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System.Collections.Generic; 3 | 4 | namespace PoeHUD.Poe 5 | { 6 | public abstract class FileInMemory 7 | { 8 | protected FileInMemory(Memory m, long address) 9 | { 10 | M = m; 11 | Address = address; 12 | } 13 | 14 | public Memory M { get; } 15 | public long Address { get; } 16 | private int NumberOfRecords => M.ReadInt(Address + 0x40, 0x20); 17 | 18 | protected IEnumerable RecordAddresses() 19 | { 20 | long firstRec = M.ReadLong(Address + 0x40, 0x0); 21 | long lastRec = M.ReadLong(Address + 0x40, 0x8); 22 | int cnt = NumberOfRecords; 23 | long recLen = (lastRec - firstRec) / cnt; 24 | 25 | for (int i = 0; i < cnt; i++) 26 | { 27 | yield return firstRec + i * recLen; 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/Base/UniversalFileWrapper.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.RemoteMemoryObjects; 10 | 11 | namespace PoeHUD.Poe.FilesInMemory 12 | { 13 | public class UniversalFileWrapper : FileInMemory where RecordType : RemoteMemoryObject, new() 14 | { 15 | //We mark this fields as private coz we don't allow to read them directly dut to optimisation. Use EntriesList and methods instead. 16 | protected Dictionary EntriesAddressDictionary { get; set; } = new Dictionary(); 17 | protected List CachedEntriesList { get; set; } = new List(); 18 | public List EntriesList 19 | { 20 | get 21 | { 22 | CheckCache(); 23 | return CachedEntriesList; 24 | } 25 | } 26 | 27 | 28 | public UniversalFileWrapper(Memory m, long address) 29 | : base(m, address) 30 | { 31 | } 32 | 33 | public RecordType GetByAddress(long address) 34 | { 35 | CheckCache(); 36 | EntriesAddressDictionary.TryGetValue(address, out RecordType result); 37 | return result; 38 | } 39 | 40 | public void CheckCache() 41 | { 42 | if (EntriesAddressDictionary.Count != 0) 43 | return; 44 | 45 | foreach (long addr in RecordAddresses()) 46 | { 47 | if (!EntriesAddressDictionary.ContainsKey(addr)) 48 | { 49 | var r = GameController.Instance.Game.IngameState.GetObject(addr); 50 | EntriesAddressDictionary.Add(addr, r); 51 | EntriesList.Add(r); 52 | EntryAdded(addr, r); 53 | } 54 | } 55 | } 56 | 57 | protected virtual void EntryAdded(long addr, RecordType entry) { } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/BestiaryCapturableMonsters.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.RemoteMemoryObjects; 10 | 11 | namespace PoeHUD.Poe.FilesInMemory 12 | { 13 | public class BestiaryCapturableMonsters : UniversalFileWrapper 14 | { 15 | public BestiaryCapturableMonsters(Memory m, long address) : base(m, address) 16 | { 17 | } 18 | 19 | private int IdCounter; 20 | protected override void EntryAdded(long addr, BestiaryCapturableMonster entry) 21 | { 22 | entry.Id = IdCounter++; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/ChestsDat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.FilesInMemory 8 | { 9 | using Framework; 10 | using RemoteMemoryObjects; 11 | 12 | public class ChestsDat : UniversalFileWrapper 13 | { 14 | public ChestsDat(Memory m, long address) : base(m, address) { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/GenericFilesInMemory.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using PoeHUD.Poe.RemoteMemoryObjects; 3 | 4 | namespace PoeHUD.Poe.FilesInMemory 5 | { 6 | /// 7 | /// For debugging purposes 8 | /// 9 | public class GenericFilesInMemory : UniversalFileWrapper 10 | { 11 | public string FileName { get; set; } 12 | 13 | public GenericFilesInMemory(Memory m, string fileName, long address) : base(m, address) 14 | { 15 | FileName = fileName; 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return FileName; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/MonsterVarieties.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.RemoteMemoryObjects; 10 | 11 | namespace PoeHUD.Poe.FilesInMemory 12 | { 13 | public class MonsterVarieties : UniversalFileWrapper 14 | { 15 | private readonly Dictionary MonsterVarietyMetadataDictionary = new Dictionary(); 16 | 17 | public MonsterVarieties(Memory m, long address) 18 | : base(m, address) 19 | { 20 | } 21 | 22 | public MonsterVariety TranslateFromMetadata(string path) 23 | { 24 | CheckCache(); 25 | MonsterVariety result; 26 | MonsterVarietyMetadataDictionary.TryGetValue(path, out result); 27 | return result; 28 | } 29 | 30 | protected override void EntryAdded(long addr, MonsterVariety entry) 31 | { 32 | MonsterVarietyMetadataDictionary.Add(entry.VarietyId, entry); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/PropheciesDat.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.RemoteMemoryObjects; 10 | 11 | 12 | namespace PoeHUD.Poe.FilesInMemory 13 | { 14 | public class PropheciesDat : UniversalFileWrapper 15 | { 16 | private Dictionary ProphecyIndexDictionary = new Dictionary(); 17 | 18 | public PropheciesDat(Memory m, long address) 19 | : base(m, address) 20 | { 21 | } 22 | 23 | public ProphecyDat GetProphecyById(int index) 24 | { 25 | CheckCache(); 26 | 27 | ProphecyDat prophecy; 28 | ProphecyIndexDictionary.TryGetValue(index, out prophecy); 29 | return prophecy; 30 | } 31 | 32 | private int IndexCounter; 33 | protected override void EntryAdded(long addr, ProphecyDat entry) 34 | { 35 | entry.Index = IndexCounter++; 36 | ProphecyIndexDictionary.Add(entry.ProphecyId, entry); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/QuestStates.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.RemoteMemoryObjects; 10 | 11 | namespace PoeHUD.Poe.FilesInMemory 12 | { 13 | public class QuestStates : UniversalFileWrapper 14 | { 15 | public QuestStates(Memory m, long address) 16 | : base(m, address) 17 | { 18 | } 19 | 20 | private Dictionary> QuestStatesDictionary; 21 | public QuestState GetQuestState(string questId, int stateId) 22 | { 23 | var dictionary = default(Dictionary); 24 | if (QuestStatesDictionary == null) 25 | { 26 | CheckCache(); 27 | var qStates = EntriesList; 28 | QuestStatesDictionary = new Dictionary>(); 29 | try 30 | { 31 | foreach (QuestState item in qStates) 32 | { 33 | if (!QuestStatesDictionary.TryGetValue(item.Quest.Id, out dictionary)) 34 | { 35 | dictionary = new Dictionary(); 36 | QuestStatesDictionary.Add(item.Quest.Id.ToLowerInvariant(), dictionary); 37 | } 38 | dictionary.Add(item.QuestStateId, item); 39 | } 40 | } 41 | catch (Exception) 42 | { 43 | QuestStatesDictionary = null; 44 | throw; 45 | } 46 | } 47 | QuestState result; 48 | if (QuestStatesDictionary.TryGetValue(questId.ToLowerInvariant(), out dictionary) && dictionary.TryGetValue(stateId, out result)) 49 | { 50 | return result; 51 | } 52 | return null; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/TagsDat.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace PoeHUD.Poe.FilesInMemory 6 | { 7 | public class TagsDat : FileInMemory 8 | { 9 | public Dictionary records = 10 | new Dictionary(StringComparer.OrdinalIgnoreCase); 11 | 12 | public TagsDat(Memory m, long address) 13 | : base(m, address) 14 | { 15 | loadItems(); 16 | } 17 | 18 | private void loadItems() 19 | { 20 | foreach (long addr in RecordAddresses()) 21 | { 22 | var r = new TagRecord(M, addr); 23 | if (!records.ContainsKey(r.Key)) 24 | records.Add(r.Key, r); 25 | } 26 | } 27 | 28 | public class TagRecord 29 | { 30 | public readonly string Key; 31 | public int Hash; 32 | // more fields can be added (see in visualGGPK) 33 | 34 | public TagRecord(Memory m, long addr) 35 | { 36 | Key = m.ReadStringU(m.ReadLong(addr + 0), 255); 37 | Hash = m.ReadInt(addr + 0x8); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Poe/FilesInMemory/WorldAreas.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using PoeHUD.Poe.RemoteMemoryObjects; 10 | 11 | namespace PoeHUD.Poe.FilesInMemory 12 | { 13 | public partial class WorldAreas : UniversalFileWrapper 14 | { 15 | private Dictionary AreasIndexDictionary = new Dictionary(); 16 | 17 | public WorldAreas(Memory m, long address) 18 | : base(m, address) 19 | { 20 | } 21 | 22 | public WorldArea GetAreaByAreaId(int index) 23 | { 24 | CheckCache(); 25 | 26 | WorldArea area; 27 | AreasIndexDictionary.TryGetValue(index, out area); 28 | return area; 29 | } 30 | 31 | public WorldArea GetAreaByAreaId(string id) 32 | { 33 | CheckCache(); 34 | return AreasIndexDictionary.Where(area => area.Value.Id == id).First().Value; 35 | } 36 | private int IndexCounter; 37 | protected override void EntryAdded(long addr, WorldArea entry) 38 | { 39 | entry.Index = IndexCounter++; 40 | AreasIndexDictionary.Add(entry.Index, entry); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Poe/Pathfinding.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Poe 5 | { 6 | public class Pathfinding : Component 7 | { 8 | public Vector2 TargetMovePos => new Vector2(M.ReadInt(Address + 0x28), M.ReadInt(Address + 0x2C)); 9 | public Vector2 PreviousMovePos => new Vector2(M.ReadInt(Address + 0x30), M.ReadInt(Address + 0x34)); 10 | public bool IsMoving => M.ReadInt(Address + 0x4ac) == 1; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/ActiveSkillWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.RemoteMemoryObjects 8 | { 9 | public class ActiveSkillWrapper : RemoteMemoryObject 10 | { 11 | public string InternalName => M.ReadStringU(M.ReadLong(Address)); 12 | public string DisplayName => M.ReadStringU(M.ReadLong(Address + 0x8)); 13 | public string Description => M.ReadStringU(M.ReadLong(Address + 0x10)); 14 | public string SkillName => M.ReadStringU(M.ReadLong(Address + 0x18)); 15 | public string Icon => M.ReadStringU(M.ReadLong(Address + 0x20)); 16 | 17 | public List CastTypes 18 | { 19 | get 20 | { 21 | var result = new List(); 22 | var castTypesCount = M.ReadInt(Address + 0x28); 23 | var readAddr = M.ReadLong(Address + 0x30); 24 | 25 | for (int i = 0; i < castTypesCount; i++) 26 | { 27 | result.Add(M.ReadInt(readAddr)); 28 | readAddr += 4; 29 | } 30 | return result; 31 | } 32 | } 33 | 34 | public List SkillTypes 35 | { 36 | get 37 | { 38 | var result = new List(); 39 | var skillTypesCount = M.ReadInt(Address + 0x38); 40 | var readAddr = M.ReadLong(Address + 0x40); 41 | 42 | for (int i = 0; i < skillTypesCount; i++) 43 | { 44 | result.Add(M.ReadInt(readAddr)); 45 | readAddr += 4; 46 | } 47 | return result; 48 | } 49 | } 50 | 51 | public string LongDescription => M.ReadStringU(M.ReadLong(Address + 0x50)); 52 | public string AmazonLink => M.ReadStringU(M.ReadLong(Address + 0x60)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/ActorVaalSkill.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | 8 | namespace PoeHUD.Poe.RemoteMemoryObjects 9 | { 10 | public class ActorVaalSkill : RemoteMemoryObject 11 | { 12 | const int NAMES_POINTER_OFFSET = 0x8; 13 | const int INTERNAL_NAME_OFFSET = 0x0; 14 | const int NAME_OFFSET = 0x8; 15 | const int DESCRIPTION_OFFSET = 0x10; 16 | const int SKILL_NAME_OFFSET = 0x18; 17 | const int ICON_OFFSET = 0x20; 18 | 19 | const int MAX_VAAL_SOULS_OFFSET = 0x10; 20 | const int VAAL_SOULS_PER_USE_OFFSET = 0x14; 21 | const int CURRENT_VAAL_SOULS_OFFSET = 0x18; 22 | 23 | public string VaalSkillInternalName => M.ReadStringU(M.ReadLong(NAMES_POINTER_OFFSET) + INTERNAL_NAME_OFFSET); 24 | public string VaalSkillDisplayName => M.ReadStringU(M.ReadLong(NAMES_POINTER_OFFSET) + NAME_OFFSET); 25 | public string VaalSkillDescription => M.ReadStringU(M.ReadLong(NAMES_POINTER_OFFSET) + DESCRIPTION_OFFSET); 26 | public string VaalSkillSkillName => M.ReadStringU(M.ReadLong(NAMES_POINTER_OFFSET) + SKILL_NAME_OFFSET); 27 | public string VaalSkillIcon => M.ReadStringU(M.ReadLong(NAMES_POINTER_OFFSET) + ICON_OFFSET); 28 | 29 | public int VaalMaxSouls => M.ReadInt(Address + MAX_VAAL_SOULS_OFFSET); 30 | public int VaalSoulsPerUse => M.ReadInt(Address + VAAL_SOULS_PER_USE_OFFSET); 31 | public int CurrVaalSouls => M.ReadInt(Address + CURRENT_VAAL_SOULS_OFFSET); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/AtlasNode.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | using SharpDX; 10 | 11 | namespace PoeHUD.Poe.RemoteMemoryObjects 12 | { 13 | public class AtlasNode : RemoteMemoryObject 14 | { 15 | private WorldArea area; 16 | public WorldArea Area => area != null ? area : 17 | area = GameController.Instance.Files.WorldAreas.GetByAddress(M.ReadLong(Address + 0x08)); 18 | 19 | private float posX = -1; 20 | public float PosX => posX != -1 ? posX : 21 | posX = M.ReadFloat(Address + 0x10); 22 | 23 | private float posY = -1; 24 | public float PosY => posY != -1 ? posY : 25 | posY = M.ReadFloat(Address + 0x14); 26 | 27 | public Vector2 Pos => new Vector2(PosX, PosY); 28 | 29 | private string text; 30 | public string FlavourText => text != null ? text : 31 | text = M.ReadStringU(M.ReadLong(Address + 0x44)); 32 | 33 | public bool IsUniqueMap 34 | { 35 | get 36 | { 37 | string uniqTest = M.ReadStringU(M.ReadLong(Address + 0x3c, 0)); 38 | return !string.IsNullOrEmpty(uniqTest) && uniqTest.Contains("Uniq"); 39 | } 40 | } 41 | 42 | public override string ToString() 43 | { 44 | return $"{Area.Name}, PosX: {PosX}, PosY: {PosY}, Text: {FlavourText}"; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BestiaryCapturableMonster.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | 10 | namespace PoeHUD.Poe.RemoteMemoryObjects 11 | { 12 | public class BestiaryCapturableMonster : RemoteMemoryObject 13 | { 14 | public int Id { get; internal set; } 15 | 16 | private string monsterName; 17 | public string MonsterName => monsterName != null ? monsterName : 18 | monsterName = M.ReadStringU(M.ReadLong(Address + 0x20)); 19 | 20 | private MonsterVariety monsterVariety; 21 | public MonsterVariety MonsterVariety => monsterVariety != null ? monsterVariety : 22 | monsterVariety = GameController.Instance.Files.MonsterVarieties.GetByAddress(M.ReadLong(Address + 0x8)); 23 | 24 | private BestiaryGroup bestiaryGroup; 25 | public BestiaryGroup BestiaryGroup => bestiaryGroup != null ? bestiaryGroup : 26 | bestiaryGroup = GameController.Instance.Files.BestiaryGroups.GetByAddress(M.ReadLong(Address + 0x18)); 27 | 28 | public long BestiaryEncountersPtr => M.ReadLong(Address + 0x30); 29 | 30 | private BestiaryCapturableMonster bestiaryCapturableMonsterKey; 31 | public BestiaryCapturableMonster BestiaryCapturableMonsterKey => bestiaryCapturableMonsterKey != null ? bestiaryCapturableMonsterKey : 32 | bestiaryCapturableMonsterKey = GameController.Instance.Files.BestiaryCapturableMonsters.GetByAddress(M.ReadLong(Address + 0x6a)); 33 | 34 | private BestiaryGenus bestiaryGenus; 35 | public BestiaryGenus BestiaryGenus => bestiaryGenus != null ? bestiaryGenus : 36 | bestiaryGenus = GameController.Instance.Files.BestiaryGenuses.GetByAddress(M.ReadLong(Address + 0x61)); 37 | 38 | public int AmountCaptured => GameController.Instance.Game.IngameState.ServerData.GetBeastCapturedAmount(this); 39 | 40 | public override string ToString() 41 | { 42 | return $"Nane: {MonsterName}, Group: {BestiaryGroup.Name}, Family: {BestiaryGroup.Family.Name}, Captured: {AmountCaptured}"; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BestiaryFamily.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | 10 | 11 | namespace PoeHUD.Poe.RemoteMemoryObjects 12 | { 13 | public class BestiaryFamily : RemoteMemoryObject 14 | { 15 | public int Id { get; internal set; } 16 | 17 | private string familyId; 18 | public string FamilyId => familyId != null ? familyId : 19 | familyId = M.ReadStringU(M.ReadLong(Address)); 20 | 21 | private string name; 22 | public string Name => name != null ? name : 23 | name = M.ReadStringU(M.ReadLong(Address + 0x8)); 24 | 25 | public string Icon => M.ReadStringU(M.ReadLong(Address + 0x10)); 26 | public string SmallIcon => M.ReadStringU(M.ReadLong(Address + 0x18)); 27 | public string Illustration => M.ReadStringU(M.ReadLong(Address + 0x20)); 28 | public string PageArt => M.ReadStringU(M.ReadLong(Address + 0x28)); 29 | public string Description => M.ReadStringU(M.ReadLong(Address + 0x30)); 30 | 31 | public override string ToString() 32 | { 33 | return Name; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BestiaryGenus.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | 10 | namespace PoeHUD.Poe.RemoteMemoryObjects 11 | { 12 | public class BestiaryGenus : RemoteMemoryObject 13 | { 14 | public int Id { get; internal set; } 15 | 16 | private string genusId; 17 | public string GenusId => genusId != null ? genusId : 18 | genusId = M.ReadStringU(M.ReadLong(Address)); 19 | 20 | private string name; 21 | public string Name => name != null ? name : 22 | name = M.ReadStringU(M.ReadLong(Address + 0x8)); 23 | 24 | private BestiaryGroup bestiaryGroup; 25 | public BestiaryGroup BestiaryGroup => bestiaryGroup != null ? bestiaryGroup : 26 | bestiaryGroup = GameController.Instance.Files.BestiaryGroups.GetByAddress(M.ReadLong(Address + 0x18)); 27 | 28 | private string name2; 29 | public string Name2 => name2 != null ? name2 : 30 | name2 = M.ReadStringU(M.ReadLong(Address + 0x20)); 31 | 32 | private string icon; 33 | public string Icon => icon != null ? icon : 34 | icon = M.ReadStringU(M.ReadLong(Address + 0x28)); 35 | 36 | public int MaxInStorage => M.ReadInt(Address + 0x30); 37 | 38 | public override string ToString() 39 | { 40 | return $"{Name}, MaxInStorage: {MaxInStorage}"; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BestiaryGroup.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | 10 | namespace PoeHUD.Poe.RemoteMemoryObjects 11 | { 12 | public class BestiaryGroup : RemoteMemoryObject 13 | { 14 | public int Id { get; internal set; } 15 | 16 | private string groupId; 17 | public string GroupId => groupId != null ? groupId : 18 | groupId = M.ReadStringU(M.ReadLong(Address)); 19 | 20 | public string Description => M.ReadStringU(M.ReadLong(Address + 0x8)); 21 | public string Illustration => M.ReadStringU(M.ReadLong(Address + 0x10)); 22 | 23 | private string name; 24 | public string Name => name != null ? name : 25 | name = M.ReadStringU(M.ReadLong(Address + 0x18)); 26 | 27 | public string SmallIcon => M.ReadStringU(M.ReadLong(Address + 0x20)); 28 | public string ItemIcon => M.ReadStringU(M.ReadLong(Address + 0x28)); 29 | 30 | private BestiaryFamily family; 31 | public BestiaryFamily Family => family != null ? family : 32 | family = GameController.Instance.Files.BestiaryFamilies.GetByAddress(M.ReadLong(Address + 0x38)); 33 | 34 | public override string ToString() 35 | { 36 | return Name; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalChoice.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class BetrayalChoice : RemoteMemoryObject 4 | { 5 | public string Id => M.ReadStringU(M.ReadLong(Address)); 6 | public string Name => M.ReadStringU(M.ReadLong(Address + 0x8)); 7 | 8 | public override string ToString() 9 | { 10 | return Name; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalChoiceAction.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalChoiceAction : RemoteMemoryObject 6 | { 7 | public string Id => M.ReadStringU(M.ReadLong(Address)); 8 | public BetrayalChoice Choice => GameController.Instance.Files.BetrayalChoises.GetByAddress(M.ReadLong(Address + 0x10)); 9 | 10 | public override string ToString() 11 | { 12 | return $"{Id} ({Choice.Name})"; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalData : RemoteMemoryObject 6 | { 7 | public BetrayalSyndicateLeadersData SyndicateLeadersData => GetObject(M.ReadLong(Address + 0x288)); 8 | 9 | public List SyndicateStates 10 | { 11 | get 12 | { 13 | var betrayalStateAddr = M.ReadLong(Address + 0x2D0); 14 | return M.ReadStructsArray(betrayalStateAddr, betrayalStateAddr + BetrayalSyndicateState.STRUCT_SIZE * 14, BetrayalSyndicateState.STRUCT_SIZE, 20); 15 | } 16 | } 17 | 18 | public BetrayalEventData BetrayalEventData 19 | { 20 | get 21 | { 22 | var addr = M.ReadLong(Address + 0x2E8, 0x2F0); 23 | return addr == 0 ? null : GetObject(addr); 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalDialogue.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PoeHUD.Controllers; 3 | 4 | namespace PoeHUD.Poe.RemoteMemoryObjects 5 | { 6 | public class BetrayalDialogue : RemoteMemoryObject 7 | { 8 | public BetrayalTarget Target => GameController.Instance.Files.BetrayalTargets.GetByAddress(M.ReadLong(Address + 0x8)); 9 | public int Unknown1 => M.ReadInt(Address + 0x10); 10 | public int Unknown2 => M.ReadInt(Address + 0x14); 11 | public int Unknown3 => M.ReadInt(Address + 0x38); 12 | public bool Unknown4 => M.ReadByte(Address + 0x6c) > 0; 13 | public bool Unknown5 => M.ReadByte(Address + 0x8d) > 0; 14 | public BetrayalJob Job => GameController.Instance.Files.BetrayalJobs.GetByAddress(M.ReadLong(Address + 0x44)); 15 | public BetrayalUpgrade Upgrade => ReadObjectAt(0x64); 16 | public string DialogueText => M.ReadStringU(M.ReadLong(Address + 0xA6, 0x18)); 17 | 18 | public List Keys1 => ReadKeys(0x20); 19 | public List Keys2 => ReadKeys(0x54); 20 | public List Keys3 => ReadKeys(0x85); 21 | 22 | private List ReadKeys(long offset) 23 | { 24 | var addr = M.ReadLong(Address + offset); 25 | var result = new List(); 26 | if (addr != 0) 27 | { 28 | for (long i = 0; i < 5; i++) 29 | { 30 | result.Add(M.ReadInt(addr + i * 0x8)); 31 | } 32 | } 33 | return result; 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return $"{Target?.Name}, {Job?.Name}, {Upgrade?.UpgradeName}, {DialogueText}"; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalEventData.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalEventData : RemoteMemoryObject 6 | { 7 | public BetrayalTarget Target1 => GameController.Instance.Files.BetrayalTargets.GetByAddress(M.ReadLong(Address + 0x2D0)); 8 | public BetrayalTarget Target2 => GameController.Instance.Files.BetrayalTargets.GetByAddress(M.ReadLong(Address + 0x2F0)); 9 | public BetrayalTarget Target3 => GameController.Instance.Files.BetrayalTargets.GetByAddress(M.ReadLong(Address + 0x300)); 10 | public BetrayalChoiceAction Action => GameController.Instance.Files.BetrayalChoiseActions.GetByAddress(M.ReadLong(Address + 0x2E0)); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalJob.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalJob : RemoteMemoryObject 6 | { 7 | public static Vector2 TransportationLeaderPos = new Vector2(1349.853f, 577.3936f); 8 | public static Vector2 FortificationLeaderPos = new Vector2(1898.01f, 862.7452f); 9 | public static Vector2 ResearchLeaderPos = new Vector2(2515.993f, 862.7444f); 10 | public static Vector2 IntervensionLeaderPos = new Vector2(3064.15f, 577.3913f); 11 | 12 | public string Id => M.ReadStringU(M.ReadLong(Address)); 13 | public string Name => M.ReadStringU(M.ReadLong(Address + 0x8)); 14 | public string Art => M.ReadStringU(M.ReadLong(Address + 0x20)); 15 | 16 | public Vector2 LeaderPos 17 | { 18 | get 19 | { 20 | switch (Name) 21 | { 22 | case "Transportation": 23 | return TransportationLeaderPos; 24 | case "Fortification": 25 | return FortificationLeaderPos; 26 | case "Research": 27 | return ResearchLeaderPos; 28 | case "Intervention": 29 | return IntervensionLeaderPos; 30 | default: 31 | return Vector2.Zero; 32 | } 33 | } 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Name; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalRank.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.RemoteMemoryObjects 8 | { 9 | public class BetrayalRank : RemoteMemoryObject 10 | { 11 | public string Id => M.ReadStringU(M.ReadLong(Address)); 12 | public string Name => M.ReadStringU(M.ReadLong(Address + 0x8)); 13 | public int Unknown => M.ReadInt(Address + 0x10); 14 | public string Art => M.ReadStringU(M.ReadLong(Address + 0x14)); 15 | 16 | public int RankInt 17 | { 18 | get 19 | { 20 | switch (Id) 21 | { 22 | case "Rank1": return 1; 23 | case "Rank2": return 2; 24 | case "Rank3": return 3; 25 | default: return 0; 26 | } 27 | } 28 | } 29 | 30 | public override string ToString() 31 | { 32 | return Name; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalReward.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalReward : RemoteMemoryObject 6 | { 7 | public BetrayalJob Job => GameController.Instance.Files.BetrayalJobs.GetByAddress(M.ReadLong(Address + 0x8)); 8 | public BetrayalTarget Target => GameController.Instance.Files.BetrayalTargets.GetByAddress(M.ReadLong(Address + 0x18)); 9 | public BetrayalRank Rank => GameController.Instance.Files.BetrayalRanks.GetByAddress(M.ReadLong(Address + 0x28)); 10 | public string Reward => M.ReadStringU(M.ReadLong(Address + 0x30)); 11 | 12 | public override string ToString() 13 | { 14 | return Reward; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalSyndicateLeadersData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalSyndicateLeadersData : RemoteMemoryObject 6 | { 7 | public List Leaders => new List 8 | { 9 | ReadObjectAt(0x0), 10 | ReadObjectAt(0x8), 11 | ReadObjectAt(0x10), 12 | ReadObjectAt(0x18) 13 | }; 14 | } 15 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/BetrayalTarget.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class BetrayalTarget : RemoteMemoryObject 6 | { 7 | public string Id => M.ReadStringU(M.ReadLong(Address)); 8 | public MonsterVariety MonsterVariety => GameController.Instance.Files.MonsterVarieties.GetByAddress(M.ReadLong(Address + 0x20)); 9 | public string Art => M.ReadStringU(M.ReadLong(Address + 0x38)); 10 | public string FullName => M.ReadStringU(M.ReadLong(Address + 0x51)); 11 | public string Name => M.ReadStringU(M.ReadLong(Address + 0x61)); 12 | 13 | public override string ToString() 14 | { 15 | return Name; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/Buff.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class Buff : RemoteMemoryObject 4 | { 5 | public string Name => M.ReadStringU(M.ReadLong(Address + 8, 0)); 6 | public byte Charges => M.ReadByte(Address + 0x2C); 7 | //public int SkillId => M.ReadInt(Address + 0x5C); // I think this is part of another structure referenced in a pointer at 0x58 8 | public float MaxTime => M.ReadFloat(Address + 0x10); // infinity for auras and always on buff 9 | public float Timer => M.ReadFloat(Address + 0x14); // timeleft 10 | 11 | public override string ToString() 12 | { 13 | return $"{Name}, Charges: {Charges}, Timer: {Timer}, MaxTime: {MaxTime}"; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/ChestDat.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class ChestDat : RemoteMemoryObject 4 | { 5 | public string Key => M.ReadStringU(M.ReadLong(Address)); 6 | 7 | #region Overrides of Object 8 | 9 | public override string ToString() 10 | { 11 | return Key; 12 | } 13 | 14 | #endregion 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/DeployedObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System; 3 | using PoeHUD.Poe.RemoteMemoryObjects; 4 | using PoeHUD.Controllers; 5 | using PoeHUD.Models; 6 | 7 | namespace PoeHUD.Poe.Components 8 | { 9 | public class DeployedObject 10 | { 11 | internal DeployedObject(uint objId, ushort objectKey) 12 | { 13 | ObjectId = objId; 14 | ObjectKey = objectKey; 15 | } 16 | public uint ObjectId { get; private set; } 17 | public ushort ObjectKey { get; private set; } 18 | public EntityWrapper Entity => GameController.Instance.EntityListWrapper.GetEntityById(ObjectKey); 19 | //public ActorSkill Skill => GameController.Instance.Player.GetComponent().ActorSkills.Find(x => x.Id == ObjectKey); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/DiagnosticElement.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class DiagnosticElement : RemoteMemoryObject 4 | { 5 | public long DiagnosticArray => M.ReadLong(Address + 0x0); 6 | public float CurrValue => M.ReadFloat(DiagnosticArray + 0x13C); 7 | public int X => M.ReadInt(Address + 0x8); 8 | public int Y => M.ReadInt(Address + 0xC); 9 | public int Width => M.ReadInt(Address + 0x10); 10 | public int Height => M.ReadInt(Address + 0x14); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/EntityList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using SharpDX; 3 | 4 | namespace PoeHUD.Poe.RemoteMemoryObjects 5 | { 6 | public class EntityList : RemoteMemoryObject 7 | { 8 | public IEnumerable Entities => EntitiesAsDictionary.Values; 9 | 10 | public Dictionary EntitiesAsDictionary 11 | { 12 | get 13 | { 14 | var dictionary = new Dictionary(); 15 | CollectEntities(M.ReadLong(Address), dictionary); 16 | return dictionary; 17 | } 18 | } 19 | 20 | private void CollectEntities(long addr, Dictionary list) 21 | { 22 | long num = addr; 23 | addr = M.ReadLong(addr + 0x8); 24 | var hashSet = new HashSet(); 25 | var queue = new Queue(); 26 | queue.Enqueue(addr); 27 | int loopcount = 0; 28 | while (queue.Count > 0) 29 | { 30 | long nextAddr = queue.Dequeue(); 31 | if (hashSet.Contains(nextAddr)) 32 | continue; 33 | 34 | hashSet.Add(nextAddr); 35 | if (nextAddr != num && nextAddr != 0) 36 | { 37 | var EntityID = M.ReadUInt(M.ReadLong(nextAddr + 0x28) + 0x40); 38 | if (!list.ContainsKey(EntityID)) 39 | { 40 | long address = M.ReadLong(nextAddr + 0x28); 41 | var entity = GetObject(address); 42 | list.Add(EntityID, entity); 43 | } 44 | queue.Enqueue(M.ReadLong(nextAddr)); 45 | queue.Enqueue(M.ReadLong(nextAddr + 0x10)); 46 | } 47 | 48 | if (loopcount++ > 10000) 49 | { 50 | DebugPlug.DebugPlugin.LogMsg("Entities processing limit reached (10k)", 10, Color.Yellow); 51 | break; 52 | } 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/GenericFileInMemory.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | /// 4 | /// For debugging purposes 5 | /// 6 | public class GenericFileInMemory : RemoteMemoryObject 7 | { 8 | public override string ToString() 9 | { 10 | return $"FileAddr: {Address:x}"; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/HideoutWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using PoeHUD.Controllers; 7 | using PoeHUD.Poe.FilesInMemory; 8 | 9 | namespace PoeHUD.Poe.RemoteMemoryObjects 10 | { 11 | public class HideoutWrapper : RemoteMemoryObject 12 | { 13 | public string Name => M.ReadStringU(M.ReadLong(Address)); 14 | public WorldArea WorldArea1 => GameController.Instance.Files.WorldAreas.GetByAddress(M.ReadLong(Address + 0x10)); 15 | public WorldArea WorldArea2 => GameController.Instance.Files.WorldAreas.GetByAddress(M.ReadLong(Address + 0x30)); 16 | public WorldArea WorldArea3 => GameController.Instance.Files.WorldAreas.GetByAddress(M.ReadLong(Address + 0x40)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/InventoryHolder.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class InventoryHolder : RemoteMemoryObject 4 | { 5 | internal const int StructSize = 0x20; 6 | public int Id => M.ReadInt(Address); 7 | public ServerInventory Inventory => ReadObject(Address + 0x8); 8 | 9 | public override string ToString() 10 | { 11 | return $"InventoryType: {Inventory.InventType}, InventorySlot: {Inventory.InventSlot}, Columns: {Inventory.Columns}, Rows: {Inventory.Rows}," + 12 | $"ItemsCount: {Inventory.TotalItemsCounts}, ServerRequestsCounter: {Inventory.ServerRequestCounter}"; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/InventoryList.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Models.Enums; 2 | using System.Collections.Generic; 3 | 4 | namespace PoeHUD.Poe.RemoteMemoryObjects 5 | { 6 | public class InventoryList : RemoteMemoryObject 7 | { 8 | public static int InventoryCount => 15; 9 | 10 | public Inventory this[InventoryIndex inv] 11 | { 12 | get 13 | { 14 | var num = (int)inv; 15 | if (num < 0 || num >= InventoryCount) 16 | return null; 17 | return ReadObjectAt(num * 8); 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/ItemMod.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class ItemMod : RemoteMemoryObject 4 | { 5 | private int level; 6 | private string name; 7 | private string rawName; 8 | private string displayName; 9 | 10 | public int Value1 => M.ReadInt(Address, 0); 11 | public int Value2 => M.ReadInt(Address, 4); 12 | public int Value3 => M.ReadInt(Address, 8); 13 | public int Value4 => M.ReadInt(Address, 0xC); 14 | 15 | public string RawName 16 | { 17 | get 18 | { 19 | if (rawName == null) 20 | ParseName(); 21 | return rawName; 22 | } 23 | } 24 | 25 | public string Name 26 | { 27 | get 28 | { 29 | if (rawName == null) 30 | ParseName(); 31 | return name; 32 | } 33 | } 34 | 35 | public string DisplayName 36 | { 37 | get 38 | { 39 | if (rawName == null) 40 | ParseName(); 41 | return displayName; 42 | } 43 | } 44 | 45 | public int Level 46 | { 47 | get 48 | { 49 | if (rawName == null) 50 | ParseName(); 51 | return level; 52 | } 53 | } 54 | 55 | private void ParseName() 56 | { 57 | long addr = M.ReadLong(Address + 0x20, 0); 58 | rawName = M.ReadStringU(addr); 59 | displayName = M.ReadStringU(addr + ((rawName.Length + 2)*2)); 60 | name = rawName.Replace("_", ""); // Master Crafted mod can have underscore on the end, need to ignore 61 | int ixDigits = name.IndexOfAny("0123456789".ToCharArray()); 62 | if (ixDigits < 0 || !int.TryParse(name.Substring(ixDigits), out level)) 63 | { 64 | level = 1; 65 | } 66 | else 67 | { 68 | name = name.Substring(0, ixDigits); 69 | } 70 | } 71 | 72 | public override string ToString() 73 | { 74 | return $"{Name} ({Value1}, {Value2}, {Value3}, {Value4}"; 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/NativeStringReader.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | using System; 6 | 7 | public class NativeStringReader : RemoteMemoryObject 8 | { 9 | [Obsolete(@"Use Text property instead. 'Value' property will be removed later (Reason: bad name ¯\_(ツ)_/¯)")] 10 | public string Value => ReadString(Address); 11 | public string Text => ReadString(Address); 12 | 13 | public static string ReadString(long address) 14 | { 15 | var M = GameController.Instance.Memory; 16 | //uint Size = M.ReadUInt(address + 0x8); 17 | var Reserved = M.ReadUInt(address + 0x10); 18 | 19 | //var size = Size; 20 | //if (size == 0)//Size can't be 0!!! When 1 there is a string end char 21 | // return string.Empty; 22 | if (Reserved >= 8) 23 | { 24 | var readAddr = M.ReadLong(address); 25 | return M.ReadStringU(readAddr); 26 | } 27 | else 28 | { 29 | return M.ReadStringU(address); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/ProphecyDat.cs: -------------------------------------------------------------------------------- 1 | namespace PoeHUD.Poe.RemoteMemoryObjects 2 | { 3 | public class ProphecyDat : RemoteMemoryObject 4 | { 5 | public int Index { get; internal set; } 6 | 7 | private string id; 8 | public string Id => id != null ? id : 9 | id = M.ReadStringU(M.ReadLong(Address), 255); 10 | 11 | private string predictionText; 12 | public string PredictionText => predictionText != null ? predictionText : 13 | predictionText = M.ReadStringU(M.ReadLong(Address + 0x8), 255); 14 | 15 | public int ProphecyId => M.ReadInt(Address + 0x10); 16 | 17 | private string name; 18 | public string Name => name != null ? name : 19 | name = M.ReadStringU(M.ReadLong(Address + 0x14)); 20 | 21 | private string flavourText; 22 | public string FlavourText => flavourText != null ? flavourText : 23 | flavourText = M.ReadStringU(M.ReadLong(Address + 0x1c), 255); 24 | 25 | public long ProphecyChainPtr => M.ReadLong(Address + 0x44); 26 | public string ProphecyChainName => M.ReadStringU(M.ReadLong(M.ReadLong(Address + 0x44))); 27 | public int ProphecyChainPosition => M.ReadInt(Address + 0x4c); 28 | 29 | public bool IsEnabled => M.ReadByte(Address + 0x50) > 0; 30 | 31 | public int SealCost => M.ReadInt(Address + 0x51); 32 | 33 | public override string ToString() 34 | { 35 | return $"{Name}, {PredictionText}"; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/Quest.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Framework; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Windows.Forms; 6 | using System.Linq; 7 | using System.Runtime.InteropServices; 8 | using PoeHUD.Controllers; 9 | 10 | namespace PoeHUD.Poe.RemoteMemoryObjects 11 | { 12 | public class Quest : RemoteMemoryObject 13 | { 14 | private string id; 15 | public string Id => id != null ? id : 16 | id = M.ReadStringU(M.ReadLong(Address), 255); 17 | 18 | public int Act => M.ReadInt(Address + 0x8); 19 | 20 | private string name; 21 | public string Name => name != null ? name : 22 | name = M.ReadStringU(M.ReadLong(Address + 0xc)); 23 | 24 | public string Icon => M.ReadStringU(M.ReadLong(Address + 0x18)); 25 | 26 | public override string ToString() 27 | { 28 | return $"Id: {Id}, Name: {Name}"; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/QuestState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using PoeHUD.Controllers; 7 | 8 | namespace PoeHUD.Poe.RemoteMemoryObjects 9 | { 10 | public class QuestState : RemoteMemoryObject 11 | { 12 | //public string Id { get; internal set; } 13 | public long QuestPtr => M.ReadLong(Address + 0x8); 14 | public Quest Quest => GameController.Instance.Files.Quests.GetByAddress(QuestPtr); 15 | 16 | public int QuestStateId => M.ReadInt(Address + 0x10); 17 | public int TestOffset => M.ReadInt(Address + 0x14); 18 | 19 | 20 | public string QuestStateText => M.ReadStringU(M.ReadLong(Address + 0x2c)); 21 | public string QuestProgressText => M.ReadStringU(M.ReadLong(Address + 0x34)); 22 | 23 | public override string ToString() 24 | { 25 | return $"Id: {QuestStateId}, Quest.Id: {Quest.Id}, ProgressText {QuestProgressText}, QuestName: {Quest.Name}"; 26 | } 27 | } 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/SkillGemWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PoeHUD.Poe.RemoteMemoryObjects 8 | { 9 | public class SkillGemWrapper : RemoteMemoryObject 10 | { 11 | public string Name => M.ReadStringU(M.ReadLong(Address)); 12 | public ActiveSkillWrapper ActiveSkill => ReadObject(Address + 0x73); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Poe/RemoteMemoryObjects/TheGame.cs: -------------------------------------------------------------------------------- 1 | using PoeHUD.Controllers; 2 | using PoeHUD.Framework; 3 | namespace PoeHUD.Poe.RemoteMemoryObjects 4 | { 5 | public class TheGame : RemoteMemoryObject 6 | { 7 | public TheGame(Memory m) 8 | { 9 | M = m; 10 | Address = m.ReadLong(Offsets.Base + m.AddressOfProcess, 0x8, 0xf8);//0xC40 11 | Game = this; 12 | } 13 | public IngameState IngameState => GameStateController.IngameState; 14 | public int AreaChangeCount => M.ReadInt(M.AddressOfProcess + Offsets.AreaChangeCount); 15 | public bool IsGameLoading => GameStateController.IsLoading; 16 | public void RefreshTheGameState() 17 | { 18 | Address = M.ReadLong(Offsets.Base + M.AddressOfProcess, 0x8, 0xF8); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | [assembly: AssemblyVersion("1.0.*")]//https://stackoverflow.com/questions/826777/how-to-have-an-auto-incrementing-version-number-visual-studio 8 | [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] 9 | [assembly: AssemblyCompany("Microsoft")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 12 | [assembly: AssemblyDescription("")] 13 | [assembly: AssemblyFileVersion("1.0.*")] 14 | [assembly: AssemblyProduct("")] 15 | [assembly: AssemblyTitle("")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: CompilationRelaxations(8)] 18 | [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] 19 | [assembly: ComVisible(false)] 20 | [module: UnverifiableCode] -------------------------------------------------------------------------------- /src/Tools/Generators.fs: -------------------------------------------------------------------------------- 1 | module Generators 2 | 3 | open System 4 | open System.Security.Cryptography 5 | 6 | [] 7 | let table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 8 | 9 | let randomizer = new Random() 10 | 11 | let rec generateName min max invalid = 12 | let name = 13 | randomizer.Next(min, max) 14 | |> Array.zeroCreate 15 | |> Array.map (fun _ -> table.[randomizer.Next(table.Length)]) 16 | |> fun array -> new string(array) + ".exe" 17 | if invalid name then generateName min max invalid 18 | else name 19 | 20 | let generateCSum size = 21 | let csum = Array.zeroCreate size 22 | use rngCsp = new RNGCryptoServiceProvider() 23 | rngCsp.GetBytes csum 24 | csum -------------------------------------------------------------------------------- /src/Tools/Scrambler.fs: -------------------------------------------------------------------------------- 1 | namespace Tools 2 | 3 | open System 4 | open System.Diagnostics 5 | open System.IO 6 | open System.Reflection 7 | open System.Windows.Forms 8 | open Generators 9 | 10 | [] 11 | type Scrambler private () = 12 | 13 | [] 14 | static let e_csum = 0x12 15 | 16 | static let invalid = 17 | let names = [| "calculator.exe"; "poehud.exe"; "exilehud.exe"; "exilebuddy.exe" |] 18 | let compare name illegal = String.Equals(name, illegal, StringComparison.InvariantCultureIgnoreCase) 19 | fun name -> Array.exists (compare name) names 20 | 21 | static let encryptFile srcPath = 22 | let fileData = File.ReadAllBytes srcPath 23 | let csum = generateCSum 4 24 | Buffer.BlockCopy(csum, 0, fileData, e_csum, csum.Length) 25 | let dstFileName = generateName 3 12 invalid 26 | let dstPath = Path.Combine(Path.GetDirectoryName srcPath, dstFileName) 27 | File.WriteAllBytes(dstPath, fileData) 28 | dstPath 29 | 30 | static member Scramble parameter = 31 | let showError message = MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) |> ignore 32 | match parameter with 33 | | p when String.IsNullOrWhiteSpace(p) -> 34 | let mutable result = true 35 | try 36 | let srcPath = Assembly.GetEntryAssembly().Location 37 | if invalid (Path.GetFileName srcPath) 38 | || (new FileInfo(srcPath)).CreationTimeUtc < DateTime.UtcNow.AddDays -0.5 then 39 | let dstPath = encryptFile srcPath 40 | System.IO.File.Delete(@"PoeHud") 41 | Process.Start("CMD.exe", "/c mklink PoeHud "+ dstPath) |> ignore 42 | Process.Start(dstPath, sprintf "\"%s\"" srcPath) |> ignore 43 | else result <- false 44 | with ex -> showError (sprintf "Failed to encrypt a file: %s" ex.Message) 45 | result 46 | | oldFile -> 47 | try 48 | File.Delete oldFile 49 | with _ -> 50 | let filename = Path.GetFileName oldFile 51 | showError (sprintf "Failed to delete \"%s\" file" filename) 52 | false 53 | -------------------------------------------------------------------------------- /src/Tools/Script.fsx: -------------------------------------------------------------------------------- 1 | #load "Scrambler.fs" 2 | 3 | open Tools -------------------------------------------------------------------------------- /src/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | true 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/bin/x64/Debug/cimgui.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/src/bin/x64/Debug/cimgui.dll -------------------------------------------------------------------------------- /src/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/poehud.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TehCheat/PoEHUD/8cc5f9327c594449aee019eadbbd425297b371d6/src/poehud.ico --------------------------------------------------------------------------------