aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmo Norfik <norfpl@gmail.com>2012-01-07 20:42:18 +0100
committerEmo Norfik <norfpl@gmail.com>2012-01-07 20:42:18 +0100
commitfbe3eaf2266039fe5469fd79c1cae92d278ead97 (patch)
tree28cab18d1e74ed4bc69cda2f771e9f08a3e66f16
parent991934911edbd8d2a5902eabd6f1419e375262f9 (diff)
Scripts/Trial of the Crusader: Fix height position of Permafrost casted by Frost Sphere.
It needs option "vmap.enableHeight = 1" to work properly.
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index e6678be3a2b..bc6145252d2 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -568,12 +568,11 @@ public:
}
bool m_bFall;
- uint32 m_uiPermafrostTimer;
+ float x, y, z;
void Reset()
{
m_bFall = false;
- m_uiPermafrostTimer = 0;
me->SetReactState(REACT_PASSIVE);
me->SetFlying(true);
me->SetDisplayId(25144);
@@ -590,11 +589,13 @@ public:
if (!m_bFall)
{
m_bFall = true;
- me->SetFlying(false);
me->GetMotionMaster()->MoveIdle();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//At hit the ground
- me->GetMotionMaster()->MoveFall(142.2f, 0);
+ me->GetPosition(x, y, z);
+ z = me->GetMap()->GetHeight(x, y, z, true, 50);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
+ me->GetMotionMaster()->MoveFall(z, 0);
//me->FallGround(); //need correct vmap use (i believe it isn't working properly right now)
}
}
@@ -607,24 +608,13 @@ public:
switch (uiId)
{
case 0:
- m_uiPermafrostTimer = IN_MILLISECONDS;
- break;
- }
- }
-
- void UpdateAI(const uint32 uiDiff)
- {
- if (m_uiPermafrostTimer)
- {
- if (m_uiPermafrostTimer <= uiDiff)
- {
- m_uiPermafrostTimer = 0;
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
me->SetDisplayId(11686);
- me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
+ me->Relocate(x, y, z, me->GetOrientation());
DoCast(SPELL_PERMAFROST_VISUAL);
DoCast(SPELL_PERMAFROST);
- } else m_uiPermafrostTimer -= uiDiff;
+ me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
+ break;
}
}
};