feat: Add config option to allow adding tradeable/refundable items to appearance collection. (#86)

This commit is contained in:
Benjamin Jackson
2022-06-22 10:24:45 -04:00
committed by GitHub
parent 576c76d27e
commit 37d1c45b0c
4 changed files with 16 additions and 1 deletions

View File

@@ -489,7 +489,9 @@ class PS_Transmogrification : public PlayerScript
private:
void AddToDatabase(Player* player, Item* item)
{
if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE) || item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE))
if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE) && !sTransmogrification->GetAllowTradeable())
return;
if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE))
return;
ItemTemplate const* itemTemplate = item->GetTemplate();
AddToDatabase(player, itemTemplate);