mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Movement:
* splines that are being sent via StopMoving() will now send the correct spline data when a unit has died * corrected setting the NowDead field in SMSG_ATTACK_STOP to prevent creature's from looking away from the cool guys when dying
This commit is contained in:
@@ -173,7 +173,15 @@ namespace Movement
|
||||
packet.MoverGUID = unit->GetGUID();
|
||||
packet.Pos = Position(loc.x, loc.y, loc.z, loc.orientation);
|
||||
packet.SplineData.ID = move_spline.GetId();
|
||||
packet.SplineData.Move.Face = MONSTER_MOVE_STOP;
|
||||
|
||||
if (unit->IsAlive())
|
||||
packet.SplineData.Move.Face = MONSTER_MOVE_STOP;
|
||||
else
|
||||
{
|
||||
// Stopping splines for killed creatures send a normal packet with their current position as first path point
|
||||
packet.SplineData.Move.Face = MONSTER_MOVE_NORMAL;
|
||||
packet.SplineData.Move.Points.push_back({ loc.x, loc.y, loc.z });
|
||||
}
|
||||
|
||||
if (transport)
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ WorldPackets::Combat::SAttackStop::SAttackStop(Unit const* attacker, Unit const*
|
||||
if (victim)
|
||||
{
|
||||
Victim = victim->GetGUID();
|
||||
NowDead = victim->isDead();
|
||||
NowDead = !attacker->IsAlive(); // using IsAlive instead of IsDead to catch JUST_DIED death states as well
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user