refresh initequipment quality

This commit is contained in:
Yunfan Li
2023-08-25 14:40:09 +08:00
parent 0adf1b8034
commit e094b63901
2 changed files with 2 additions and 2 deletions

View File

@@ -1293,7 +1293,7 @@ bool PlayerbotFactory::IsDesiredReplacement(Item* item)
// }
uint32 delta = 1 + (80 - bot->getLevel()) / 10;
return int32(bot->getLevel() - requiredLevel) > delta;
return proto->Quality < ITEM_QUALITY_RARE || int32(bot->getLevel() - requiredLevel) > delta;
}
inline Item* StoreNewItemInInventorySlot(Player* player, uint32 newItemId, uint32 count)

View File

@@ -1448,7 +1448,7 @@ void RandomPlayerbotMgr::Refresh(Player* bot)
bot->SetFullHealth();
bot->SetPvP(true);
PlayerbotFactory factory(bot, bot->getLevel());
PlayerbotFactory factory(bot, bot->getLevel(), ITEM_QUALITY_RARE);
factory.Refresh();
if (bot->GetMaxPower(POWER_MANA) > 0)