mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[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:
parent
09d468e7ab
commit
e87008b339
3 changed files with 15 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue