mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
- Quest POI fix.
This commit is contained in:
parent
922544739b
commit
d76b728a99
4 changed files with 20 additions and 11 deletions
|
|
@ -4,6 +4,9 @@ CREATE TABLE `quest_poi` (
|
||||||
`objIndex` int(11) NOT NULL DEFAULT '0',
|
`objIndex` int(11) NOT NULL DEFAULT '0',
|
||||||
`mapId` int(11) unsigned NOT NULL DEFAULT '0',
|
`mapId` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`unk1` int(11) unsigned NOT NULL DEFAULT '0',
|
`unk1` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`unk2` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`unk3` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`unk4` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`questid`,`objIndex`)
|
PRIMARY KEY (`questid`,`objIndex`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
@ -17,9 +20,9 @@ CREATE TABLE `quest_poi_points` (
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- Sample data for quest 456
|
-- Sample data for quest 456
|
||||||
INSERT INTO quest_poi VALUES (456, 0, 1, 0);
|
INSERT INTO quest_poi VALUES (456, 0, 1, 0, 0, 0, 0);
|
||||||
INSERT INTO quest_poi VALUES (456, 1, 1, 0);
|
INSERT INTO quest_poi VALUES (456, 1, 1, 0, 0, 0, 0);
|
||||||
INSERT INTO quest_poi VALUES (456, -1, 1, 0);
|
INSERT INTO quest_poi VALUES (456, -1, 1, 0, 0, 0, 0);
|
||||||
|
|
||||||
INSERT INTO quest_poi_points VALUES (456, 0, 0x28CF, 0x0217);
|
INSERT INTO quest_poi_points VALUES (456, 0, 0x28CF, 0x0217);
|
||||||
INSERT INTO quest_poi_points VALUES (456, 0, 0x29F4, 0x02AA);
|
INSERT INTO quest_poi_points VALUES (456, 0, 0x29F4, 0x02AA);
|
||||||
|
|
|
||||||
|
|
@ -6357,8 +6357,8 @@ void ObjectMgr::LoadQuestPOI()
|
||||||
{
|
{
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
|
|
||||||
// 0 1 2 3
|
// 0 1 2 3 4 5 6
|
||||||
QueryResult *result = WorldDatabase.Query("SELECT questId, objIndex, mapId, unk1 FROM quest_poi");
|
QueryResult *result = WorldDatabase.Query("SELECT questId, objIndex, mapId, unk1, unk2, unk3, unk4 FROM quest_poi");
|
||||||
|
|
||||||
if(!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
|
|
@ -6382,8 +6382,11 @@ void ObjectMgr::LoadQuestPOI()
|
||||||
int32 objIndex = fields[1].GetInt32();
|
int32 objIndex = fields[1].GetInt32();
|
||||||
uint32 mapId = fields[2].GetUInt32();
|
uint32 mapId = fields[2].GetUInt32();
|
||||||
uint32 unk1 = fields[3].GetUInt32();
|
uint32 unk1 = fields[3].GetUInt32();
|
||||||
|
uint32 unk2 = fields[4].GetUInt32();
|
||||||
|
uint32 unk3 = fields[5].GetUInt32();
|
||||||
|
uint32 unk4 = fields[6].GetUInt32();
|
||||||
|
|
||||||
QuestPOI POI(objIndex, mapId, unk1);
|
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);
|
QueryResult *points = WorldDatabase.PQuery("SELECT x, y FROM quest_poi_points WHERE questId='%u' AND objIndex='%i'", questId, objIndex);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,10 +230,13 @@ struct QuestPOI
|
||||||
int32 ObjectiveIndex;
|
int32 ObjectiveIndex;
|
||||||
uint32 MapId;
|
uint32 MapId;
|
||||||
uint32 Unk1;
|
uint32 Unk1;
|
||||||
|
uint32 Unk2;
|
||||||
|
uint32 Unk3;
|
||||||
|
uint32 Unk4;
|
||||||
std::vector<QuestPOIPoint> points;
|
std::vector<QuestPOIPoint> points;
|
||||||
|
|
||||||
QuestPOI() : ObjectiveIndex(0), MapId(0), Unk1(0) {}
|
QuestPOI() : ObjectiveIndex(0), MapId(0), Unk1(0), Unk2(0), Unk3(0), Unk4(0) {}
|
||||||
QuestPOI(int32 objIndex, uint32 mapId, uint32 unk1) : ObjectiveIndex(objIndex), MapId(mapId), Unk1(unk1) {}
|
QuestPOI(int32 objIndex, uint32 mapId, uint32 unk1, uint32 unk2, uint32 unk3, uint32 unk4) : ObjectiveIndex(objIndex), MapId(mapId), Unk1(unk1), Unk2(unk2), Unk3(unk3), Unk4(unk4) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<QuestPOI> QuestPOIVector;
|
typedef std::vector<QuestPOI> QuestPOIVector;
|
||||||
|
|
|
||||||
|
|
@ -527,9 +527,9 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||||
data << int32(itr->ObjectiveIndex); // objective index
|
data << int32(itr->ObjectiveIndex); // objective index
|
||||||
data << uint32(itr->MapId); // mapid
|
data << uint32(itr->MapId); // mapid
|
||||||
data << uint32(itr->Unk1); // unknown
|
data << uint32(itr->Unk1); // unknown
|
||||||
data << uint32(0);
|
data << uint32(itr->Unk2); // unknown
|
||||||
data << uint32(0);
|
data << uint32(itr->Unk3); // unknown
|
||||||
data << uint32(0);
|
data << uint32(itr->Unk4); // unknown
|
||||||
data << uint32(itr->points.size()); // POI points count
|
data << uint32(itr->points.size()); // POI points count
|
||||||
|
|
||||||
for(std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2)
|
for(std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue