i try to understand the phasing system from Trinity but i have a few problems. For testing i change the phase mask from my test object to 2 and add me this aura http://www.wowhead.com/spell=55782. It works and i can see only the phase 2 objects/players/creatures. Now i want to use more phases. My first question: How many phases are exist?
My idea: I have objects in many phases. If a player join the object area then he get the permission to see all objects which have for example the phase mask 2. Annother player get the permission to see all phase 6 objects etc.
My problem: How i can give the player this permission?
Sorry i hate my english skills. The command .gm visible. Use this command the phase system too? If i modify the existed phase system will be the visible command broken?
The .gm visible commands will likely not be broken.
Not that I checked, but they dont likely use phasing since phasing doesnt make it possible to make it so that you see a player while he doesnt see you.
Okay i understand how the two functions work but i dont find the point where i can change the bitmask to “normal” number.
CanNeverSee check the map and call the function InSamePhase. InSamePhase get the phasemask from the object and check it. All phasemask variables are uint32… where is defined that this variables are bitmasks?
You could try converting the worldobject to player etc.
Anyways, the simpler solution is the PHASEMASK_ANYWHERE check.
When a player uses .gm on, his phase is set to PHASEMASK_ANYWHERE. This is 2^32-1. (max uint32 number)
Now. You could just check if either of the phases is PHASEMASK_ANYWHERE, if so, return true.
This of course assumes no player etc can ever achieve PHASEMASK_ANYWHERE.
For example phase 0 is never used anywhere.
So if you would set the GM phase to 0, you could then check if the either phase is 0 and if so, return true, since the other phase is a GM’s phase, which should always see everything.