diff options
Diffstat (limited to 'src/server/game/Handlers/HotfixHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/HotfixHandler.cpp | 10 |
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()); |