[DiscordArchive] I'm trying to read the hair color of one of the characters in my database. It looks like it's stored
[DiscordArchive] I'm trying to read the hair color of one of the characters in my database. It looks like it's stored
Archived author: Darkren • Posted: 2021-01-22T19:50:23.851000+00:00
Original source
I'm trying to read the hair color of one of the characters in my database. It looks like it's stored in the column "playerbytes", which is 50,462,981. The documentation says:
> hairColor = (playerbytes >> 24) % 256
How do I translate this?
Archived author: Kitzunu • Posted: 2021-01-22T20:15:33.276000+00:00
Original source
I believe the answer is 3.
Archived author: Kitzunu • Posted: 2021-01-22T20:16:51.612000+00:00
Original source
because according to my bit shift calculator
50462981 >> 24 = 3
and 3 modulo 256 is 3
Archived author: Kitzunu • Posted: 2021-01-22T20:17:21.278000+00:00
Original source
<@!185462285655867393>
Archived author: Kitzunu • Posted: 2021-01-22T20:21:51.748000+00:00
Original source
and that data I believe to be in this DBC file https://wowdev.wiki/DB/CharHairGeosets
[Embed: CharHairGeosets]
https://wowdev.wiki/DB/CharHairGeosets
Archived author: Darkren • Posted: 2021-01-22T20:25:20.300000+00:00
Original source
Bit shift calculator. Teach a man to fish Thank you!
Archived author: Kitzunu • Posted: 2021-01-22T20:25:58.730000+00:00
Original source
I mean I have no idea how it works really, I just got lucky to know they have something to do about opperators xD
Archived author: Darkren • Posted: 2021-01-22T20:36:36.135000+00:00
Original source
Hairstyle is >> 16 but I'm getting a weird number
Archived author: Kitzunu • Posted: 2021-01-22T20:40:39.305000+00:00
Original source
That would be 2 if im not misstaken
Archived author: Kitzunu • Posted: 2021-01-22T20:42:47.524000+00:00
Original source
`(50462981/(2^16)) modulo 256`