[10649] Enchanted spell 8017 and ranks should apply to weapon by client auto selection

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
eggxp 2010-10-26 18:21:14 +04:00 committed by VladimirMangos
parent 09d468e7ab
commit e87008b339
3 changed files with 15 additions and 22 deletions

View file

@ -4795,7 +4795,7 @@ void Spell::EffectEnchantItemTmp(SpellEffectIndex eff_idx)
Player* p_caster = (Player*)m_caster;
// Rockbiter Weapon apply to both weapon
// Rockbiter Weapon
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000400000))
{
uint32 spell_id = 0;
@ -4822,7 +4822,6 @@ void Spell::EffectEnchantItemTmp(SpellEffectIndex eff_idx)
return;
}
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
if (!spellInfo)
{
@ -4830,19 +4829,10 @@ void Spell::EffectEnchantItemTmp(SpellEffectIndex eff_idx)
return;
}
for(int j = BASE_ATTACK; j <= OFF_ATTACK; ++j)
{
if (Item* item = p_caster->GetWeaponForAttack(WeaponAttackType(j)))
{
if (item->IsFitToSpellRequirements(m_spellInfo))
{
Spell *spell = new Spell(m_caster, spellInfo, true);
SpellCastTargets targets;
targets.setItemTarget( item );
spell->prepare(&targets);
}
}
}
Spell *spell = new Spell(m_caster, spellInfo, true);
SpellCastTargets targets;
targets.setItemTarget( itemTarget );
spell->prepare(&targets);
return;
}