mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Spells: Remove outdated code for Rockbiter Weapon
This commit is contained in:
@@ -3679,58 +3679,6 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
|
||||
Player* p_caster = (Player*)m_caster;
|
||||
|
||||
// Rockbiter Weapon apply to both weapon
|
||||
if (!itemTarget)
|
||||
return;
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellFamilyFlags[0] & 0x400000)
|
||||
{
|
||||
uint32 spell_id = 0;
|
||||
|
||||
// enchanting spell selected by calculated damage-per-sec stored in Effect[1] base value
|
||||
// Note: damage calculated (correctly) with rounding int32(float(v)) but
|
||||
// RW enchantments applied damage int32(float(v)+0.5), this create 0..1 difference sometime
|
||||
switch (damage)
|
||||
{
|
||||
// Rank 1
|
||||
case 2: spell_id = 36744; break; // 0% [ 7% == 2, 14% == 2, 20% == 2]
|
||||
// Rank 2
|
||||
case 4: spell_id = 36753; break; // 0% [ 7% == 4, 14% == 4]
|
||||
case 5: spell_id = 36751; break; // 20%
|
||||
// Rank 3
|
||||
case 6: spell_id = 36754; break; // 0% [ 7% == 6, 14% == 6]
|
||||
case 7: spell_id = 36755; break; // 20%
|
||||
// Rank 4
|
||||
case 9: spell_id = 36761; break; // 0% [ 7% == 6]
|
||||
case 10: spell_id = 36758; break; // 14%
|
||||
case 11: spell_id = 36760; break; // 20%
|
||||
default:
|
||||
sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
|
||||
return;
|
||||
}
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
|
||||
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, TRIGGERED_FULL_MASK);
|
||||
SpellCastTargets targets;
|
||||
targets.SetItemTarget(item);
|
||||
spell->prepare(&targets);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!itemTarget)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user