aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2012-03-12 00:45:58 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2012-03-12 00:53:45 +0100
commit03a24a84e493f914d46488e8c4ae9e9d663c21d7 (patch)
tree6299dee664c6a97fa9fbbb3482aa7a97d6e7d0dd /src/server/game/AI/SmartScripts
parent5ca27f40cced56414900aaaf656b45353a41aaf8 (diff)
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.
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 50c7aba0360..4cf438da5a4 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -729,17 +729,7 @@ void SmartAI::SetRun(bool run)
void SmartAI::SetFly(bool fly)
{
- if (fly)
- {
- me->SetLevitate(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
- }
- else
- {
- me->SetLevitate(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
- }
- me->SetFlying(fly);
+ me->SetDisableGravity(fly);
me->SendMovementFlagUpdate();
}