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:
leak
2011-01-20 02:11:49 +01:00
parent c59ea4726e
commit f7af49291b
16 changed files with 108 additions and 50 deletions
+2 -2
View File
@@ -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;
}
}
+2 -2
View File
@@ -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();