Core/Units:

- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
This commit is contained in:
Machiavelli
2012-03-12 00:53:45 +01:00
parent 5ca27f40cc
commit 03a24a84e4
74 changed files with 489 additions and 384 deletions
@@ -459,7 +459,7 @@ public:
{
trigger->SetVisible(false);
trigger->setFaction(me->getFaction());
trigger->SetLevitate(true);
trigger->SetDisableGravity(true);
trigger->CastSpell(me, SPELL_METEOR, true);
}
me->GetMotionMaster()->Clear();
@@ -1176,7 +1176,7 @@ public:
{
FrostBreathTimer = 5000;
MoveTimer = 0;
me->SetLevitate(true);
me->SetDisableGravity(true);
}
void WaypointReached(uint32 i)
@@ -1298,7 +1298,7 @@ public:
Zpos = 10.0f;
StrikeTimer = 2000+rand()%5000;
MoveTimer = 0;
me->SetLevitate(true);
me->SetDisableGravity(true);
}
void WaypointReached(uint32 i)
@@ -261,7 +261,7 @@ public:
m_uiBellowingRoarTimer = 1000;
break;
case 10:
me->SetFlying(true);
me->SetCanFly(true);
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25);
me->SetSpeed(MOVE_FLIGHT, 1.0f);
DoScriptText(SAY_PHASE_2_TRANS, me);
@@ -414,7 +414,7 @@ public:
DoScriptText(SAY_PHASE_3_TRANS, me);
SetCombatMovement(true);
me->SetFlying(false);
me->SetCanFly(false);
m_bIsMoving = false;
me->GetMotionMaster()->MovePoint(9, me->GetHomePosition());
return;
+4 -4
View File
@@ -576,7 +576,7 @@ public:
break;
case 10:
Merithra->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
Merithra->SetLevitate(true);
Merithra->SetDisableGravity(true);
Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 3);
break;
case 11:
@@ -603,7 +603,7 @@ public:
break;
case 18:
Arygos->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
Arygos->SetLevitate(true);
Arygos->SetDisableGravity(true);
Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 42);
break;
case 19:
@@ -630,7 +630,7 @@ public:
break;
case 26:
Caelestrasz->HandleEmoteCommand(254);
Caelestrasz->SetLevitate(true);
Caelestrasz->SetDisableGravity(true);
Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 7.61f, 4);
break;
case 27:
@@ -769,7 +769,7 @@ public:
break;
case 63:
me->HandleEmoteCommand(254);
me->SetLevitate(true);
me->SetDisableGravity(true);
break;
case 64:
me->GetMotionMaster()->MoveCharge(-8000, 1400, 150, 9);