TrinityCore/TrinityCore — pull request #5811 by Elron103 (2012-03-20 17:29:40+00:00)
Title: Core/Units: Fix issues with threat management on phase changes

## Description

We currently have a global reproducable bug related to phasing and threat management of creatures.

Example:
Two players fight against a creature and the tank switches his phase (can happen in several encounters, for example Valithria). Of course the creature is not in the same phase as the player is. Instead of switching to the second player, the creature does nothing and follows the first player.

You can simply reproduce it with any creature and the .mod phase command.

This fix here creates the same behaviour as for .gm off and .gm on command instead of switching phases here. So the creature changes to the second player and attacks him. If the first one is enabled again, the creature switches back, if the first player has more threat than the other one.

## Revisions

Trinity: https://github.com/TrinityCore/TrinityCore/commit/f0f68f15a86c5ac0c83c47c6db67786506f8460d
Database: TDB rev. 46

Special thanks to Kandera and Machiavelli for codestyle suggestions. :)