TrinityCore/TrinityCore — pull request #7880 by Naios (2012-09-26 15:58:50+00:00)
Title: Phase Definitions, Terrainswap & Multiphasing

It is very hard to create working questchains with several phasemasks through phase auras.
And we need a lot of phases in cataclysm, the goblin or worgen starting areas for example.

So this system uses a abstraction for phasemasks: Phase Definitions, that use the condition system.
Phase Definitions are very easy to create, debugable and are calculated dynamically.

The PhaseMgr checks if your phasemask needs an update or not, depending on your quest status
or the players level for example.

The PhaseMgr supports multiphasing (several phaseIds and terrainswaps who are active at the same time) and the Aura Effect SPELL_AURA_PHASE (261) that has no MiscValueA defined in the dbcs.

You can define a custom phasemask and terrainswap for such spells in the spell_phase_dbc table.

If you want to see a short presentation video visit: http://www.youtube.com/watch?v=RalpNxQEvjA