mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/DataStores: Implemented sending hotfixes for db2 stores not loaded serverside (#22800)
This commit is contained in:
@@ -73,11 +73,16 @@ void WorldSession::HandleHotfixRequest(WorldPackets::Hotfix::HotfixRequest& hotf
|
||||
WorldPackets::Hotfix::HotfixResponse::HotfixData hotfixData;
|
||||
hotfixData.ID = hotfixId;
|
||||
hotfixData.RecordID = *hotfix;
|
||||
if (storage->HasRecord(hotfixData.RecordID))
|
||||
if (storage && storage->HasRecord(hotfixData.RecordID))
|
||||
{
|
||||
hotfixData.Data = boost::in_place();
|
||||
storage->WriteRecord(hotfixData.RecordID, GetSessionDbcLocale(), *hotfixData.Data);
|
||||
}
|
||||
else if (std::vector<uint8> const* blobData = sDB2Manager.GetHotfixBlobData(PAIR64_HIPART(hotfixId), *hotfix))
|
||||
{
|
||||
hotfixData.Data = boost::in_place();
|
||||
hotfixData.Data->append(blobData->data(), blobData->size());
|
||||
}
|
||||
|
||||
hotfixQueryResponse.Hotfixes.emplace_back(std::move(hotfixData));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user