aboutsummaryrefslogtreecommitdiff
path: root/src/game/Item.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-26 20:36:28 -0600
committermegamage <none@none>2009-02-26 20:36:28 -0600
commit39c513776c5dde8b5732df5ba2467d9e9e3e84fd (patch)
treef23965c73ae7030501bbfb4f6c2483729276e7d6 /src/game/Item.cpp
parent85d5d94e71e4ad2b49889253da1c2b1679050541 (diff)
parent2f0beef0ddc805b586ba9b6ccda01891a73fba64 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Item.cpp')
-rw-r--r--src/game/Item.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp
index 85df92f998b..ea8d77076eb 100644
--- a/src/game/Item.cpp
+++ b/src/game/Item.cpp
@@ -756,7 +756,12 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const
if(spellInfo->EquippedItemInventoryTypeMask != 0) // 0 == any inventory type
{
- if((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0)
+ // Special case - accept weapon type for main and offhand requirements
+ if(proto->InventoryType == INVTYPE_WEAPON &&
+ (spellInfo->EquippedItemInventoryTypeMask & (1 << INVTYPE_WEAPONMAINHAND) ||
+ spellInfo->EquippedItemInventoryTypeMask & (1 << INVTYPE_WEAPONOFFHAND)))
+ return true;
+ else if ((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0)
return false; // inventory type not present in mask
}