[12662] Basic implementaion of hotfixes

original author of this patch is Shauren
commit is based on 67e61b7e64
This commit is contained in:
sanctum32 2013-08-06 09:05:19 +03:00 committed by Antz
parent ea6eef5a13
commit b4db2f63dd
15 changed files with 386 additions and 4 deletions

View file

@ -9961,3 +9961,38 @@ GameObjectDataPair const* FindGOData::GetResult() const
return i_anyData;
}
void ObjectMgr::LoadHotfixData()
{
uint32 count = 0;
m_hotfixData.clear();
QueryResult* result = WorldDatabase.Query("SELECT entry, type, UNIX_TIMESTAMP(hotfixDate) FROM hotfix_data");
if (!result)
{
BarGoLink bar(1);
bar.step();
sLog.outString(">> Loaded %u hotfix info entries. DB table `hotfix_data` is empty.", count);
return;
}
do
{
Field* fields = result->Fetch();
HotfixInfo info;
info.Entry = fields[0].GetUInt32();
info.Type = fields[1].GetUInt32();
info.Timestamp = fields[2].GetUInt32();
m_hotfixData.push_back(info);
++count;
}
while (result->NextRow());
delete result;
sLog.outString();
sLog.outString(">> Loaded %u hotfix info entries.", count);
}