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:
Shauren
2011-02-03 22:20:40 +01:00
parent 7ea8bad07f
commit c2b0bcbd6c
33 changed files with 941 additions and 152 deletions

View File

@@ -259,10 +259,12 @@ bool CharacterDatabaseConnection::Open()
PREPARE_STATEMENT(CHAR_ADD_AURA, "INSERT INTO character_aura (guid,caster_guid,item_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges) "
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC)
// Instance saves
PREPARE_STATEMENT(CHAR_ADD_INSTANCE_SAVE, "INSERT INTO instance (id,map,resettime,difficulty,completedEncounters,data) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_UPDATE_INSTANCE_DATA, "UPDATE instance SET completedEncounters=?, data=? WHERE id=?", CONNECTION_ASYNC)
for (PreparedStatementMap::const_iterator itr = m_queries.begin(); itr != m_queries.end(); ++itr)
{
PrepareStatement(itr->first, itr->second.first, itr->second.second);
}
return true;
}

View File

@@ -218,6 +218,9 @@ enum CharacterDatabaseStatements
CHAR_DEL_AURA,
CHAR_ADD_AURA,
CHAR_ADD_INSTANCE_SAVE,
CHAR_UPDATE_INSTANCE_DATA,
MAX_CHARACTERDATABASE_STATEMENTS,
};