SQL: Characters db storage type cleanup No. 7 (final) - Note:
- It is _strongly_ recommended to extensively test the recent changes before applying them to live data - To fully resync the character db layout with TC releases it is recommended to dump the characters table with mysqldump --no-data characters > characters_database_livedata.sql and use a diff tool to compare it against sql/base/characters_database.sql
This commit is contained in:
@@ -1108,7 +1108,7 @@ void Pet::_LoadSpellCooldowns()
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
uint32 spell_id = fields[0].GetUInt32();
|
||||
time_t db_time = (time_t)fields[1].GetUInt64();
|
||||
time_t db_time = time_t(fields[1].GetUInt32());
|
||||
|
||||
if (!sSpellStore.LookupEntry(spell_id))
|
||||
{
|
||||
@@ -1147,7 +1147,7 @@ void Pet::_SaveSpellCooldowns(SQLTransaction& trans)
|
||||
m_CreatureSpellCooldowns.erase(itr++);
|
||||
else
|
||||
{
|
||||
trans->PAppend("INSERT INTO pet_spell_cooldown (guid,spell,time) VALUES ('%u', '%u', '" UI64FMTD "')", m_charmInfo->GetPetNumber(), itr->first, uint64(itr->second));
|
||||
trans->PAppend("INSERT INTO pet_spell_cooldown (guid,spell,time) VALUES ('%u', '%u', '%u')", m_charmInfo->GetPetNumber(), itr->first, uint32(itr->second));
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17272,8 +17272,8 @@ void Player::_LoadMail()
|
||||
m->subject = fields[4].GetString();
|
||||
m->body = fields[5].GetString();
|
||||
bool has_items = fields[6].GetBool();
|
||||
m->expire_time = (time_t)fields[7].GetUInt64();
|
||||
m->deliver_time = (time_t)fields[8].GetUInt64();
|
||||
m->expire_time = time_t(fields[7].GetUInt32());
|
||||
m->deliver_time = time_t(fields[8].GetUInt32());
|
||||
m->money = fields[9].GetUInt32();
|
||||
m->COD = fields[10].GetUInt32();
|
||||
m->checked = fields[11].GetUInt32();
|
||||
|
||||
@@ -5701,7 +5701,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
|
||||
m->sender = fields[2].GetUInt32();
|
||||
m->receiver = fields[3].GetUInt32();
|
||||
bool has_items = fields[4].GetBool();
|
||||
m->expire_time = (time_t)fields[5].GetUInt64();
|
||||
m->expire_time = time_t(fields[5].GetUInt32());
|
||||
m->deliver_time = 0;
|
||||
m->COD = fields[6].GetUInt32();
|
||||
m->checked = fields[7].GetUInt32();
|
||||
|
||||
@@ -260,7 +260,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
Field *fields = result->Fetch();
|
||||
uint32 type = fields[0].GetUInt32();
|
||||
uint32 type = fields[0].GetUInt8();
|
||||
|
||||
// if guild petition and has guild => error, return;
|
||||
if (type == GUILD_CHARTER_TYPE && _player->GetGuildId())
|
||||
@@ -394,7 +394,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
type = fields[0].GetUInt32();
|
||||
type = fields[0].GetUInt8();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -614,7 +614,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
|
||||
Field *fields = result->Fetch();
|
||||
type = fields[0].GetUInt32();
|
||||
type = fields[0].GetUInt8();
|
||||
|
||||
sLog->outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
|
||||
|
||||
@@ -716,7 +716,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
Field *fields = result->Fetch();
|
||||
ownerguidlo = fields[0].GetUInt32();
|
||||
name = fields[1].GetString();
|
||||
type = fields[2].GetUInt32();
|
||||
type = fields[2].GetUInt8();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2772,7 +2772,7 @@ void World::LoadWorldStates()
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
m_worldstates[fields[0].GetUInt32()] = fields[1].GetUInt64();
|
||||
m_worldstates[fields[0].GetUInt32()] = fields[1].GetUInt32();
|
||||
++count;
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
Reference in New Issue
Block a user