Core/DBLayer: More type fixes
This commit is contained in:
@@ -70,7 +70,7 @@ void RealmList::UpdateRealms(bool init)
|
|||||||
{
|
{
|
||||||
sLog->outDetail("Updating Realm List...");
|
sLog->outDetail("Updating Realm List...");
|
||||||
|
|
||||||
PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST);
|
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST);
|
||||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||||
|
|
||||||
// Circle through results and add them to the realm map
|
// Circle through results and add them to the realm map
|
||||||
@@ -79,16 +79,16 @@ void RealmList::UpdateRealms(bool init)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
uint32 realmId = fields[0].GetUInt32();
|
uint32 realmId = fields[0].GetUInt32();
|
||||||
const std::string& name = fields[1].GetString();
|
const std::string& name = fields[1].GetString();
|
||||||
const std::string& address = fields[2].GetString();
|
const std::string& address = fields[2].GetString();
|
||||||
uint16 port = fields[3].GetUInt16();
|
uint16 port = fields[3].GetUInt16();
|
||||||
uint8 icon = fields[4].GetUInt8();
|
uint8 icon = fields[4].GetUInt8();
|
||||||
RealmFlags flag = RealmFlags(fields[5].GetUInt8());
|
RealmFlags flag = RealmFlags(fields[5].GetUInt8());
|
||||||
uint8 timezone = fields[6].GetUInt8();
|
uint8 timezone = fields[6].GetUInt8();
|
||||||
uint8 allowedSecurityLevel = fields[7].GetUInt8();
|
uint8 allowedSecurityLevel = fields[7].GetUInt8();
|
||||||
float pop = fields[8].GetFloat();
|
float pop = fields[8].GetFloat();
|
||||||
uint32 build = fields[9].GetUInt32();
|
uint32 build = fields[9].GetUInt32();
|
||||||
|
|
||||||
UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
|
UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
|
||||||
|
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ bool ChatHandler::HandleListItemCommand(const char *args)
|
|||||||
result = CharacterDatabase.Query(stmt);
|
result = CharacterDatabase.Query(stmt);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
inv_count = (*result)[0].GetUInt32();
|
inv_count = (*result)[0].GetUInt64();
|
||||||
|
|
||||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_INVENTORY_ITEM_BY_ENTRY);
|
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_INVENTORY_ITEM_BY_ENTRY);
|
||||||
stmt->setUInt32(0, item_id);
|
stmt->setUInt32(0, item_id);
|
||||||
@@ -476,7 +476,7 @@ bool ChatHandler::HandleListItemCommand(const char *args)
|
|||||||
result = CharacterDatabase.Query(stmt);
|
result = CharacterDatabase.Query(stmt);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
mail_count = (*result)[0].GetUInt32();
|
mail_count = (*result)[0].GetUInt64();
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
@@ -523,7 +523,7 @@ bool ChatHandler::HandleListItemCommand(const char *args)
|
|||||||
result = CharacterDatabase.Query(stmt);
|
result = CharacterDatabase.Query(stmt);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
auc_count = (*result)[0].GetUInt32();
|
auc_count = (*result)[0].GetUInt64();
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
@@ -560,7 +560,7 @@ bool ChatHandler::HandleListItemCommand(const char *args)
|
|||||||
result = CharacterDatabase.Query(stmt);
|
result = CharacterDatabase.Query(stmt);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
guild_count = (*result)[0].GetUInt32();
|
guild_count = (*result)[0].GetUInt64();
|
||||||
|
|
||||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_BANK_ITEM_BY_ENTRY);
|
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_BANK_ITEM_BY_ENTRY);
|
||||||
stmt->setUInt32(0, item_id);
|
stmt->setUInt32(0, item_id);
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
|
|||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
mails_count = fields[0].GetUInt32();
|
mails_count = fields[0].GetUInt64();
|
||||||
}
|
}
|
||||||
|
|
||||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_LEVEL);
|
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_LEVEL);
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ GmTicket::~GmTicket() { }
|
|||||||
|
|
||||||
bool GmTicket::LoadFromDB(Field* fields)
|
bool GmTicket::LoadFromDB(Field* fields)
|
||||||
{
|
{
|
||||||
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||||
|
// ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, completed, escalated, viewed
|
||||||
uint8 index = 0;
|
uint8 index = 0;
|
||||||
_id = fields[ index].GetUInt32();
|
_id = fields[ index].GetUInt32();
|
||||||
_playerGuid = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER);
|
_playerGuid = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||||
@@ -87,6 +89,8 @@ bool GmTicket::LoadFromDB(Field* fields)
|
|||||||
|
|
||||||
void GmTicket::SaveToDB(SQLTransaction& trans) const
|
void GmTicket::SaveToDB(SQLTransaction& trans) const
|
||||||
{
|
{
|
||||||
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||||
|
// ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, completed, escalated, viewed
|
||||||
uint8 index = 0;
|
uint8 index = 0;
|
||||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GM_TICKET);
|
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GM_TICKET);
|
||||||
stmt->setUInt32( index, _id);
|
stmt->setUInt32( index, _id);
|
||||||
|
|||||||
Reference in New Issue
Block a user