[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: Luka • Posted: 2019-06-14T12:01:18.333000+00:00
Original source
The phase ID in 3.3.5 is a bit-mask value that goes up to max uint32 (4294967295)
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:17:15.695000+00:00
Original source
yea
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:17:30.473000+00:00
Original source
and a small edit to those who saw the Ulong_max
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:17:32.328000+00:00
Original source
it is UINT_MAX
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:23:48.925000+00:00
Original source
so mask are like 2 4 8 16 32 64 128 256 512 1024 and etc, and by using right?
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:25:46.296000+00:00
Original source
Imma make usage only of like 30 in the same time
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:29:05.110000+00:00
Original source
hm
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:30:19.182000+00:00
Original source
I ran a php code (because it is what I actually study) to calculate the possible phases
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:30:30.953000+00:00
Original source
and I don't like the results
Archived author: MR.MUSTACHE • Posted: 2019-06-14T12:32:45.493000+00:00
Original source
```php
$n = 100; // number of phases to check
for($phase = 1,$phaseMask = 1; $phase < $n; $phase++,$phaseMask *= 2)
{
if($phaseMask >= 4294967295 )
break;
printf("phase %d is phaseMask %d".PHP_EOL, $phase, $phaseMask);
}
```
calculates those phasemasks
```
phase 1 is phaseMask 1
phase 2 is phaseMask 2
phase 3 is phaseMask 4
phase 4 is phaseMask 8
phase 5 is phaseMask 16
phase 6 is phaseMask 32
phase 7 is phaseMask 64
phase 8 is phaseMask 128
phase 9 is phaseMask 256
phase 10 is phaseMask 512
phase 11 is phaseMask 1024
phase 12 is phaseMask 2048
phase 13 is phaseMask 4096
phase 14 is phaseMask 8192
phase 15 is phaseMask 16384
phase 16 is phaseMask 32768
phase 17 is phaseMask 65536
phase 18 is phaseMask 131072
phase 19 is phaseMask 262144
phase 20 is phaseMask 524288
phase 21 is phaseMask 1048576
phase 22 is phaseMask 2097152
phase 23 is phaseMask 4194304
phase 24 is phaseMask 8388608
phase 25 is phaseMask 16777216
phase 26 is phaseMask 33554432
phase 27 is phaseMask 67108864
phase 28 is phaseMask 134217728
phase 29 is phaseMask 268435456
phase 30 is phaseMask 536870912
phase 31 is phaseMask 1073741824
phase 32 is phaseMask 2147483648
```