Showing Posts For Caldrick.6920:
struct identity { wchar_t name; int team_color : 2; int health : 16; int supply : 6; int profession : 2; int state : 2; int commander : 1; int combat : 1; int capturing : 1; int instanced : 1; }
This would result in a total of 8 bytes for the whole structure. I removed a few of the attributes as I found them to be mostly unusable like gathering (period is way to short) or dungeon which is more or less a duplicate of instanced. But of course all your fields could still be added which would add another 4 bytes due to byte alignment.
Agreed, this would be fine, assuming of course that the upper/lower bounds of the data are met. For example, aren’t there more than 4 professions?
Hm, depending on what high frequency is the target, one could think about just using another transport mechanism for those, e.g. a “GWLink”, to meet the requirement of rare updates set by Mumble.
Personally I prefer the context blob method over the JSON string.
The last char of the character name being a null char? Putting that there should avoid messing up the mumble default gui with the data which would be nice indeed.
I guess in_combat could be added to state, saving a byte.
Indeed it is actually desirable to change the Identity information from a string to a binary structure. The main reason for this being the frequency of the updates. Currently the Identity isn’t updated regularly however, the IsCommander field might be switched often enough to warrant this information as binary so that the JSON string isn’t parsed for each access or in some update thread.
You guys did a good job tracking down most of it.
Here’s the whole thing:
// uniquely identifies a map instance for mumble struct MumbleContext { byte serverAddress[28]; // contains sockaddr_in or sockaddr_in6 unsigned mapId; unsigned mapType; unsigned shardId; unsigned instance; unsigned buildId; };
Cliff,
Would it be possible to add in which floor the character is currently at? Each map seems to have different distances between floors, and some floor distances don’t appear to be constant on some maps.
It looks like they are divided into 1000 inch increments from the couple of maps that I’ve looked at.
(edited by Caldrick.6920)
Project Name: GwApiNET
Language: C#
Administrator: Caldrick.6920 ,Talus.1402
Website: https://gwapinet.codeplex.com/
Provides 1 to 1 object mapping and object data caching. Also allows custom data caching schemes.
Implementation for Gw2Stats API has also been implemented. Currently working on Maps Service utilities.
(edited by Caldrick.6920)