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:
Ovahlord
2020-11-19 03:13:12 +01:00
parent 882254e3cd
commit 2075879183
2 changed files with 10 additions and 2 deletions

View File

@@ -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)
{

View File

@@ -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
}
}