*Implement enchanting vellums.
--HG-- branch : trunk
This commit is contained in:
1 parent
db977d7005
commit
0f5a9cb46f
7 files changed
+98
-28
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user