[10005] Add script effect of spell 41055 and 45206.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-05-29 15:55:25 +02:00
parent 716afa0e4b
commit e0ccfef7ef
2 changed files with 37 additions and 1 deletions

View file

@ -5549,6 +5549,24 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->RemoveAurasAtMechanicImmunity(IMMUNE_TO_ROOT_AND_SNARE_MASK,30918,true);
break;
}
case 41055: // Copy Weapon
{
if (m_caster->GetTypeId() != TYPEID_UNIT || !unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
if (Item* pItem = ((Player*)unitTarget)->GetWeaponForAttack(BASE_ATTACK))
{
if (const ItemEntry *dbcitem = sItemStore.LookupEntry(pItem->GetProto()->ItemId))
{
m_caster->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, dbcitem->ID);
// Unclear what this spell should do
unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
}
}
return;
}
case 41126: // Flame Crash
{
if (!unitTarget)
@ -5646,6 +5664,24 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 44870, true);
break;
}
case 45206: // Copy Off-hand Weapon
{
if (m_caster->GetTypeId() != TYPEID_UNIT || !unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
if (Item* pItem = ((Player*)unitTarget)->GetWeaponForAttack(OFF_ATTACK))
{
if (const ItemEntry *dbcitem = sItemStore.LookupEntry(pItem->GetProto()->ItemId))
{
m_caster->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, dbcitem->ID);
// Unclear what this spell should do
unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
}
}
return;
}
case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10004"
#define REVISION_NR "10005"
#endif // __REVISION_NR_H__