mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[12662] Basic implementaion of hotfixes
original author of this patch is Shauren
commit is based on 67e61b7e64
This commit is contained in:
parent
ea6eef5a13
commit
b4db2f63dd
15 changed files with 386 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue