mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge remote branch 'origin/master' into 330
This commit is contained in:
commit
d131f137cc
44 changed files with 670 additions and 498 deletions
|
|
@ -6450,8 +6450,8 @@ void ObjectMgr::LoadQuestPOI()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 3 4 5 6
|
||||
QueryResult *result = WorldDatabase.Query("SELECT questId, objIndex, mapId, unk1, unk2, unk3, unk4 FROM quest_poi");
|
||||
// 0 1 2 3 4 5 6 7
|
||||
QueryResult *result = WorldDatabase.Query("SELECT questId, poiId, objIndex, mapId, mapAreaId, floorId, unk3, unk4 FROM quest_poi");
|
||||
|
||||
if(!result)
|
||||
{
|
||||
|
|
@ -6471,31 +6471,16 @@ void ObjectMgr::LoadQuestPOI()
|
|||
Field *fields = result->Fetch();
|
||||
bar.step();
|
||||
|
||||
uint32 questId = fields[0].GetUInt32();
|
||||
int32 objIndex = fields[1].GetInt32();
|
||||
uint32 mapId = fields[2].GetUInt32();
|
||||
uint32 unk1 = fields[3].GetUInt32();
|
||||
uint32 unk2 = fields[4].GetUInt32();
|
||||
uint32 unk3 = fields[5].GetUInt32();
|
||||
uint32 unk4 = fields[6].GetUInt32();
|
||||
uint32 questId = fields[0].GetUInt32();
|
||||
uint32 poiId = fields[1].GetUInt32();
|
||||
int32 objIndex = fields[2].GetInt32();
|
||||
uint32 mapId = fields[3].GetUInt32();
|
||||
uint32 mapAreaId = fields[4].GetUInt32();
|
||||
uint32 floorId = fields[5].GetUInt32();
|
||||
uint32 unk3 = fields[6].GetUInt32();
|
||||
uint32 unk4 = fields[7].GetUInt32();
|
||||
|
||||
QuestPOI POI(objIndex, mapId, unk1, unk2, unk3, unk4);
|
||||
|
||||
QueryResult *points = WorldDatabase.PQuery("SELECT x, y FROM quest_poi_points WHERE questId='%u' AND objIndex='%i'", questId, objIndex);
|
||||
|
||||
if(points)
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *pointFields = points->Fetch();
|
||||
int32 x = pointFields[0].GetInt32();
|
||||
int32 y = pointFields[1].GetInt32();
|
||||
QuestPOIPoint point(x, y);
|
||||
POI.points.push_back(point);
|
||||
} while (points->NextRow());
|
||||
|
||||
delete points;
|
||||
}
|
||||
QuestPOI POI(poiId, objIndex, mapId, mapAreaId, floorId, unk3, unk4);
|
||||
|
||||
mQuestPOIMap[questId].push_back(POI);
|
||||
|
||||
|
|
@ -6504,6 +6489,35 @@ void ObjectMgr::LoadQuestPOI()
|
|||
|
||||
delete result;
|
||||
|
||||
QueryResult *points = WorldDatabase.Query("SELECT questId, poiId, x, y FROM quest_poi_points");
|
||||
|
||||
if (points)
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *pointFields = points->Fetch();
|
||||
|
||||
uint32 questId = pointFields[0].GetUInt32();
|
||||
uint32 poiId = pointFields[1].GetUInt32();
|
||||
int32 x = pointFields[2].GetInt32();
|
||||
int32 y = pointFields[3].GetInt32();
|
||||
|
||||
QuestPOIVector& vect = mQuestPOIMap[questId];
|
||||
|
||||
for(QuestPOIVector::iterator itr = vect.begin(); itr != vect.end(); ++itr)
|
||||
{
|
||||
if (itr->PoiId != poiId)
|
||||
continue;
|
||||
|
||||
QuestPOIPoint point(x, y);
|
||||
itr->points.push_back(point);
|
||||
break;
|
||||
}
|
||||
} while (points->NextRow());
|
||||
|
||||
delete points;
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u quest POI definitions", count);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue