Skip to content

Commit b337868

Browse files
committed
fix(armory): use file_ids[10] as primary composite icon slot
Composite item icons were resolved via {gendered slot (0/5), slot 8}, which doesn't match the client's own CICompositePlayer::GetCompositeGeometry order (file_ids[10] first, then the gendered slot). Slot 8 isn't part of that resolution at all, and for items that lack a stream-1 icon there it falls back to stream 0 - a full-size worn-model skin/pattern texture, not an icon. Trying slot 10 first fixes ~166 misrendered armory icons (e.g. Dragon Scalp Design) with no regressions, verified against every model_file_id used by the Armory module.
1 parent 76758db commit b337868

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

GWToolboxdll/Modules/Resources.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,11 +1366,14 @@ IDirect3DTexture9** Resources::GetItemImage(uint32_t model_file_id, uint32_t int
13661366
if (!model_file_id)
13671367
return nullptr;
13681368

1369-
// Composite items (armor/runes) only have a usable icon in file_ids[0/5] (gendered) or [8] (shared) - the other slots are skin/pattern textures for the 3D worn model, confirmed by visual inspection to be the wrong image.
1369+
// Composite items (armor/runes): mirrors the client's own CICompositePlayer::GetCompositeGeometry
1370+
// slot order - file_ids[10] is the shared geometry/icon slot, tried first regardless of gender;
1371+
// only when that's absent does it fall back to the gendered slot (file_ids[5] female, [0] male).
1372+
// The other slots are skin/pattern textures for the 3D worn model, not icons.
13701373
if (interaction & 4) {
13711374
const auto model_file_info = GW::Items::GetCompositeModelInfo(model_file_id);
13721375
if (model_file_info) {
1373-
const size_t slots_to_try[] = {is_female ? 5u : 0u, 8u};
1376+
const size_t slots_to_try[] = {10u, is_female ? 5u : 0u};
13741377
static IDirect3DTexture9* null_tex = nullptr;
13751378
IDirect3DTexture9** result = &null_tex;
13761379
for (const size_t i : slots_to_try) {

0 commit comments

Comments
 (0)