mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10005] Add script effect of spell 41055 and 45206.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
716afa0e4b
commit
e0ccfef7ef
2 changed files with 37 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10004"
|
||||
#define REVISION_NR "10005"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue