Update DataBase and Realm code for 322a
--HG-- branch : trunk
This commit is contained in:
@@ -27,19 +27,19 @@ extern DatabasePostgre WorldDatabase;
|
|||||||
extern DatabaseMysql WorldDatabase;
|
extern DatabaseMysql WorldDatabase;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char CreatureInfosrcfmt[]="iiiiiiiisssiiiiiiiiiiffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiis";
|
const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiiiiiiiffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiis";
|
||||||
const char CreatureInfodstfmt[]="iiiiiiiisssiiiiiiiiiiffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiii";
|
const char CreatureInfodstfmt[]="iiiiiiiiiisssiiiiiiiiiiffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiii";
|
||||||
const char CreatureDataAddonInfofmt[]="iiiiiiis";
|
const char CreatureDataAddonInfofmt[]="iiiiiiis";
|
||||||
const char CreatureModelfmt[]="iffbi";
|
const char CreatureModelfmt[]="iffbi";
|
||||||
const char CreatureInfoAddonInfofmt[]="iiiiiiis";
|
const char CreatureInfoAddonInfofmt[]="iiiiiiis";
|
||||||
const char EquipmentInfofmt[]="iiii";
|
const char EquipmentInfofmt[]="iiii";
|
||||||
const char GameObjectInfosrcfmt[]="iiissssiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis";
|
const char GameObjectInfosrcfmt[]="iiissssiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis";
|
||||||
const char GameObjectInfodstfmt[]="iiissssiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
const char GameObjectInfodstfmt[]="iiissssiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
||||||
const char ItemPrototypesrcfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiisiiii";
|
const char ItemPrototypesrcfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiisiiii";
|
||||||
const char ItemPrototypedstfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiiiiiii";
|
const char ItemPrototypedstfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiiiiiii";
|
||||||
const char PageTextfmt[]="isi";
|
const char PageTextfmt[]="isi";
|
||||||
const char InstanceTemplatesrcfmt[]="iiiiiiffffs";
|
const char InstanceTemplatesrcfmt[]="iiiffffs";
|
||||||
const char InstanceTemplatedstfmt[]="iiiiiiffffi";
|
const char InstanceTemplatedstfmt[]="iiiffffi";
|
||||||
|
|
||||||
SQLStorage sCreatureStorage(CreatureInfosrcfmt, CreatureInfodstfmt, "entry","creature_template");
|
SQLStorage sCreatureStorage(CreatureInfosrcfmt, CreatureInfodstfmt, "entry","creature_template");
|
||||||
SQLStorage sCreatureDataAddonStorage(CreatureDataAddonInfofmt,"guid","creature_addon");
|
SQLStorage sCreatureDataAddonStorage(CreatureDataAddonInfofmt,"guid","creature_addon");
|
||||||
@@ -79,4 +79,3 @@ void SQLStorage::Load()
|
|||||||
SQLStorageLoader loader;
|
SQLStorageLoader loader;
|
||||||
loader.Load(*this);
|
loader.Load(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ enum LoginResult
|
|||||||
//2.4.3 build 8606
|
//2.4.3 build 8606
|
||||||
//3.1.3 build 9947
|
//3.1.3 build 9947
|
||||||
//3.1.3 build 10146 Chinese build
|
//3.1.3 build 10146 Chinese build
|
||||||
|
//3.2.2a build 10505
|
||||||
|
|
||||||
#define EXPECTED_TRINITY_CLIENT_BUILD {10146, 9947, 8606, 5875, 6005, 0}
|
#define EXPECTED_TRINITY_CLIENT_BUILD {10505, 10146, 9947, 8606, 5875, 6005, 0}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ bool AuthSocket::_HandleLogonProof()
|
|||||||
sha.UpdateBigNumbers(&A, &M, &K, NULL);
|
sha.UpdateBigNumbers(&A, &M, &K, NULL);
|
||||||
sha.Finalize();
|
sha.Finalize();
|
||||||
|
|
||||||
if (_build == 8606 || _build == 9947 || _build == 10146)//2.4.3 and 3.1.3 clients (10146 is Chinese build for 3.1.3)
|
if (_build == 8606 || _build == 9947 || _build == 10146 || _build == 10505)//2.4.3, 3.1.3 and 3.2.2a clients (10146 is Chinese build for 3.1.3)
|
||||||
{
|
{
|
||||||
sAuthLogonProof_S proof;
|
sAuthLogonProof_S proof;
|
||||||
memcpy(proof.M2, sha.GetDigest(), 20);
|
memcpy(proof.M2, sha.GetDigest(), 20);
|
||||||
@@ -909,7 +909,7 @@ bool AuthSocket::_HandleRealmList()
|
|||||||
RealmList built_realmList;
|
RealmList built_realmList;
|
||||||
for (rlm = m_realmList.begin(); rlm != m_realmList.end(); ++rlm)
|
for (rlm = m_realmList.begin(); rlm != m_realmList.end(); ++rlm)
|
||||||
{
|
{
|
||||||
if (_build == 8606 || _build == 9947 || _build == 10146)//2.4.3 and 3.1.3 cliens
|
if (_build == 8606 || _build == 9947 || _build == 10146 || _build == 10505)//2.4.3, 3.1.3 and 3.2.2a clients
|
||||||
{
|
{
|
||||||
if (rlm->second.gamebuild == _build)
|
if (rlm->second.gamebuild == _build)
|
||||||
built_realmList.AddRealm(rlm->second);
|
built_realmList.AddRealm(rlm->second);
|
||||||
@@ -925,7 +925,7 @@ bool AuthSocket::_HandleRealmList()
|
|||||||
///- Circle through realms in the RealmList and construct the return packet (including # of user characters in each realm)
|
///- Circle through realms in the RealmList and construct the return packet (including # of user characters in each realm)
|
||||||
ByteBuffer pkt;
|
ByteBuffer pkt;
|
||||||
pkt << (uint32) 0;
|
pkt << (uint32) 0;
|
||||||
if (_build == 8606 || _build == 9947 || _build == 10146)//only 2.4.3 and 3.1.3 cliens
|
if (_build == 8606 || _build == 9947 || _build == 10146 || _build == 10505)//only 2.4.3, 3.1.3 and 3.2.2a clients
|
||||||
pkt << (uint16) built_realmList.size();
|
pkt << (uint16) built_realmList.size();
|
||||||
else
|
else
|
||||||
pkt << (uint32) built_realmList.size();
|
pkt << (uint32) built_realmList.size();
|
||||||
@@ -948,7 +948,7 @@ bool AuthSocket::_HandleRealmList()
|
|||||||
uint8 lock = (i->second.allowedSecurityLevel > _accountSecurityLevel) ? 1 : 0;
|
uint8 lock = (i->second.allowedSecurityLevel > _accountSecurityLevel) ? 1 : 0;
|
||||||
|
|
||||||
pkt << i->second.icon; // realm type
|
pkt << i->second.icon; // realm type
|
||||||
if (i->second.gamebuild == 9947 || i->second.gamebuild == 10146 || i->second.gamebuild == 8606)//only 2.4.3 and 3.1.3 cliens
|
if (i->second.gamebuild == 10505 || i->second.gamebuild == 9947 || i->second.gamebuild == 10146 || i->second.gamebuild == 8606)//only 2.4.3, 3.1.3 and 3.2.2a clients
|
||||||
pkt << lock; // if 1, then realm locked
|
pkt << lock; // if 1, then realm locked
|
||||||
pkt << i->second.color; // if 2, then realm is offline
|
pkt << i->second.color; // if 2, then realm is offline
|
||||||
pkt << i->first;
|
pkt << i->first;
|
||||||
@@ -956,13 +956,13 @@ bool AuthSocket::_HandleRealmList()
|
|||||||
pkt << i->second.populationLevel;
|
pkt << i->second.populationLevel;
|
||||||
pkt << AmountOfCharacters;
|
pkt << AmountOfCharacters;
|
||||||
pkt << i->second.timezone; // realm category
|
pkt << i->second.timezone; // realm category
|
||||||
if (i->second.gamebuild == 9947 || i->second.gamebuild == 10146 || i->second.gamebuild == 8606)//2.4.3 and 3.1.3 clients
|
if (i->second.gamebuild == 10505 || i->second.gamebuild == 9947 || i->second.gamebuild == 10146 || i->second.gamebuild == 8606)//2.4.3, 3.1.3 and 3.2.2a clients
|
||||||
pkt << (uint8) 0x2C; // unk, may be realm number/id?
|
pkt << (uint8) 0x2C; // unk, may be realm number/id?
|
||||||
else
|
else
|
||||||
pkt << (uint8) 0x0; //1.12.1 and 1.12.2 clients
|
pkt << (uint8) 0x0; //1.12.1 and 1.12.2 clients
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_build == 9947 || _build == 10146 || _build == 8606)//2.4.3 and 3.1.3 cliens
|
if (_build == 10505 || _build == 9947 || _build == 10146 || _build == 8606)//2.4.3, 3.1.3 and 3.2.2a clients
|
||||||
{
|
{
|
||||||
pkt << (uint8) 0x10;
|
pkt << (uint8) 0x10;
|
||||||
pkt << (uint8) 0x00;
|
pkt << (uint8) 0x00;
|
||||||
|
|||||||
Reference in New Issue
Block a user