TrinityCore/TrinityCore — pull request #13642 by pete318 (2014-11-28 22:52:16+00:00)
Title: Rooted vehicle movement (#13342 for example)

Corrects issue where certain combinations of actions would cause vehicles (usually cannons/artillary) that should be rooted, to be fully movable.

This needs some discussion. Since, there's quite a core change happening here (check WorldSession).

Essentially the issue was that the worldsession protection against spoofed packets assumed that the client would never send movement info, when rooted in place. However, when in a vehicle that is rooted - they client does sent movement messages (for a very short time after first entering, normal movement is sent, and all the time turret aiming counts as movement).

To that end, I added the proviso that if the player is in a vehicle and database for the player has unit status disabled movement on, then it will not remove a root if it receives movement commands for the rooted unit.

Elsewhere there's a bit more enforcement of root state. Applied on entry, only removed on exit if the unit doesn't have restricting movement flags. Also in ApplyAllImmunities (I think I may try removing this one).

Please test this yourselves and spot anything obvious.

I also think the change in world session could do with some cleaning up. But, I wanted to also get some outside testing/opinions about the solution in the meantime.

Of course, this will do nothing, unless you update your creature templates with unit_flag 4. :)