diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-01-31 14:02:59 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-01-31 14:02:59 +0100 |
commit | 1b676b1ccf2fc8c0aca9e0502164a7c68daf9b7c (patch) | |
tree | 5acb269e2f39f7749fb37287ef34c667457d0ad8 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 37b66384f3d905fb8de506aae48237900a1b6065 (diff) |
Core/Items: Some work on hotfixes and SMSG_DB_REPLY
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rwxr-xr-x | src/server/game/Globals/ObjectMgr.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 30e0efc15a2..9c0c5553b91 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -9034,6 +9034,41 @@ void ObjectMgr::LoadFactionChangeReputations() sLog->outString(); } +void ObjectMgr::LoadHotfixData() +{ + uint32 oldMSTime = getMSTime(); + + QueryResult result = WorldDatabase.Query("SELECT entry, type, unk FROM hotfix_data"); + + if (!result) + { + sLog->outString(">> Loaded 0 hotfix info entries. DB table `hotfix_data` is empty."); + sLog->outString(); + return; + } + + uint32 count = 0; + + _hotfixData.reserve(result->GetRowCount()); + + do + { + Field* fields = result->Fetch(); + + HotfixInfo info; + info.Entry = fields[0].GetUInt32(); + info.Type = fields[1].GetUInt32(); + info.Unk = fields[2].GetUInt32(); + + _hotfixData.push_back(info); + ++count; + } + while (result->NextRow()); + + sLog->outString(">> Loaded %u hotfix info entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); +} + GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry) { GameObjectTemplateContainer::const_iterator itr = GameObjectTemplateStore.find(entry); |