Core/Movement
* Implemented a generic way of sending movement packets depending on who controls the unit (player or server controlled) * Added possibility to specify extra elements in movement packets (such as speed, extra passenger guid, collision height and similar) without having to add a special element only for these * Removed Unit::SendMovementFlagUpdate as it was something working only in 3.3.5a and earlier (no serverside HEARTBEAT opcode exists now)
This commit is contained in:
1 parent
c34fd8d862
commit
12a828fdbc
30 files changed
+5242
-3153
No files matched your search
+3
-5
@@ -479,17 +479,15 @@ public:
|
||||
switch (uiWaypoint)
|
||||
{
|
||||
case 0:
|
||||
me->SetOrientation(5.81f);
|
||||
me->SetFacingTo(5.81f);
|
||||
break;
|
||||
case 1:
|
||||
me->SetOrientation(4.60f);
|
||||
me->SetFacingTo(4.60f);
|
||||
break;
|
||||
case 2:
|
||||
me->SetOrientation(2.79f);
|
||||
me->SetFacingTo(2.79f);
|
||||
break;
|
||||
}
|
||||
|
||||
me->SendMovementFlagUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -191,10 +191,7 @@ public:
|
||||
return;
|
||||
|
||||
if (uiPointId == 1)
|
||||
{
|
||||
me->SetOrientation(ORIENTATION);
|
||||
me->SendMovementFlagUpdate();
|
||||
}
|
||||
me->SetFacingTo(ORIENTATION);
|
||||
}
|
||||
|
||||
void DoSummonGrandChampion(uint32 uiBoss)
|
||||
|
||||
@@ -300,8 +300,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
DoCast(me, SPELL_WAILING_SOULS_STARTING);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
me->SetOrientation(me->GetAngle(target));
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetFacingTo(me->GetAngle(target));
|
||||
DoCast(me, SPELL_WAILING_SOULS_BEAM);
|
||||
}
|
||||
|
||||
@@ -327,8 +326,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
|
||||
case EVENT_WAILING_SOULS_TICK:
|
||||
beamAngle += beamAngleDiff;
|
||||
me->SetOrientation(beamAngle);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetFacingTo(beamAngle);
|
||||
me->StopMoving();
|
||||
|
||||
DoCast(me, SPELL_WAILING_SOULS);
|
||||
|
||||
@@ -205,7 +205,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
minchar->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
minchar->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
|
||||
minchar->SetCanFly(false);
|
||||
minchar->SendMovementFlagUpdate();
|
||||
minchar->RemoveAllAuras();
|
||||
minchar->GetMotionMaster()->MoveCharge(4629.3711f, 2782.6089f, 401.5301f, SPEED_CHARGE/3.0f);
|
||||
}
|
||||
@@ -238,7 +237,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
me->SetDisableGravity(true);
|
||||
me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
|
||||
me->SetCanFly(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos);
|
||||
}
|
||||
}
|
||||
@@ -318,7 +316,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
me->SetDisableGravity(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
|
||||
me->SetCanFly(false);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Unit* victim = me->SelectVictim())
|
||||
AttackStart(victim);
|
||||
@@ -445,7 +442,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
me->SetDisableGravity(true);
|
||||
me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
|
||||
me->SetCanFly(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR, airPos);
|
||||
break;
|
||||
case EVENT_AIR_FLY_DOWN:
|
||||
|
||||
@@ -294,7 +294,6 @@ class boss_sapphiron : public CreatureScript
|
||||
case EVENT_LIFTOFF:
|
||||
Talk(EMOTE_AIR_PHASE);
|
||||
me->SetDisableGravity(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
events.ScheduleEvent(EVENT_ICEBOLT, 1500);
|
||||
_iceboltCount = RAID_MODE(2, 3);
|
||||
return;
|
||||
@@ -339,7 +338,6 @@ class boss_sapphiron : public CreatureScript
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
Talk(EMOTE_GROUND_PHASE);
|
||||
me->SetDisableGravity(false);
|
||||
me->SendMovementFlagUpdate();
|
||||
events.ScheduleEvent(EVENT_GROUND, 1500);
|
||||
return;
|
||||
case EVENT_GROUND:
|
||||
|
||||
@@ -325,8 +325,7 @@ public:
|
||||
break;
|
||||
case 7:
|
||||
Talk(SAY_SVALA_INTRO_2);
|
||||
me->SetOrientation(1.58f);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetFacingTo(1.58f);
|
||||
arthas->SetVisible(false);
|
||||
++introPhase;
|
||||
introTimer = 13800;
|
||||
|
||||
@@ -2358,10 +2358,7 @@ public:
|
||||
me->StopMoving();
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
if (Player* player = me->GetPlayer(*me, uiPlayerGUID))
|
||||
{
|
||||
me->SetInFront(player);
|
||||
me->SendMovementFlagUpdate();
|
||||
}
|
||||
me->SetFacingToObject(player);
|
||||
uiEventTimer = 3000;
|
||||
uiEventPhase = 1;
|
||||
}
|
||||
@@ -2411,10 +2408,7 @@ public:
|
||||
case NPC_SALTY_JOHN_THORPE:
|
||||
Talk(SAY_HIDDEN_CULTIST_4);
|
||||
if (Player* player = me->GetPlayer(*me, uiPlayerGUID))
|
||||
{
|
||||
me->SetInFront(player);
|
||||
me->SendMovementFlagUpdate();
|
||||
}
|
||||
me->SetFacingToObject(player);
|
||||
uiEventTimer = 3000;
|
||||
uiEventPhase = 3;
|
||||
break;
|
||||
|
||||
@@ -1372,8 +1372,7 @@ public:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->CastSpell(player, SPELL_QUEST_CREDIT, true);
|
||||
CAST_AI(npc_crusade_recruit::npc_crusade_recruitAI, (creature->AI()))->m_uiPhase = 1;
|
||||
creature->SetInFront(player);
|
||||
creature->SendMovementFlagUpdate();
|
||||
creature->SetFacingToObject(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user