mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Added some info about realm list and auth response packets.
Added few dbc structs and updated related enums.
This commit is contained in:
parent
6ee7875d2b
commit
68e73f105e
4 changed files with 84 additions and 23 deletions
|
|
@ -576,6 +576,24 @@ struct BattlemasterListEntry
|
||||||
//uint32 HolidayWorldStateId; // 30 new 3.1
|
//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
|
#define MAX_OUTFIT_ITEMS 24
|
||||||
|
|
||||||
struct CharStartOutfitEntry
|
struct CharStartOutfitEntry
|
||||||
|
|
|
||||||
|
|
@ -305,18 +305,33 @@ enum eConfigBoolValues
|
||||||
CONFIG_BOOL_VALUE_COUNT
|
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
|
enum RealmType
|
||||||
{
|
{
|
||||||
REALM_TYPE_NORMAL = 0,
|
REALM_TYPE_NORMAL = 0,
|
||||||
REALM_TYPE_PVP = 1,
|
REALM_TYPE_PVP = 1,
|
||||||
REALM_TYPE_NORMAL2 = 4,
|
REALM_TYPE_NORMAL2 = 4,
|
||||||
REALM_TYPE_RP = 6,
|
REALM_TYPE_RP = 6,
|
||||||
REALM_TYPE_RPPVP = 8,
|
REALM_TYPE_RPPVP = 8,
|
||||||
REALM_TYPE_FFA_PVP = 16 // custom, free for all pvp mode like arena PvP in all zones except rest activated places and sanctuaries
|
REALM_TYPE_FFA_PVP = 16 // custom, free for all pvp mode like arena PvP in all zones except rest activated places and sanctuaries
|
||||||
// replaced by REALM_PVP in realm list
|
// replaced by REALM_PVP in realm list
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// This is values from first column of Cfg_Categories.dbc
|
||||||
enum RealmZone
|
enum RealmZone
|
||||||
{
|
{
|
||||||
REALM_ZONE_UNKNOWN = 0, // any language
|
REALM_ZONE_UNKNOWN = 0, // any language
|
||||||
|
|
@ -348,7 +363,15 @@ enum RealmZone
|
||||||
REALM_ZONE_TEST_SERVER = 26, // any language
|
REALM_ZONE_TEST_SERVER = 26, // any language
|
||||||
REALM_ZONE_TOURNAMENT_27 = 27, // basic-Latin at create, any at login
|
REALM_ZONE_TOURNAMENT_27 = 27, // basic-Latin at create, any at login
|
||||||
REALM_ZONE_QA_SERVER = 28, // any language
|
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
|
// DB scripting commands
|
||||||
|
|
|
||||||
|
|
@ -964,14 +964,14 @@ void AuthSocket::LoadRealmlist(ByteBuffer &pkt, uint32 acctid)
|
||||||
uint8 color = (std::find(i->second.realmbuilds.begin(), i->second.realmbuilds.end(), _build) != i->second.realmbuilds.end()) ? i->second.color : 2;
|
uint8 color = (std::find(i->second.realmbuilds.begin(), i->second.realmbuilds.end(), _build) != i->second.realmbuilds.end()) ? i->second.color : 2;
|
||||||
color = (i->second.allowedSecurityLevel > _accountSecurityLevel) ? 2 : color;
|
color = (i->second.allowedSecurityLevel > _accountSecurityLevel) ? 2 : color;
|
||||||
|
|
||||||
pkt << uint32(i->second.icon); // realm type
|
pkt << uint32(i->second.icon); // realm type
|
||||||
pkt << uint8(color); // if 2, then realm is offline
|
pkt << uint8(color); // if 2, then realm is offline
|
||||||
pkt << i->first; // name
|
pkt << i->first; // name
|
||||||
pkt << i->second.address; // address
|
pkt << i->second.address; // address
|
||||||
pkt << float(i->second.populationLevel);
|
pkt << float(i->second.populationLevel);
|
||||||
pkt << uint8(AmountOfCharacters);
|
pkt << uint8(AmountOfCharacters);
|
||||||
pkt << uint8(i->second.timezone); // realm category
|
pkt << uint8(i->second.timezone); // realm category
|
||||||
pkt << uint8(0x00); // unk, may be realm number/id?
|
pkt << uint8(0x00); // unk, may be realm number/id?
|
||||||
}
|
}
|
||||||
|
|
||||||
pkt << uint8(0x00);
|
pkt << uint8(0x00);
|
||||||
|
|
@ -1008,19 +1008,26 @@ void AuthSocket::LoadRealmlist(ByteBuffer &pkt, uint32 acctid)
|
||||||
// Show offline state for unsupported client builds
|
// 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;
|
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(i->second.icon); // realm type (this is second column in Cfg_Configs.dbc)
|
||||||
pkt << uint8(lock); // if 1, then realm locked
|
pkt << uint8(lock); // flags, if 0x01, then realm locked
|
||||||
pkt << uint8(color); // if 2, then realm is offline
|
pkt << uint8(color); // see enum RealmFlags
|
||||||
pkt << i->first; // name
|
pkt << i->first; // name
|
||||||
pkt << i->second.address; // address
|
pkt << i->second.address; // address
|
||||||
pkt << float(i->second.populationLevel);
|
pkt << float(i->second.populationLevel);
|
||||||
pkt << uint8(AmountOfCharacters);
|
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?
|
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 << uint16(0x0010);
|
||||||
pkt << uint8(0x00);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,19 @@
|
||||||
#include "Auth/Sha1.h"
|
#include "Auth/Sha1.h"
|
||||||
#include "ByteBuffer.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
|
/// Handle login commands
|
||||||
class AuthSocket: public TcpSocket
|
class AuthSocket: public TcpSocket
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue