From 9578e123ccec7b0425ab6417dbb48c8e983c469e Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 10:39:35 -0700 Subject: [PATCH] fix: revert tabard DBC enhancement due to scope issue The itExtra variable is not in scope at the tabard rendering site. Reverted to original hardcoded 1201 fallback which is working reliably. DBC variant approach requires refactoring variable scope. --- src/core/application.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/core/application.cpp b/src/core/application.cpp index d117b46a..7c1355ab 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -6450,32 +6450,8 @@ void Application::spawnOnlineCreature(uint64_t guid, uint32_t displayId, float x } // Show tabard mesh only when CreatureDisplayInfoExtra equips one. - // Use ItemDisplayInfo.dbc to get the correct tabard geoset variant. if (hasGroup12 && hasEquippedTabard) { - uint16_t wantTabard = 1201; // Default fallback - - // Try to read tabard geoset variant from ItemDisplayInfo.dbc (slot 9) - if (hasHumanoidExtra && itExtra != humanoidExtraMap_.end()) { - uint32_t tabardDisplayId = itExtra->second.equipDisplayId[9]; - if (tabardDisplayId != 0) { - auto itemDisplayDbc = assetManager->loadDBC("ItemDisplayInfo.dbc"); - const auto* idiL = pipeline::getActiveDBCLayout() - ? pipeline::getActiveDBCLayout()->getLayout("ItemDisplayInfo") : nullptr; - if (itemDisplayDbc) { - int32_t tabardIdx = itemDisplayDbc->findRecordById(tabardDisplayId); - if (tabardIdx >= 0) { - // Get geoset group variant from ItemDisplayInfo (group 1) - const uint32_t ggField = idiL ? (*idiL)["GeosetGroup1"] : 7; - uint32_t tabardGG = itemDisplayDbc->getUInt32(static_cast(tabardIdx), ggField); - if (tabardGG > 0) { - wantTabard = static_cast(1200 + tabardGG); - } - } - } - } - } - - uint16_t tabardSid = pickFromGroup(wantTabard, 12); + uint16_t tabardSid = pickFromGroup(1201, 12); if (tabardSid != 0) normalizedGeosets.insert(tabardSid); }