mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
feat: Add config option to allow adding tradeable/refundable items to appearance collection. (#86)
This commit is contained in:
@@ -127,6 +127,10 @@ Transmogrification.TokenAmount = 1
|
|||||||
# Description: Allow heirloom quality items to be used as source and target items
|
# Description: Allow heirloom quality items to be used as source and target items
|
||||||
# Default: 1
|
# Default: 1
|
||||||
#
|
#
|
||||||
|
# Transmogrification.AllowTradeable
|
||||||
|
# Description: Allow items that are tradeable (i.e. During 2 hour grace period during an instance)
|
||||||
|
# Default: 0
|
||||||
|
#
|
||||||
# Transmogrification.AllowMixedArmorTypes
|
# Transmogrification.AllowMixedArmorTypes
|
||||||
# Description: Allow cloth items to be transmogrified with plate for example
|
# Description: Allow cloth items to be transmogrified with plate for example
|
||||||
# Default: 0
|
# Default: 0
|
||||||
@@ -175,6 +179,7 @@ Transmogrification.AllowEpic = 1
|
|||||||
Transmogrification.AllowLegendary = 0
|
Transmogrification.AllowLegendary = 0
|
||||||
Transmogrification.AllowArtifact = 0
|
Transmogrification.AllowArtifact = 0
|
||||||
Transmogrification.AllowHeirloom = 1
|
Transmogrification.AllowHeirloom = 1
|
||||||
|
Transmogrification.AllowTradeable = 0
|
||||||
|
|
||||||
Transmogrification.AllowMixedArmorTypes = 0
|
Transmogrification.AllowMixedArmorTypes = 0
|
||||||
Transmogrification.AllowMixedWeaponTypes = 0
|
Transmogrification.AllowMixedWeaponTypes = 0
|
||||||
|
|||||||
@@ -781,6 +781,7 @@ void Transmogrification::LoadConfig(bool reload)
|
|||||||
AllowLegendary = sConfigMgr->GetOption<bool>("Transmogrification.AllowLegendary", false);
|
AllowLegendary = sConfigMgr->GetOption<bool>("Transmogrification.AllowLegendary", false);
|
||||||
AllowArtifact = sConfigMgr->GetOption<bool>("Transmogrification.AllowArtifact", false);
|
AllowArtifact = sConfigMgr->GetOption<bool>("Transmogrification.AllowArtifact", false);
|
||||||
AllowHeirloom = sConfigMgr->GetOption<bool>("Transmogrification.AllowHeirloom", true);
|
AllowHeirloom = sConfigMgr->GetOption<bool>("Transmogrification.AllowHeirloom", true);
|
||||||
|
AllowTradeable = sConfigMgr->GetOption<bool>("Transmogrification.AllowTradeable", false);
|
||||||
|
|
||||||
AllowMixedArmorTypes = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedArmorTypes", false);
|
AllowMixedArmorTypes = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedArmorTypes", false);
|
||||||
AllowMixedWeaponTypes = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedWeaponTypes", false);
|
AllowMixedWeaponTypes = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedWeaponTypes", false);
|
||||||
@@ -875,6 +876,11 @@ bool Transmogrification::GetAllowHiddenTransmog() const
|
|||||||
return AllowHiddenTransmog;
|
return AllowHiddenTransmog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Transmogrification::GetAllowTradeable() const
|
||||||
|
{
|
||||||
|
return AllowTradeable;
|
||||||
|
}
|
||||||
|
|
||||||
bool Transmogrification::GetTrackUnusableItems() const
|
bool Transmogrification::GetTrackUnusableItems() const
|
||||||
{
|
{
|
||||||
return TrackUnusableItems;
|
return TrackUnusableItems;
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ public:
|
|||||||
bool AllowLegendary;
|
bool AllowLegendary;
|
||||||
bool AllowArtifact;
|
bool AllowArtifact;
|
||||||
bool AllowHeirloom;
|
bool AllowHeirloom;
|
||||||
|
bool AllowTradeable;
|
||||||
|
|
||||||
bool AllowMixedArmorTypes;
|
bool AllowMixedArmorTypes;
|
||||||
bool AllowMixedWeaponTypes;
|
bool AllowMixedWeaponTypes;
|
||||||
@@ -178,6 +179,7 @@ public:
|
|||||||
uint32 GetTransmogNpcText() const;
|
uint32 GetTransmogNpcText() const;
|
||||||
bool GetEnableSetInfo() const;
|
bool GetEnableSetInfo() const;
|
||||||
uint32 GetSetNpcText() const;
|
uint32 GetSetNpcText() const;
|
||||||
|
bool GetAllowTradeable() const;
|
||||||
|
|
||||||
bool GetUseCollectionSystem() const;
|
bool GetUseCollectionSystem() const;
|
||||||
bool GetAllowHiddenTransmog() const;
|
bool GetAllowHiddenTransmog() const;
|
||||||
|
|||||||
@@ -489,7 +489,9 @@ class PS_Transmogrification : public PlayerScript
|
|||||||
private:
|
private:
|
||||||
void AddToDatabase(Player* player, Item* item)
|
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;
|
return;
|
||||||
ItemTemplate const* itemTemplate = item->GetTemplate();
|
ItemTemplate const* itemTemplate = item->GetTemplate();
|
||||||
AddToDatabase(player, itemTemplate);
|
AddToDatabase(player, itemTemplate);
|
||||||
|
|||||||
Reference in New Issue
Block a user