Skip to content

Commit

Permalink
updated BnetData struct and ladder flags by Larryw, fixed me.ladder
Browse files Browse the repository at this point in the history
  • Loading branch information
kolton committed Sep 23, 2013
1 parent 26a1f2a commit fe93fbc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ enum OOG_Location {
#define TRADE_ACCEPTED 5
#define TRADE_ACCEPT 7

//////////////////////////////////////////////////////////////////////////
// Ladder Flags
//////////////////////////////////////////////////////////////////////////

#define LADDERFLAG_NONE 0x00
#define LADDERFLAG_SET 0x01 //classic ladder, classic ladder hc, expansion ladder hc
#define LADDERFLAG_EXPANSION_NORMAL 0x03

///////////////////////////////////////////////////
// Mercenary Class ID's
///////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion D2BS.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define XP_WIN

#define D2BS_VERSION "1.5.1792" //uptodate with d branch 1765 ff 20b
#define D2BS_VERSION "1.5.1793" //uptodate with d branch 1765 ff 20b

#include <windows.h>
#include <vector>
Expand Down
10 changes: 7 additions & 3 deletions D2Structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,13 @@ struct BnetData {
BYTE _13; //0x228
char szRealmName2[0x18]; //0x229
char szGamePass[0x18]; //0x241
char szGameDesc[0x100]; //0x259
WORD _14; //0x359
BYTE _15; //0x35B
char szGameDesc[0x104]; //0x259
char channelname[0x20]; //+0x35b
BYTE _14[0x40]; //+0x37b
BYTE charlevel; //+0x3bb
BYTE ladderflag; //+0x3bc
DWORD passhash; //+0x3bd
BYTE passlength; //+0x3c1
};

struct RoomTile {
Expand Down
4 changes: 2 additions & 2 deletions JSUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ JSAPI_PROP(unit_getProperty)
//*vp = *p_D2CLIENT_AutomapOn;
break;
case ME_LADDER:
if(pData) // 8 = char created for ladder but expired to non-ladder
vp.setBoolean(!!(pData->nCharFlags & PLAYER_TYPE_LADDER) && !(pData->nCharFlags & 8));
if(pData)
vp.setBoolean(!!(pData->ladderflag & (LADDERFLAG_SET|LADDERFLAG_EXPANSION_NORMAL)));
break;
case ME_QUITONHOSTILE:
vp.setBoolean(Vars.bQuitOnHostile);
Expand Down

0 comments on commit fe93fbc

Please sign in to comment.