Jump to content

Blizzy

Members
  • Posts

    22
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

About Blizzy

  • Birthday 01/01/1

Blizzy's Achievements

Member

Member (2/3)

0

Reputation

  1. that's my point exactly why we should have PoiId in db i personaly tested all quest's by zones all tirysfal galades , blasted lands , hellfire peninsula , shadowmoon valey , borean tundra , befor i posted the patch here and why have the core do extra work on counting and incrementin when we all know he can some times f.... it up why not make use of the sniff structure and send what we know should be send to client
  2. you don't relay have to use it it's just for show on how it would look like whit not storing PoiId in db you should use first post as i always check for compatibility on first i did this patch fast i think i have some typos il check it tonight
  3. diff for no PoiId in db using lame method of counting/incrementing index from core witch in my opinion is hacky Sorry i took so long to post it , meh i was playing starcraft 2 and got all add ) Author: Blizzy <[email protected]> 2010-03-10 04:56:19 Committer: Blizzy <[email protected]> 2010-03-10 04:56:19 Parent: 6486fa3ad2ab23852ccca67f99e33faffd3de644 ([9559] Update AiReaction enum.) Branch: master Follows: v0.16-dev1 Precedes: Improved quest POI's code now with db support Quest Tracking Feature is full working ---------------------------- src/game/ObjectMgr.cpp ---------------------------- index 7fea7af..69f18c6 100644 @@ -6507,8 +6507,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 + QueryResult *result = WorldDatabase.Query("SELECT questId, objIndex, mapId, areaId, floorId, unk3, unk4 FROM quest_poi"); if(!result) { @@ -6531,14 +6531,14 @@ void ObjectMgr::LoadQuestPOI() 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 areaId = fields[3].GetUInt32(); + uint32 floorId = fields[4].GetUInt32(); uint32 unk3 = fields[5].GetUInt32(); uint32 unk4 = fields[6].GetUInt32(); - QuestPOI POI(objIndex, mapId, unk1, unk2, unk3, unk4); + QuestPOI POI(objIndex, mapId, areaId, floorId, 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 poiId='%i'", questId, poiId); if(points) { ----------------------------- src/game/ObjectMgr.h ----------------------------- index e565570..6431ce1 100644 @@ -262,14 +262,14 @@ struct QuestPOI { int32 ObjectiveIndex; uint32 MapId; - uint32 Unk1; - uint32 Unk2; + uint32 AreaId; + uint32 FloorId; uint32 Unk3; uint32 Unk4; std::vector<QuestPOIPoint> points; - QuestPOI() : ObjectiveIndex(0), MapId(0), Unk1(0), Unk2(0), Unk3(0), Unk4(0) {} - 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) {} + QuestPOI() : ObjectiveIndex(0), MapId(0), AreaId(0), FloorId(0), Unk3(0), Unk4(0) {} + QuestPOI(int32 objIndex, uint32 mapId, uint32 areaId, uint32 floorId, uint32 unk3, uint32 unk4) : ObjectiveIndex(objIndex), MapId(mapId), AreaId(areaId), FloorId(floorId), Unk3(unk3), Unk4(unk4) {} }; typedef std::vector<QuestPOI> QuestPOIVector; -------------------------- src/game/QueryHandler.cpp -------------------------- index 5e3f8c8..f6def70 100644 @@ -485,7 +485,7 @@ void WorldSession::HandleQueryQuestsCompleted( WorldPacket & /*recv_data */) SendPacket(&data); } -void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) +void WorldSession::HandleQuestPOIQuery( WorldPacket & recv_data ) { uint32 count; recv_data >> count; // quest count, max=25 @@ -524,12 +524,12 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) for(QuestPOIVector::const_iterator itr = POI->begin(); itr != POI->end(); ++itr) { data << uint32(index); // POI index - data << int32(itr->ObjectiveIndex); // objective index - data << uint32(itr->MapId); // mapid - data << uint32(itr->Unk1); // unknown - data << uint32(itr->Unk2); // unknown - data << uint32(itr->Unk3); // unknown - data << uint32(itr->Unk4); // unknown + data << int32(itr->ObjectiveIndex); // Objective index + data << uint32(itr->MapId); // Mapid + data << uint32(itr->AreaId); // WorldMapArea index + data << uint32(itr->FloorId); // Floor + data << uint32(itr->Unk3); // Unknown + data << uint32(itr->Unk4); // Unknown data << uint32(itr->points.size()); // POI points count for(std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2) @@ -553,7 +553,6 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) } } - data.hexlike(); SendPacket(&data); } And for db use the same only drop PoiId from quest_poi table.
  4. sincerely you can name them sh... 3 and 4 since i provided the corect data for all it's not that important now what data they represent... the problem i think is whit index deciding on eater autoincrement or using db i dont know sombodey just tell me what the best option is and i will adapt it but seams no dev want to point out what the problem is so later today i will make both ways patch and post it and see what's the reaction...
  5. updated first post whit a actual diff
  6. i don't know , XTZGZoReX has not been online today. Bump for a review please ? RU: я не знаю, XTZGZoReX не был онлайн сегодня
  7. Updated first post also fixed minor typo
  8. updated diff code for 9384 in first post rename unk2 to proper floorid
  9. im not sure but it seams that whey i will update later
  10. Update hope this takes care of it also i cleaned up and sticked to mangos code standard
  11. im sorry im just starting to learn C++ i dont understand what you are trying to say, do you mean why dont i send entry_POI in HandleQuestPOIQuery?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use