diff options
author | QAston <none@none> | 2009-05-01 15:40:49 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-05-01 15:40:49 +0200 |
commit | 0f5a9cb46f495d8a0cbf9923a4ef31734979cbc7 (patch) | |
tree | 62a37aa69d6602e91efd6ee3663814d601cd3593 /src/game/Item.cpp | |
parent | db977d7005d0982ab672cfa0c7758b0d480b06b2 (diff) |
*Implement enchanting vellums.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Item.cpp')
-rw-r--r-- | src/game/Item.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp index c44bca06246..02a9b37d994 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -24,6 +24,7 @@ #include "WorldPacket.h" #include "Database/DatabaseEnv.h" #include "ItemEnchantmentMgr.h" +#include "SpellMgr.h" void AddItemsSetItem(Player*player,Item *item) { @@ -744,6 +745,12 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const if (spellInfo->EquippedItemClass != -1) // -1 == any item class { + // Special case - accept vellum for armor/weapon requirements + if( (spellInfo->EquippedItemClass==ITEM_CLASS_ARMOR && proto->IsArmorVellum()) + ||( spellInfo->EquippedItemClass==ITEM_CLASS_WEAPON && proto->IsWeaponVellum())) + if (spellmgr.IsSkillTypeSpell(spellInfo->Id, SKILL_ENCHANTING)) // only for enchanting spells + return true; + if(spellInfo->EquippedItemClass != int32(proto->Class)) return false; // wrong item class |