Added some info about realm list and auth response packets.

Added few dbc structs and updated related enums.
This commit is contained in:
tomrus88 2010-04-04 01:14:16 +04:00
parent 6ee7875d2b
commit 68e73f105e
4 changed files with 84 additions and 23 deletions

View file

@ -576,6 +576,24 @@ struct BattlemasterListEntry
//uint32 HolidayWorldStateId; // 30 new 3.1
};
/*struct Cfg_CategoriesEntry
{
uint32 Index; // categoryId, sent in RealmList packet
uint32 Unk1;
uint32 Unk2;
uint32 IsTournamentRealm;
char *categoryName[16];
uint32 categoryNameFlags;
}*/
/*struct Cfg_ConfigsEntry
{
uint32 Id;
uint32 Type; // sent in RealmList packet
uint32 IsPvp;
uint32 IsRp;
};*/
#define MAX_OUTFIT_ITEMS 24
struct CharStartOutfitEntry

View file

@ -305,7 +305,21 @@ enum eConfigBoolValues
CONFIG_BOOL_VALUE_COUNT
};
/// Type of server
/// Can be used in SMSG_AUTH_RESPONSE packet
enum BillingPlanFlags
{
SESSION_NONE = 0x00,
SESSION_UNUSED = 0x01,
SESSION_RECURRING_BILL = 0x02,
SESSION_FREE_TRIAL = 0x04,
SESSION_IGR = 0x08,
SESSION_USAGE = 0x10,
SESSION_TIME_MIXTURE = 0x20,
SESSION_RESTRICTED = 0x40,
SESSION_ENABLE_CAIS = 0x80,
};
/// Type of server, this is values from second column of Cfg_Configs.dbc
enum RealmType
{
REALM_TYPE_NORMAL = 0,
@ -317,6 +331,7 @@ enum RealmType
// replaced by REALM_PVP in realm list
};
/// This is values from first column of Cfg_Categories.dbc
enum RealmZone
{
REALM_ZONE_UNKNOWN = 0, // any language
@ -348,7 +363,15 @@ enum RealmZone
REALM_ZONE_TEST_SERVER = 26, // any language
REALM_ZONE_TOURNAMENT_27 = 27, // basic-Latin at create, any at login
REALM_ZONE_QA_SERVER = 28, // any language
REALM_ZONE_CN9 = 29 // basic-Latin at create, any at login
REALM_ZONE_CN9 = 29, // basic-Latin at create, any at login
REALM_ZONE_TEST_SERVER_2 = 30, // any language
REALM_ZONE_CN10 = 31, // basic-Latin at create, any at login
REALM_ZONE_CTC = 32,
REALM_ZONE_CNC = 33,
REALM_ZONE_CN1_4 = 34, // basic-Latin at create, any at login
REALM_ZONE_CN2_6_9 = 35, // basic-Latin at create, any at login
REALM_ZONE_CN3_7 = 36, // basic-Latin at create, any at login
REALM_ZONE_CN5_8 = 37 // basic-Latin at create, any at login
};
// DB scripting commands

View file

@ -1008,19 +1008,26 @@ void AuthSocket::LoadRealmlist(ByteBuffer &pkt, uint32 acctid)
// Show offline state for unsupported client builds
uint8 color = (std::find(i->second.realmbuilds.begin(), i->second.realmbuilds.end(), _build) != i->second.realmbuilds.end()) ? i->second.color : 2;
pkt << uint8(i->second.icon); // realm type
pkt << uint8(lock); // if 1, then realm locked
pkt << uint8(color); // if 2, then realm is offline
pkt << uint8(i->second.icon); // realm type (this is second column in Cfg_Configs.dbc)
pkt << uint8(lock); // flags, if 0x01, then realm locked
pkt << uint8(color); // see enum RealmFlags
pkt << i->first; // name
pkt << i->second.address; // address
pkt << float(i->second.populationLevel);
pkt << uint8(AmountOfCharacters);
pkt << uint8(i->second.timezone); // realm category
pkt << uint8(i->second.timezone); // realm category (Cfg_Categories.dbc)
pkt << uint8(0x2C); // unk, may be realm number/id?
/*if(realmFlags & REALM_FLAG_SPECIFYBUILD)
{
pkt << uint8(0); // major
pkt << uint8(0); // minor
pkt << uint8(0); // revision
pkt << uint16(0); // build
}*/
}
pkt << uint8(0x10);
pkt << uint8(0x00);
pkt << uint16(0x0010);
break;
}
}

View file

@ -34,6 +34,19 @@
#include "Auth/Sha1.h"
#include "ByteBuffer.h"
enum RealmFlags
{
REALM_FLAG_NONE = 0x00,
REALM_FLAG_INVALID = 0x01,
REALM_FLAG_OFFLINE = 0x02,
REALM_FLAG_SPECIFYBUILD = 0x04, // client will show realm version in RealmList screen in form "RealmName (major.minor.revision.build)"
REALM_FLAG_UNK1 = 0x08,
REALM_FLAG_UNK2 = 0x10,
REALM_FLAG_RECOMMENDED = 0x20, // client checks pop == 600f
REALM_FLAG_NEW = 0x40, // client checks pop == 200f
REALM_FLAG_FULL = 0x80 // client checks pop == 400f
};
/// Handle login commands
class AuthSocket: public TcpSocket
{