[9442] Add dummy effect of spell 44454 and script effect of spell 44455

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-02-24 01:16:43 +01:00
parent b56a088d6d
commit 5b6c0566ae
2 changed files with 42 additions and 1 deletions

View file

@ -1164,6 +1164,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->RemoveAurasDueToSpell(43874);
return;
}
case 44454: // Tasty Reef Fish
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;
m_caster->CastSpell(unitTarget, 44455, true, m_CastItem);
return;
}
case 44875: // Complete Raptor Capture
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
@ -5306,6 +5314,39 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 41131, true);
break;
}
case 44455: // Character Script Effect Reverse Cast
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;
Creature* pTarget = (Creature*)unitTarget;
if (const SpellEntry *pSpell = sSpellStore.LookupEntry(m_spellInfo->CalculateSimpleValue(eff_idx)))
{
// if we used item at least once...
if (pTarget->isTemporarySummon() && pTarget->GetEntry() == pSpell->EffectMiscValue[eff_idx])
{
TemporarySummon* pSummon = (TemporarySummon*)pTarget;
// can only affect "own" summoned
if (pSummon->GetSummonerGUID() == m_caster->GetGUID())
{
if (pTarget->hasUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE))
pTarget->GetMotionMaster()->MovementExpired();
pTarget->GetMotionMaster()->MovePoint(0, m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ());
}
return;
}
// or if we are first time used item
m_caster->CastSpell(pTarget, pSpell, true);
pTarget->ForcedDespawn();
}
return;
}
case 44876: // Force Cast - Portal Effect: Sunwell Isle
{
if (!unitTarget)