diff --git a/conf/transmog.conf.dist b/conf/transmog.conf.dist index 249436e..cacf094 100644 --- a/conf/transmog.conf.dist +++ b/conf/transmog.conf.dist @@ -154,6 +154,11 @@ Transmogrification.TokenAmount = 1 # 1 - MODERN - Like later retail WoW, allow swords to be transmogged to axes, etc. # 2 - FULL - No restrictions, allow any weapon to be transmogrified to any other weapon # +# Transmogrification.AllowMixedWeaponHandedness +# Description: Normally main-hand and off-hand weapons can only be transmogged to this same type. Enable to remove this restriction. +# Not necessary when AllowMixedWeaponTypes is set to FULL. +# Default: 0 +# # Transmogrification.AllowFishingPoles # Description: Allow fishing poles to be transmogrified # Default: 0 @@ -198,6 +203,7 @@ Transmogrification.AllowTradeable = 0 Transmogrification.AllowMixedArmorTypes = 0 Transmogrification.AllowMixedWeaponTypes = 0 +Transmogrification.AllowMixedWeaponHandedness = 0 Transmogrification.AllowFishingPoles = 0 Transmogrification.IgnoreReqRace = 0 diff --git a/src/Transmogrification.cpp b/src/Transmogrification.cpp index ca7e9b5..00b2156 100644 --- a/src/Transmogrification.cpp +++ b/src/Transmogrification.cpp @@ -520,10 +520,14 @@ bool Transmogrification::CanTransmogrifyItemWithItem(Player* player, ItemTemplat { // Main-hand to offhand restrictions - see https://wowpedia.fandom.com/wiki/Transmogrification - if (AllowMixedWeaponTypes != MIXED_WEAPONS_LOOSE && ((source->InventoryType == INVTYPE_WEAPONMAINHAND && target->InventoryType != INVTYPE_WEAPONMAINHAND) - || (source->InventoryType == INVTYPE_WEAPONOFFHAND && target->InventoryType != INVTYPE_WEAPONOFFHAND))) + if (!AllowMixedWeaponHandedness && AllowMixedWeaponTypes != MIXED_WEAPONS_LOOSE) { - return false; + if ((source->InventoryType == INVTYPE_WEAPONMAINHAND && target->InventoryType != INVTYPE_WEAPONMAINHAND) || + (source->InventoryType == INVTYPE_WEAPONOFFHAND && target->InventoryType != INVTYPE_WEAPONOFFHAND)) + { + return false; + } + } if (source->Class == ITEM_CLASS_WEAPON && !(IsRangedWeapon(target->Class, target->SubClass) || @@ -850,6 +854,7 @@ void Transmogrification::LoadConfig(bool reload) AllowTradeable = sConfigMgr->GetOption("Transmogrification.AllowTradeable", false); AllowMixedArmorTypes = sConfigMgr->GetOption("Transmogrification.AllowMixedArmorTypes", false); + AllowMixedWeaponHandedness = sConfigMgr->GetOption("Transmogrification.AllowMixedWeaponHandedness", false); AllowFishingPoles = sConfigMgr->GetOption("Transmogrification.AllowFishingPoles", false); AllowMixedWeaponTypes = sConfigMgr->GetOption("Transmogrification.AllowMixedWeaponTypes", MIXED_WEAPONS_STRICT); diff --git a/src/Transmogrification.h b/src/Transmogrification.h index e08bfa7..e2b3354 100644 --- a/src/Transmogrification.h +++ b/src/Transmogrification.h @@ -132,6 +132,7 @@ public: bool AllowTradeable; bool AllowMixedArmorTypes; + bool AllowMixedWeaponHandedness; bool AllowFishingPoles; uint8 AllowMixedWeaponTypes;