Skip to content

Commit

Permalink
[9106] Add script effect for spell 47097
Browse files Browse the repository at this point in the history
Also add areaflag hack to detect correct areaId

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Jan 3, 2010
1 parent 35509b7 commit ea0b62c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/game/Map.cpp
Expand Up @@ -1768,6 +1768,11 @@ uint16 Map::GetAreaFlag(float x, float y, float z) const
if (x > 3823.0f && x < 4141.5f && y > 6247.0f && y < 64890.0f && z < 42.5f)
areaflag = 1723;
break;
// Moonrest Gardens
case 1787:
if (x > 3315.3f && x < 3361.6f && y > 2469.4f && y < 2565.8f && z > 197.0f)
areaflag = 1786; // Surge Needle (cords not entirely correct, will need round circle if this is really needed(see spell 47097 eff 77))
break;
// Dalaran
case 2492: // Forlorn Woods (Crystalsong Forest)
case 2371: // Valley of Echoes (Icecrown Glacier)
Expand Down
13 changes: 13 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -5145,6 +5145,19 @@ void Spell::EffectScriptEffect(uint32 effIndex)

break;
}
// Surge Needle Teleporter
case 47097:
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;

if (unitTarget->GetAreaId() == 4156)
unitTarget->CastSpell(unitTarget, 47324, true);
else if (unitTarget->GetAreaId() == 4157)
unitTarget->CastSpell(unitTarget, 47325, true);

break;
}
// Emblazon Runeblade
case 51770:
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9105"
#define REVISION_NR "9106"
#endif // __REVISION_NR_H__

0 comments on commit ea0b62c

Please sign in to comment.