Skip to content

Get trinkets info error #4622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gweesin opened this issue May 1, 2025 · 0 comments · May be fixed by #4623
Open

Get trinkets info error #4622

gweesin opened this issue May 1, 2025 · 0 comments · May be fixed by #4623
Labels

Comments

@gweesin
Copy link

gweesin commented May 1, 2025

Expected Behavior

download should be "orig" quality card when the card type equals "BATTLEGROUND_TRINKET".

like this:

https://art.hearthstonejson.com/v1/orig/BG30_MagicItem_843t.png

the trinkets card information like this:

{
"artist": "Gabriel Lopes",
"cardClass": "NEUTRAL",
"cost": 2,
"dbfId": 111448,
"id": "BG30_MagicItem_847",
["mechanics"](https://api.hearthstonejson.com/v1/latest/enUS/cards.json): [
"TRIGGER_VISUAL"
],
"name": "Goblin Wallet",
"set": "BATTLEGROUNDS",
"spellSchool": "LESSER_TRINKET",
"text": "At the end of each turn, increase your maximum Gold by 1.",
"type": "BATTLEGROUND_TRINKET"
}

see more trinket cards from https://api.hearthstonejson.com/v1/latest/enUS/cards.json

in my plugin:

Database.GetCardFromDbfId(111448, false)

Actual Behavior

current assetsDownloader's link like this:

https://art.hearthstonejson.com/v1/256x/BG30_MagicItem_843t.png

The 256x quality for the trinkets cannot be found actually.

Source code of HDT:

        AssetDownloaders.cardImageDownloader = new AssetDownloader<Card, BitmapImage>(Path.Combine(Config.AppDataPath, "Images", "CardImages"), (Func<Card, string>) (card => "https://art.hearthstonejson.com/v1/" + (card.BaconCard ? "bgs" : "render") + "/latest/" + Helper.GetCardLanguage() + "/" + (Config.Instance.HighResolutionCardImages ? "512x" : "256x") + "/" + card.Id + (card.BaconTriple ? "_triple" : "") + ".png"), (Func<Card, string>) (card => card.Id + (card.BaconTriple ? "_triple" : "") + ".png"), new Func<byte[], BitmapImage>(Helper.BitmapImageFromBytes), new long?(200L), "pack://application:,,,/Resources/faceless_manipulator.png");

log:

2:19:38|Error|AssetDownloader.DownloadFileAsync >> Failed to download BG30_MagicItem_423.png: NotFound

Steps to reproduce behavior

var cardFromDbfId = Database.GetCardFromDbfId(cardDbfId, false);
var CardImage = new CardImage();
Database.GetCardFromDbfId(111448, false);
CardImage.SetCardIdFromCard(cardFromDbfId);

Log/Screenshots

No response

@gweesin gweesin added the bug label May 1, 2025
@gweesin gweesin linked a pull request May 1, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant