mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Instances: Implemented DungeonEncounter.dbc for creating completed encounters mask to use in packets
Core/Dungeon Finder: Implemented new way of giving random dungeon rewards, linked to DungeonEncounter.dbc
This commit is contained in:
@@ -2425,11 +2425,12 @@ void InstanceMap::CreateInstanceData(bool load)
|
||||
if (load)
|
||||
{
|
||||
// TODO: make a global storage for this
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT data FROM instance WHERE map = '%u' AND id = '%u'", GetId(), i_InstanceId);
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT data, completedEncounters FROM instance WHERE map = '%u' AND id = '%u'", GetId(), i_InstanceId);
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
std::string data = fields[0].GetString();
|
||||
i_data->SetCompletedEncountersMask(fields[1].GetUInt32());
|
||||
if (data != "")
|
||||
{
|
||||
sLog->outDebug("Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId);
|
||||
|
||||
Reference in New Issue
Block a user