From 553b8276eb8d0d9dfac9fd35e61ef6a47162b4da Mon Sep 17 00:00:00 2001 From: kikiviki <79366880+kikiviki@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:17:44 -0400 Subject: [PATCH] Heirloom quality auto-equip calculation implemented (#1732) * Heirloom quality auto-equip calculation implemented --- src/factory/StatsWeightCalculator.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/factory/StatsWeightCalculator.cpp b/src/factory/StatsWeightCalculator.cpp index a42ce6f2..95903eba 100644 --- a/src/factory/StatsWeightCalculator.cpp +++ b/src/factory/StatsWeightCalculator.cpp @@ -92,10 +92,19 @@ float StatsWeightCalculator::CalculateItem(uint32 itemId, int32 randomPropertyId CalculateSocketBonus(player_, proto); if (enable_quality_blend_) - // Blend with item quality and level - weight_ *= PlayerbotFactory::CalcMixedGearScore(proto->ItemLevel, proto->Quality); + { + // Heirloom items scale with player level + // Use player level as effective item level for heirlooms - Quality EPIC + // Else - Blend with item quality and level for normal items + if (proto->Quality == ITEM_QUALITY_HEIRLOOM) + weight_ *= PlayerbotFactory::CalcMixedGearScore(lvl, ITEM_QUALITY_EPIC); + + else + weight_ *= PlayerbotFactory::CalcMixedGearScore(proto->ItemLevel, proto->Quality); + + return weight_; + } - return weight_; } float StatsWeightCalculator::CalculateEnchant(uint32 enchantId)