Core: a knockback or a pull moves a bot player

A bot has no client to answer SMSG_MOVE_KNOCK_BACK, so knockbacks and pulls never moved it. The server now flies it as it flies a creature. naxx21: Magnetic Pull left Thaddius' tanks where they stood and both adds walked off their platforms.
This commit is contained in:
Karrz1
2026-11-16 16:40:08 +00:00
parent 6428725cce
commit 33d48155e3
+4 -1
View File
@@ -13174,7 +13174,10 @@ void Unit::KnockbackFrom(Position const& origin, float speedXY, float speedZ, fl
}
}
if (!player)
// A bot has no client to answer SMSG_MOVE_KNOCK_BACK, so a knockback or a pull never moved it: the server flies it as it flies a creature.
// naxx_thaddius 1116: Magnetic Pull left both tanks where they stood while Stalagg and Feugen swapped victims, and each add walked off its
// platform across the room to the other tank.
if (!player || (player == this && player->GetSession()->IsBot()))
GetMotionMaster()->MoveKnockbackFrom(origin, speedXY, speedZ, angle, spellEffectExtraData);
else
{