SQL: Characters db storage type cleanup No. 5
This commit is contained in:
@@ -298,7 +298,7 @@ void GameEventMgr::LoadFromDB()
|
||||
if (mGameEvent[event_id].state != GAMEEVENT_NORMAL && mGameEvent[event_id].state != GAMEEVENT_INTERNAL)
|
||||
{
|
||||
mGameEvent[event_id].state = (GameEventState)(fields[1].GetUInt8());
|
||||
mGameEvent[event_id].nextstart = time_t(fields[2].GetUInt64());
|
||||
mGameEvent[event_id].nextstart = time_t(fields[2].GetUInt32());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2002,7 +2002,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
uint32 loguid = fields[0].GetUInt32();
|
||||
uint64 respawn_time = fields[1].GetUInt64();
|
||||
uint32 respawn_time = fields[1].GetUInt32();
|
||||
uint32 instance = fields[2].GetUInt32();
|
||||
|
||||
mGORespawnTimes[MAKE_PAIR64(loguid,instance)] = time_t(respawn_time);
|
||||
|
||||
@@ -718,11 +718,11 @@ inline void Guild::Member::ResetMoneyTime()
|
||||
// EmblemInfo
|
||||
void EmblemInfo::LoadFromDB(Field* fields)
|
||||
{
|
||||
m_style = fields[3].GetUInt32();
|
||||
m_color = fields[4].GetUInt32();
|
||||
m_borderStyle = fields[5].GetUInt32();
|
||||
m_borderColor = fields[6].GetUInt32();
|
||||
m_backgroundColor = fields[7].GetUInt32();
|
||||
m_style = fields[3].GetUInt8();
|
||||
m_color = fields[4].GetUInt8();
|
||||
m_borderStyle = fields[5].GetUInt8();
|
||||
m_borderColor = fields[6].GetUInt8();
|
||||
m_backgroundColor = fields[7].GetUInt8();
|
||||
}
|
||||
|
||||
void EmblemInfo::WritePacket(WorldPacket& data) const
|
||||
@@ -1126,7 +1126,7 @@ bool Guild::Create(Player* pLeader, const std::string& name)
|
||||
stmt->setUInt32(++index, GUID_LOPART(m_leaderGuid));
|
||||
stmt->setString(++index, m_info);
|
||||
stmt->setString(++index, m_motd);
|
||||
stmt->setUInt64(++index, uint64(m_createdDate));
|
||||
stmt->setUInt64(++index, uint32(m_createdDate));
|
||||
stmt->setUInt32(++index, m_emblemInfo.GetStyle());
|
||||
stmt->setUInt32(++index, m_emblemInfo.GetColor());
|
||||
stmt->setUInt32(++index, m_emblemInfo.GetBorderStyle());
|
||||
@@ -1840,7 +1840,7 @@ bool Guild::LoadFromDB(Field* fields)
|
||||
m_emblemInfo.LoadFromDB(fields);
|
||||
m_info = fields[8].GetString();
|
||||
m_motd = fields[9].GetString();
|
||||
m_createdDate = fields[10].GetUInt64();
|
||||
m_createdDate = time_t(fields[10].GetUInt32());
|
||||
m_bankMoney = fields[11].GetUInt64();
|
||||
|
||||
uint8 purchasedTabs = uint8(fields[12].GetUInt32());
|
||||
@@ -1932,7 +1932,7 @@ bool Guild::LoadBankEventLogFromDB(Field* fields)
|
||||
pLog->LoadEvent(new BankEventLogEntry(
|
||||
m_id, // guild id
|
||||
guid, // guid
|
||||
fields[8].GetUInt64(), // timestamp
|
||||
time_t(fields[8].GetUInt32()), // timestamp
|
||||
dbTabId, // tab id
|
||||
eventType, // event type
|
||||
fields[4].GetUInt32(), // player guid
|
||||
|
||||
@@ -233,7 +233,7 @@ void WorldSession::HandleGMSurveySubmit(WorldPacket& recv_data)
|
||||
|
||||
ss << "INSERT INTO gm_surveys (player, surveyid, mainSurvey, overall_comment, timestamp) VALUES (";
|
||||
ss << GetPlayer()->GetGUID() << ", ";
|
||||
ss << nextSurveyID << ", ";
|
||||
ss << uint32(nextSurveyID) << ", ";
|
||||
ss << mainSurvey << ", ";
|
||||
|
||||
// sub_survey1, r1, comment1, sub_survey2, r2, comment2, sub_survey3, r3, comment3, sub_survey4, r4, comment4, sub_survey5, r5, comment5, sub_survey6, r6, comment6, sub_survey7, r7, comment7, sub_survey8, r8, comment8, sub_survey9, r9, comment9, sub_survey10, r10, comment10,
|
||||
@@ -252,9 +252,9 @@ void WorldSession::HandleGMSurveySubmit(WorldPacket& recv_data)
|
||||
recv_data >> rank;
|
||||
recv_data >> comment;
|
||||
|
||||
os << nextSurveyID << " ";
|
||||
os << uint32(nextSurveyID) << " ";
|
||||
os << subSurveyId << ", ";
|
||||
os << rank << ", '";
|
||||
os << uint16(rank) << ", '";
|
||||
CharacterDatabase.escape_string(comment);
|
||||
os << comment << "');";
|
||||
CharacterDatabase.PExecute(os.str().c_str());
|
||||
|
||||
@@ -66,17 +66,17 @@ void TicketMgr::LoadGMTickets()
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
GM_Ticket *ticket = new GM_Ticket;
|
||||
ticket->guid = fields[0].GetUInt64();
|
||||
ticket->playerGuid = fields[1].GetUInt64();
|
||||
ticket->guid = fields[0].GetUInt32();
|
||||
ticket->playerGuid = fields[1].GetUInt32();
|
||||
ticket->name = fields[2].GetString();
|
||||
ticket->message = fields[3].GetString();
|
||||
ticket->createtime = fields[4].GetUInt64();
|
||||
ticket->createtime = fields[4].GetUInt32();
|
||||
ticket->map = fields[5].GetUInt32();
|
||||
ticket->pos_x = fields[6].GetFloat();
|
||||
ticket->pos_y = fields[7].GetFloat();
|
||||
ticket->pos_z = fields[8].GetFloat();
|
||||
ticket->timestamp = fields[9].GetUInt64();
|
||||
ticket->closed = fields[10].GetUInt64();
|
||||
ticket->timestamp = fields[9].GetUInt32();
|
||||
ticket->closed = fields[10].GetInt32();
|
||||
if (ticket->closed == 0)
|
||||
m_openTickets++;
|
||||
|
||||
@@ -111,7 +111,7 @@ void TicketMgr::LoadGMSurveys()
|
||||
if (result)
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
m_GMSurveyID = fields[0].GetUInt64();
|
||||
m_GMSurveyID = fields[0].GetUInt32();
|
||||
}
|
||||
else
|
||||
m_GMSurveyID = 0;
|
||||
|
||||
Reference in New Issue
Block a user