mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Heirloom quality auto-equip calculation implemented (#1732)
* Heirloom quality auto-equip calculation implemented
This commit is contained in:
@@ -92,12 +92,21 @@ float StatsWeightCalculator::CalculateItem(uint32 itemId, int32 randomPropertyId
|
|||||||
CalculateSocketBonus(player_, proto);
|
CalculateSocketBonus(player_, proto);
|
||||||
|
|
||||||
if (enable_quality_blend_)
|
if (enable_quality_blend_)
|
||||||
// Blend with item quality and level
|
{
|
||||||
|
// 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);
|
weight_ *= PlayerbotFactory::CalcMixedGearScore(proto->ItemLevel, proto->Quality);
|
||||||
|
|
||||||
return weight_;
|
return weight_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
float StatsWeightCalculator::CalculateEnchant(uint32 enchantId)
|
float StatsWeightCalculator::CalculateEnchant(uint32 enchantId)
|
||||||
{
|
{
|
||||||
SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId);
|
SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId);
|
||||||
|
|||||||
Reference in New Issue
Block a user