diff --git a/conf/transmog.conf.dist b/conf/transmog.conf.dist index 171f146..dda1312 100644 --- a/conf/transmog.conf.dist +++ b/conf/transmog.conf.dist @@ -127,6 +127,10 @@ Transmogrification.TokenAmount = 1 # Description: Allow heirloom quality items to be used as source and target items # Default: 1 # +# Transmogrification.AllowTradeable +# Description: Allow items that are tradeable (i.e. During 2 hour grace period during an instance) +# Default: 0 +# # Transmogrification.AllowMixedArmorTypes # Description: Allow cloth items to be transmogrified with plate for example # Default: 0 @@ -175,6 +179,7 @@ Transmogrification.AllowEpic = 1 Transmogrification.AllowLegendary = 0 Transmogrification.AllowArtifact = 0 Transmogrification.AllowHeirloom = 1 +Transmogrification.AllowTradeable = 0 Transmogrification.AllowMixedArmorTypes = 0 Transmogrification.AllowMixedWeaponTypes = 0 diff --git a/src/Transmogrification.cpp b/src/Transmogrification.cpp index 6624c3a..8cefe9f 100644 --- a/src/Transmogrification.cpp +++ b/src/Transmogrification.cpp @@ -781,6 +781,7 @@ void Transmogrification::LoadConfig(bool reload) AllowLegendary = sConfigMgr->GetOption("Transmogrification.AllowLegendary", false); AllowArtifact = sConfigMgr->GetOption("Transmogrification.AllowArtifact", false); AllowHeirloom = sConfigMgr->GetOption("Transmogrification.AllowHeirloom", true); + AllowTradeable = sConfigMgr->GetOption("Transmogrification.AllowTradeable", false); AllowMixedArmorTypes = sConfigMgr->GetOption("Transmogrification.AllowMixedArmorTypes", false); AllowMixedWeaponTypes = sConfigMgr->GetOption("Transmogrification.AllowMixedWeaponTypes", false); @@ -875,6 +876,11 @@ bool Transmogrification::GetAllowHiddenTransmog() const return AllowHiddenTransmog; } +bool Transmogrification::GetAllowTradeable() const +{ + return AllowTradeable; +} + bool Transmogrification::GetTrackUnusableItems() const { return TrackUnusableItems; diff --git a/src/Transmogrification.h b/src/Transmogrification.h index f73f407..43b0ea0 100644 --- a/src/Transmogrification.h +++ b/src/Transmogrification.h @@ -116,6 +116,7 @@ public: bool AllowLegendary; bool AllowArtifact; bool AllowHeirloom; + bool AllowTradeable; bool AllowMixedArmorTypes; bool AllowMixedWeaponTypes; @@ -178,6 +179,7 @@ public: uint32 GetTransmogNpcText() const; bool GetEnableSetInfo() const; uint32 GetSetNpcText() const; + bool GetAllowTradeable() const; bool GetUseCollectionSystem() const; bool GetAllowHiddenTransmog() const; diff --git a/src/transmog_scripts.cpp b/src/transmog_scripts.cpp index 4d54c0f..33a3af3 100644 --- a/src/transmog_scripts.cpp +++ b/src/transmog_scripts.cpp @@ -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);