Eidolon
Member
This questions is more for server devs and doesn't really have to do with Tethealla, but I don't know where else to ask about this.
I'm writing my own server from scratch at the moment, and I have BB clients logging in and getting through party creation, but something is wrong with either my bank data or my inventory data defaults and the client crashes immediately upon zoning into a floor or when opening the main menu (the F1-10 hotkeys work).
I recognize that for an inventory or bank slot to be considered "empty", the item ID needs to be 0xFFFFFFFF and the first 2 bytes of an inventory slot need to be set to 00 FF (0xFF00 as a u16). For my default character's inventory, the number of item slots used is set to 0. Is there more that I am missing here?
My mapping structures for character data are here http://git.idolagames.com/furyhunter/idolapsoserv/src/master/psomsg_bb/src/chara.rs#L9 and here's the code that initializes some extra data outside of the Default implementations, http://git.idolagames.com/furyhunter/idolapsoserv/src/master/src/block/handler.rs#L115 . The code is in Rust which may be a little hard to understand, but the impl Default for * blocks define a common function for obtaining a default value for a type. That is where my defaults go.
Edit: It turns out I wasn't actually setting the first two bytes to 0xFF00. Whoops, hours wasted debugging that...
I'm writing my own server from scratch at the moment, and I have BB clients logging in and getting through party creation, but something is wrong with either my bank data or my inventory data defaults and the client crashes immediately upon zoning into a floor or when opening the main menu (the F1-10 hotkeys work).
I recognize that for an inventory or bank slot to be considered "empty", the item ID needs to be 0xFFFFFFFF and the first 2 bytes of an inventory slot need to be set to 00 FF (0xFF00 as a u16). For my default character's inventory, the number of item slots used is set to 0. Is there more that I am missing here?
My mapping structures for character data are here http://git.idolagames.com/furyhunter/idolapsoserv/src/master/psomsg_bb/src/chara.rs#L9 and here's the code that initializes some extra data outside of the Default implementations, http://git.idolagames.com/furyhunter/idolapsoserv/src/master/src/block/handler.rs#L115 . The code is in Rust which may be a little hard to understand, but the impl Default for * blocks define a common function for obtaining a default value for a type. That is where my defaults go.
Edit: It turns out I wasn't actually setting the first two bytes to 0xFF00. Whoops, hours wasted debugging that...
Last edited: