mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
feat: Add option to disable mainhand/offhand checks
This commit is contained in:
@@ -154,6 +154,11 @@ Transmogrification.TokenAmount = 1
|
|||||||
# 1 - MODERN - Like later retail WoW, allow swords to be transmogged to axes, etc.
|
# 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
|
# 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
|
# Transmogrification.AllowFishingPoles
|
||||||
# Description: Allow fishing poles to be transmogrified
|
# Description: Allow fishing poles to be transmogrified
|
||||||
# Default: 0
|
# Default: 0
|
||||||
@@ -198,6 +203,7 @@ Transmogrification.AllowTradeable = 0
|
|||||||
|
|
||||||
Transmogrification.AllowMixedArmorTypes = 0
|
Transmogrification.AllowMixedArmorTypes = 0
|
||||||
Transmogrification.AllowMixedWeaponTypes = 0
|
Transmogrification.AllowMixedWeaponTypes = 0
|
||||||
|
Transmogrification.AllowMixedWeaponHandedness = 0
|
||||||
Transmogrification.AllowFishingPoles = 0
|
Transmogrification.AllowFishingPoles = 0
|
||||||
|
|
||||||
Transmogrification.IgnoreReqRace = 0
|
Transmogrification.IgnoreReqRace = 0
|
||||||
|
|||||||
@@ -520,10 +520,14 @@ bool Transmogrification::CanTransmogrifyItemWithItem(Player* player, ItemTemplat
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Main-hand to offhand restrictions - see https://wowpedia.fandom.com/wiki/Transmogrification
|
// 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)
|
if (!AllowMixedWeaponHandedness && AllowMixedWeaponTypes != MIXED_WEAPONS_LOOSE)
|
||||||
|| (source->InventoryType == INVTYPE_WEAPONOFFHAND && target->InventoryType != INVTYPE_WEAPONOFFHAND)))
|
|
||||||
{
|
{
|
||||||
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) ||
|
if (source->Class == ITEM_CLASS_WEAPON && !(IsRangedWeapon(target->Class, target->SubClass) ||
|
||||||
@@ -850,6 +854,7 @@ void Transmogrification::LoadConfig(bool reload)
|
|||||||
AllowTradeable = sConfigMgr->GetOption<bool>("Transmogrification.AllowTradeable", false);
|
AllowTradeable = sConfigMgr->GetOption<bool>("Transmogrification.AllowTradeable", false);
|
||||||
|
|
||||||
AllowMixedArmorTypes = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedArmorTypes", false);
|
AllowMixedArmorTypes = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedArmorTypes", false);
|
||||||
|
AllowMixedWeaponHandedness = sConfigMgr->GetOption<bool>("Transmogrification.AllowMixedWeaponHandedness", false);
|
||||||
AllowFishingPoles = sConfigMgr->GetOption<bool>("Transmogrification.AllowFishingPoles", false);
|
AllowFishingPoles = sConfigMgr->GetOption<bool>("Transmogrification.AllowFishingPoles", false);
|
||||||
|
|
||||||
AllowMixedWeaponTypes = sConfigMgr->GetOption<uint8>("Transmogrification.AllowMixedWeaponTypes", MIXED_WEAPONS_STRICT);
|
AllowMixedWeaponTypes = sConfigMgr->GetOption<uint8>("Transmogrification.AllowMixedWeaponTypes", MIXED_WEAPONS_STRICT);
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ public:
|
|||||||
bool AllowTradeable;
|
bool AllowTradeable;
|
||||||
|
|
||||||
bool AllowMixedArmorTypes;
|
bool AllowMixedArmorTypes;
|
||||||
|
bool AllowMixedWeaponHandedness;
|
||||||
bool AllowFishingPoles;
|
bool AllowFishingPoles;
|
||||||
|
|
||||||
uint8 AllowMixedWeaponTypes;
|
uint8 AllowMixedWeaponTypes;
|
||||||
|
|||||||
Reference in New Issue
Block a user