[DiscordArchive] Wait, there can be 32 phases?
[DiscordArchive] Wait, there can be 32 phases?
Archived author: bandysc • Posted: 2021-07-15T09:37:22.128000+00:00
Original source
since wrath blizzard introduced "phasing" that is - in the same place of world you can see different set of NPCs
Archived author: bandysc • Posted: 2021-07-15T09:38:47.368000+00:00
Original source
in core it is achieved using "object phase mask" - object in the world (including player) can be in specific phase (and you can use all 32 bits of integer for that), player can only see the object if one is in the same phasemask as object
Archived author: bandysc • Posted: 2021-07-15T09:40:21.761000+00:00
Original source
SAI has event phase mask - this is the same math (because, well you can't change the maths rule, this is the most efficient way to keep different values in a single number), but has completely different purpose - SAI script can be in specific "event phase", that you can switch to using actions
Archived author: bandysc • Posted: 2021-07-15T09:40:46.225000+00:00
Original source
and you can restrict particular event to be played only if the script is in particular event phase mask
Archived author: bandysc • Posted: 2021-07-15T09:40:57.884000+00:00
Original source
completely unrelated to object phase mask
Archived author: bandysc • Posted: 2021-07-15T09:42:17.024000+00:00
Original source
yes, currently SAI offers only up to 12 event phases (but it could support all 32 event phases, simply someone thought 12 will be enough).
But when it comes to object phase mask, you can use all phases no matter if npc has sai or not
Archived author: Honey • Posted: 2021-07-15T09:42:43.103000+00:00
Original source
Makes even more sense now. Thanks for clarifying!
Archived author: Kitzunu • Posted: 2021-07-15T09:43:12.345000+00:00
Original source
fuck sai and fuck the wiki
> Event will only be able to occur if creature/GO is in this phase.
This is why I rarely script lmao
Archived author: bandysc • Posted: 2021-07-15T09:44:50.482000+00:00
Original source
nope, 4294967296 needs 33 bits, it is outside of range of int32. Highest "phase" is phase 31, which means phasemask `2147483648`. You can use phasemask `4294967295` (your number minus 1), but it effectively means "in all phases".
Archived author: bandysc • Posted: 2021-07-15T09:47:29.551000+00:00
Original source
yeah, this sentence is technically correct, but can be confusing