Improve local Battlegrounds collection favorites#307
Merged
Conversation
Expand Battlegrounds collection unlock handling so board skins, finishers, guide skins, hero skins, emotes, and pets can be selected from the in-game collection while the unlock option is enabled. Store Battlegrounds favorite choices locally in the existing HsMod configuration files instead of sending the real favorite network requests. This keeps the client-side selection state under mod control and prevents unlocked cosmetics from being written back as account favorites. Add local favorite state patches for collection data models and Network favorite APIs, including clear/toggle behavior that removes local favorites when the currently selected cosmetic is clicked again. Add pet-specific support for both pet-level and pet-variant favorite buttons. The pet-level button now selects the first variant for that pet, variant favorites continue to work, ownership and completion checks are treated as unlocked, and selected pet variants are applied to the in-game PET_VARIANT_ID tag instead of being hidden. Update the Hearthstone reference assemblies used by the project so the patches compile against the current client API.
Owner
|
Thanks for the PR. If you are interested, you can make updates directly in this repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述 Overview
Implemented and re-tested a client-side Battlegrounds collection unlock flow that makes cosmetic selection more convenient by allowing users to pick Battlegrounds cosmetics directly from the in-game collection UI while the Battlegrounds collection unlock option is enabled.
This does not add or download any external/internet skins. It only changes how the mod treats cosmetics that already exist in the Hearthstone client data. The selected items are stored as local HsMod preferences and are applied by the mod locally, instead of being sent to Battle.net as real account favorites.
implemented/solved/optimized/fixed:
HsBgsEmotes.cfg.HsSkins.cfgmapping flow.GAME_TAG.PET_VARIANT_IDinstead of forcing the pet tag to0, which hid the selected pet.HsMod/LibHearthstoneso the project compiles against the current Hearthstone client API. These DLLs are compile-time references for Harmony patch targets and game data model types. They were refreshed because the new Battlegrounds collection patches depend on current method signatures and classes such as pet favorite handlers, collection data models, and Battlegrounds cosmetic APIs. This is not a new runtime feature and does not add external assets; it keeps the source build aligned with the client version targeted by these patches.The intent is to keep all unlocked Battlegrounds cosmetic selections local to the mod. The game UI can be used naturally to choose favorites, but those choices remain mod-controlled local state and are not written back as real server-side account ownership or favorites.
检查 Check
功能 Function
若有新增,已编写完善的配置文件字段说明,并确保
enUS.json已完善 (If there are new additions, complete descriptions of the configuration file fields have been written, andenUS.jsonhas been completed.)No new user-facing
HsMod.cfgoptions were added. The change reuses the existing Battlegrounds cosmetic config values and stores the new local emote loadout in a small internal config file.若有必要,已编写面向用户的新功能说明 (If necessary, user-facing descriptions of new features have been written)
The behavior is described in this PR: Battlegrounds cosmetics can now be selected from the in-game collection UI for convenience, while selections are saved locally by HsMod rather than being sent as real account favorites.
已测试新功能或更改 (New features or changes tested)
The Release build was verified with MSBuild. The plugin was installed into a local Hearthstone/BepInEx setup and tested again after the final fixes. Startup patching was checked through BepInEx/Harmony logs, the earlier Harmony parameter-name issue was fixed, and the installed DLL was rebuilt and copied after verification.
The local selection flow was also checked around the main affected areas: Battlegrounds favorites are stored locally, repeated favorite clicks clear the local selection, and pet selection works from both the main pet favorite button and the pet variant/level favorite button.
风险 Risk
Potential risks / known considerations:
LibHearthstoneDLL changes are included to keep the project buildable against the current client version. They are reference assembly updates, not bundled cosmetic content, internet skins, or downloadable skin assets.