Skip to content

Commit

Permalink
Fix an issue with LOOSE 2h->1h tmog (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceikry authored Aug 26, 2024
1 parent 190aed5 commit ce7ab57
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Transmogrification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ce7ab57

Please sign in to comment.