[12667] Implement spells 48129, 60320, 60321

Original implemented by Tartalo and Faq at TC.
Thanks to NeatElves for porting

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12466] - 2d9047e)

Signed-off-by: Dramacydal <PulLumBerMal@gmail.com>
This commit is contained in:
NeatElves 2013-08-19 16:13:47 +03:00 committed by Antz
parent 00e0be6ed4
commit 818687444f
2 changed files with 27 additions and 1 deletions

View file

@ -3981,6 +3981,32 @@ void Spell::EffectTeleportUnits(SpellEffectEntry const* effect) // TODO - Use
if (!unitTarget || unitTarget->IsTaxiFlying())
return;
switch (m_spellInfo->Id)
{
case 48129: // Scroll of Recall
case 60320: // Scroll of Recall II
case 60321: // Scroll of Recall III
{
uint32 failAtLevel = 0;
switch (m_spellInfo->Id)
{
case 48129: failAtLevel = 40; break;
case 60320: failAtLevel = 70; break;
case 60321: failAtLevel = 80; break;
}
if (unitTarget->getLevel() > failAtLevel && unitTarget->GetTypeId() == TYPEID_PLAYER)
{
unitTarget->CastSpell(unitTarget, 60444, true);
// TODO: Unclear use of probably related spell 60322
uint32 spellId = (((Player*)unitTarget)->GetTeam() == ALLIANCE ? 60323 : 60328) + urand(0, 7);
unitTarget->CastSpell(unitTarget, spellId, true);
return;
}
break;
}
}
// Target dependend on TargetB, if there is none provided, decide dependend on A
uint32 targetType = effect->EffectImplicitTargetB;
if (!targetType)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12666"
#define REVISION_NR "12667"
#endif // __REVISION_NR_H__