Core/DataStores: Updated sending out hotfixes

This commit is contained in:
Shauren
2017-04-19 19:10:49 +02:00
parent 15b1aaff41
commit 6636ca8585
19 changed files with 382 additions and 130 deletions

View File

@@ -393,37 +393,6 @@ void WorldSession::HandleQuestPOIQuery(WorldPackets::Query::QuestPOIQuery& quest
SendPacket(response.Write());
}
void WorldSession::HandleDBQueryBulk(WorldPackets::Query::DBQueryBulk& packet)
{
DB2StorageBase const* store = sDB2Manager.GetStorage(packet.TableHash);
if (!store)
{
TC_LOG_ERROR("network", "CMSG_DB_QUERY_BULK: %s requested unsupported unknown hotfix type: %u", GetPlayerInfo().c_str(), packet.TableHash);
return;
}
for (WorldPackets::Query::DBQueryBulk::DBQueryRecord const& rec : packet.Queries)
{
WorldPackets::Query::DBReply response;
response.TableHash = packet.TableHash;
response.RecordID = rec.RecordID;
if (store->HasRecord(rec.RecordID))
{
response.Allow = true;
response.Timestamp = sDB2Manager.GetHotfixDate(rec.RecordID, packet.TableHash);
store->WriteRecord(rec.RecordID, GetSessionDbcLocale(), response.Data);
}
else
{
TC_LOG_TRACE("network", "CMSG_DB_QUERY_BULK: %s requested non-existing entry %u in datastore: %u", GetPlayerInfo().c_str(), rec.RecordID, packet.TableHash);
response.Timestamp = time(NULL);
}
SendPacket(response.Write());
}
}
/**
* Handles the packet sent by the client when requesting information about item text.
*