aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/HotfixHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-06-03 20:40:34 +0200
committerShauren <shauren.trinity@gmail.com>2019-06-08 17:06:57 +0200
commit455959c6064af6f7863a6b4b57cb0ef1646bd8ef (patch)
tree7d7a7cdd3a44643ee5fc7d19521ced1c8b815c66 /src/server/game/Handlers/HotfixHandler.cpp
parent31fda79556e55375962a3c9e46f6dbdbf6e90d18 (diff)
Core/PacketIO: Rewrite updatefield handling
Diffstat (limited to 'src/server/game/Handlers/HotfixHandler.cpp')
-rw-r--r--src/server/game/Handlers/HotfixHandler.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Handlers/HotfixHandler.cpp b/src/server/game/Handlers/HotfixHandler.cpp
index b58b7bedbe1..eee0380e4d6 100644
--- a/src/server/game/Handlers/HotfixHandler.cpp
+++ b/src/server/game/Handlers/HotfixHandler.cpp
@@ -70,17 +70,19 @@ void WorldSession::HandleHotfixRequest(WorldPackets::Hotfix::HotfixRequest& hotf
{
for (auto const& tableRecord : *hotfixedRecords)
{
- DB2StorageBase const* storage = sDB2Manager.GetStorage(hotfixRecord.TableHash);
+ uint32 hotfixTableHash = tableRecord.first;
+ int32 hotfixRecordId = tableRecord.second;;
+ DB2StorageBase const* storage = sDB2Manager.GetStorage(hotfixTableHash);
WorldPackets::Hotfix::HotfixResponse::HotfixData hotfixData;
hotfixData.Record = hotfixRecord;
- if (storage && storage->HasRecord(hotfixData.Record.RecordID))
+ if (storage && storage->HasRecord(hotfixRecordId))
{
std::size_t pos = hotfixQueryResponse.HotfixContent.size();
- storage->WriteRecord(hotfixData.Record.RecordID, GetSessionDbcLocale(), hotfixQueryResponse.HotfixContent);
+ storage->WriteRecord(hotfixRecordId, GetSessionDbcLocale(), hotfixQueryResponse.HotfixContent);
hotfixData.Size = hotfixQueryResponse.HotfixContent.size() - pos;
}
- else if (std::vector<uint8> const* blobData = sDB2Manager.GetHotfixBlobData(hotfixData.Record.TableHash, hotfixData.Record.RecordID))
+ else if (std::vector<uint8> const* blobData = sDB2Manager.GetHotfixBlobData(hotfixTableHash, hotfixRecordId))
{
hotfixData.Size = blobData->size();
hotfixQueryResponse.HotfixContent.append(blobData->data(), blobData->size());