Appearances: items that never bind are collected too
Only soulbound items went into the appearance collection. Most vendor and white gear in Classic has no binding at all, so it never bound and was never collected, not even when worn. An item with no binding now counts as soon as the player has it: looted, bought, equipped, or already in the bags at login. Bind on equip items still count when they bind (equipped), like on live. (cherry picked from commit e6919e740d23230ddb0b569485221e823ac96bf8)
This commit is contained in:
@@ -610,7 +610,9 @@ void CollectionMgr::SaveAccountItemAppearances(LoginDatabaseTransaction trans)
|
||||
|
||||
void CollectionMgr::AddItemAppearance(Item* item)
|
||||
{
|
||||
if (!item->IsSoulBound())
|
||||
// An item that never binds (most vendor and white gear in Classic) can not wait for a bind like a bind on equip item does:
|
||||
// it would never be collected. It counts as soon as the player has it (looted, bought, equipped or in the bags at login).
|
||||
if (!item->IsSoulBound() && item->GetBonding() != BIND_NONE)
|
||||
return;
|
||||
|
||||
ItemModifiedAppearanceEntry const* itemModifiedAppearance = item->GetItemModifiedAppearance();
|
||||
|
||||
@@ -12875,6 +12875,8 @@ void Player::VisualizeItem(uint8 slot, Item* pItem)
|
||||
if (IsInWorld())
|
||||
GetSession()->GetCollectionMgr()->AddItemAppearance(pItem);
|
||||
}
|
||||
else if (pItem->GetBonding() == BIND_NONE && IsInWorld())
|
||||
GetSession()->GetCollectionMgr()->AddItemAppearance(pItem);
|
||||
|
||||
TC_LOG_DEBUG("entities.player.items", "Player::SetVisibleItemSlot: Player '{}' ({}), Slot: {}, Item: {}",
|
||||
GetName(), GetGUID().ToString(), slot, pItem->GetEntry());
|
||||
|
||||
Reference in New Issue
Block a user