• Welcome to Valhalla Legends Archive.
 

D2 Game Flags

Started by Hell-Lord, February 03, 2007, 05:43 PM

Previous topic - Next topic

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:


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


And btw &HFFFFFFFF and &HFFFFFFFE are equal to -1 and -2 respectively

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?

Hell-Lord


topaz

Nah, they aren't -1 and -2.
RLY...?

Hell-Lord


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.

topaz

0xFFFFFFFF == 4294967295L
0xFFFFFFFE == 4294967294L


Less fail, plz
RLY...?

Barabajagal

Try MsgBox Hex$(CLng(-1))

Yegg


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

UserLoser

Quote from: Ripple on February 03, 2007, 07:20 PM
Try MsgBox Hex$(CLng(-1))

Like stated by Ringo, VB6 data types such as a long are signed.

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.

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...


        /// <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,

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.

E.T.

I don't have any more info at the moment, sorry.