[0028] Implented new phase/map/terrain swap system for cata.

This commit is contained in:
Fabian 2012-08-09 02:26:50 +02:00 committed by Antz
parent 3561a43fe1
commit 3b8fb556a7
20 changed files with 288 additions and 16 deletions

View file

@ -6650,6 +6650,50 @@ void ObjectMgr::LoadQuestPOI()
sLog.outString(">> Loaded %u quest POI definitions", count);
}
void ObjectMgr::LoadQuestPhaseMaps()
{
mQuestPhaseMap.clear(); // need for reload case
uint32 count = 0;
// 0 1
QueryResult *result = WorldDatabase.Query("SELECT questId, map, phase FROM quest_phase_maps");
if (!result)
{
BarGoLink bar(1);
bar.step();
sLog.outString();
sLog.outErrorDb(">> Loaded 0 quest phase maps definitions. DB table `quest_phase_maps` is empty.");
return;
}
BarGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 questId = fields[0].GetUInt32();
uint16 mapId = fields[1].GetUInt16();
uint32 phase = fields[2].GetUInt32();
QuestPhaseMaps QuestPhase(mapId, phase);
mQuestPhaseMap[questId].push_back(QuestPhase);
++count;
} while (result->NextRow());
delete result;
sLog.outString();
sLog.outString(">> Loaded %u quest phase maps definitions", count);
}
void ObjectMgr::LoadNPCSpellClickSpells()
{
uint32 count = 0;