From ce7ab57ba4303b8439c8c77c1172cdfde4563081 Mon Sep 17 00:00:00 2001 From: Ceikry <61421472+Ceikry@users.noreply.github.com> Date: Mon, 26 Aug 2024 07:19:49 -0500 Subject: [PATCH] Fix an issue with LOOSE 2h->1h tmog (#170) --- src/Transmogrification.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Transmogrification.cpp b/src/Transmogrification.cpp index abfff25..58b679b 100644 --- a/src/Transmogrification.cpp +++ b/src/Transmogrification.cpp @@ -728,20 +728,20 @@ bool Transmogrification::IsInvTypeMismatchAllowed(const ItemTemplate *source, co { if (IsRangedWeapon(sourceClass, sourceSub)) return true; - + // Main-hand to offhand restrictions - see https://wowpedia.fandom.com/wiki/Transmogrification - if (targetType == INVTYPE_WEAPONMAINHAND || targetType == INVTYPE_WEAPONOFFHAND) + if (AllowMixedWeaponTypes == MIXED_WEAPONS_LOOSE) + return true; + else if (targetType == INVTYPE_WEAPONMAINHAND || targetType == INVTYPE_WEAPONOFFHAND) { - if (AllowMixedWeaponTypes == MIXED_WEAPONS_LOOSE) - return true; if (sourceType == INVTYPE_WEAPONMAINHAND || sourceType == INVTYPE_WEAPONOFFHAND) - return (AllowMixedWeaponHandedness || AllowMixedWeaponTypes == MIXED_WEAPONS_LOOSE); + return AllowMixedWeaponHandedness; if (sourceType == INVTYPE_WEAPON) return true; } else if (targetType == INVTYPE_WEAPON) { - return sourceType == INVTYPE_WEAPONMAINHAND || (AllowMixedWeaponTypes == MIXED_WEAPONS_LOOSE && sourceType == INVTYPE_WEAPONOFFHAND); + return sourceType == INVTYPE_WEAPONMAINHAND || (AllowMixedWeaponHandedness && sourceType == INVTYPE_WEAPONOFFHAND); } } else if (targetClass == ITEM_CLASS_ARMOR)