Valhalla Legends Forums Archive | BnetDocs Research and Discussion | D2 Game Flags

AuthorMessageTime
Hell-Lord
Realityripple has asked me to post this since he has not had his account creation accepted by an Admin. Anyway he has  the D2 game flag values. Apparently MCP_GAMELIST and MCP_GAMEINFO have incorrect data. The "status" field is incorrect it's a flag field and the correct values are as follows:

[CODE]
Public Const D2GAME_HARDCORE                  As Long = &H800      'Hardcore Game

Public Const D2GAME_NIGHTMARE                As Long = &H1000    'Nightmare Game

Public Const D2GAME_HELL                            As Long = &H2000    'Hell Game

Public Const D2GAME_EMPTY                        As Long = &H20000    'Game is empty/Creator failed to join

Public Const D2GAME_EXPANSION                As Long = &H100000  'Expansion Game

Public Const D2GAME_LADDER                      As Long = &H200000  'Ladder Game

Public Const D2GAME_DOWN                        As Long = &HFFFFFFFF 'Realm Down

Public Const D2GAME_GONE                        As Long = &HFFFFFFFE 'Game Doesn't Exist
[/CODE]

And btw &HFFFFFFFF and &HFFFFFFFE are equal to -1 and -2 respectively
February 3, 2007, 11:43 PM
Barabajagal
Apparently I can create another account and rename it to fit my needs, though. As a PS to this post which Paul made for me, I'd like to know if anyone else has recorded other values? And does anyone know why all the Flags have a 4 at the end of them?
February 4, 2007, 12:08 AM
Hell-Lord
Hi  ;)
February 4, 2007, 12:10 AM
Topaz
Nah, they aren't -1 and -2.
February 4, 2007, 12:34 AM
Hell-Lord
uh yea they are
February 4, 2007, 12:37 AM
Barabajagal
If you're using vb, DWords end up being Longs, and since Longs can't handle that large of a number, it loops around. CLng(&HFFFFFFFF) = -1.
February 4, 2007, 12:37 AM
Topaz
0xFFFFFFFF == 4294967295L
0xFFFFFFFE == 4294967294L


Less fail, plz
February 4, 2007, 1:17 AM
Barabajagal
Try MsgBox Hex$(CLng(-1))
February 4, 2007, 1:20 AM
Yegg
[quote author=Ripple link=topic=16238.msg163876#msg163876 date=1170552008]
Try MsgBox Hex$(CLng(-1))
[/quote]

No. topaz is correct on this.
February 4, 2007, 4:17 AM
Ringo
That would depend totaly on the long being signed or unsigned, no?
Ripple: vb6 numeric data types are generaly signed.
An example of a signed long: -2147483648 to 2147483647
An example of a unsigned long: 0 to 4294967295

Point being -- Your both right? :P
February 4, 2007, 12:13 PM
UserLoser
[quote author=Ripple link=topic=16238.msg163876#msg163876 date=1170552008]
Try MsgBox Hex$(CLng(-1))
[/quote]

Like stated by Ringo, VB6 data types such as a long are signed.
February 4, 2007, 5:47 PM
Barabajagal
As i said:

If you're using vb, DWords end up being Longs, and since Longs can't handle that large of a number, it loops around. CLng(&HFFFFFFFF) = -1.

Notice the first part of that sentence.
February 4, 2007, 9:37 PM
E.T.
I have the 0x04 flag as 'Valid': it's in all packets containing an actual game, but the server also sends an empty packet at the end of the list which doesn't contain the flag or anything else, probably to tell the client it's now time to display the list...

[code]
        /// <summary>
        /// If not present, the packet contains no useful information.
        /// <para>For <see cref="RealmServer.GameList"/>, this means the packet marks the end of listing.</para>
        /// <para>For <see cref="RealmServer.GameInfo"/>, the game was destroyed since listed !?</para>
        /// </summary>
        Valid = 4,
[/code]
February 9, 2007, 5:26 AM
Barabajagal
A value of 4 for valid would make sense... it'd be nice to know if there were any other results... but so far, all the game flags return with 4. Any further info on flag meanings (there seems to be quite a few empty spaces) would be very appreciated.
February 9, 2007, 5:45 AM
E.T.
I don't have any more info at the moment, sorry.
February 9, 2007, 9:46 AM

Search