[DiscordArchive] Does trinitycore 3.3.5 have any limit for the phasemasks that can be used?
[DiscordArchive] Does trinitycore 3.3.5 have any limit for the phasemasks that can be used?
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:12:42.210000+00:00
Original source
Does trinitycore 3.3.5 have any limit for the phasemasks that can be used?
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:12:57.629000+00:00
Original source
so far I never used more than phasemask 128
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:15:15.030000+00:00
Original source
```
void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
```
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:15:23.709000+00:00
Original source
in unit, PhaseMask is set as uint32
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:15:34.660000+00:00
Original source
idk why but I have some false memory that it was uint8
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:17:53.562000+00:00
Original source
How to see the maximal possible phasemask
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:18:10.142000+00:00
Original source
So I can nake a iteration check
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:33:08.042000+00:00
Original source
For those that are facing the same question, I think that this might be good enough to loop trough most usable phases that are not PHASEMASK_NORMAL
```cpp
// loop all unique phases
for (uint32 i = 2; i <= MAXINT32; i *= 2)
```
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:47:04.621000+00:00
Original source
nvm found a similiar script on the net
Archived author: MR.MUSTACHE • Posted: 2019-06-14T11:47:10.685000+00:00
Original source
```cpp
// loop all unique phases
for (uint32 phase = 2; phase <= ULONG_MAX / 2; phase *= 2)
{
```