Jump to content

Blizzy

Members
  • Posts

    22
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Blizzy

  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?
  12. Cleanup and updated for rev 9339 first post , i will add new link to a more readable dump data on udb forum same post
  13. i thought it was clear i posted it on udb's forum HERE
  14. yeah pretty much , hes working whit wowbeez for some time now so is walla
  15. Cleanup and updated first post also compile whit 9309 ========== Build: 13 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== all tested ok just need review and hoping to be accepted
  16. feel free to post a clean up i dont minde
  17. What bug does the patch fix? What features does the patch add? implements 3.3 Quest Tracking Feature full working For which repository revision was the patch created? 9384 Who has been writing this patch? Please include either forum user names or email addresses. I ported it to mangos and removed hex witch is not cool iff you ask me took actual data and guidiance from my friend zack(tudi) I will provide full db (Pkt logged) data over at udb forums , or here iff i get get permision from one of the team members or mods Udb link : here Author: Blizzy <[email protected]> 2010-03-02 05:48:04 Committer: Blizzy <[email protected]> 2010-03-02 05:48:04 Parent: 6f01ad7465e5005472d5ea59f04d8b9b2a9049f9 ([9499] Add replacement spells for GO type 10 that may have dummy spellId in _template) Child: 0000000000000000000000000000000000000000 (Local uncommitted changes, not checked in to index) 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 b1540da..aae9230 100644 @@ -6482,8 +6482,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, areaId, floorId, unk3, unk4 FROM quest_poi"); if(!result) { @@ -6504,16 +6504,17 @@ void ObjectMgr::LoadQuestPOI() 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 poiId = fields[1].GetUInt32(); + int32 objIndex = fields[2].GetInt32(); + uint32 mapId = fields[3].GetUInt32(); + uint32 areaId = 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); + QuestPOI POI(poiId, 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 4442f56..a1a47ae 100644 @@ -260,16 +260,17 @@ struct QuestPOIPoint struct QuestPOI { + uint32 PoiId; 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() : PoiId(0), ObjectiveIndex(0), MapId(0), AreaId(0), FloorId(0), Unk3(0), Unk4(0) {} + QuestPOI(uint32 poiId, int32 objIndex, uint32 mapId, uint32 areaId, uint32 floorId, uint32 unk3, uint32 unk4) : PoiId(poiId), ObjectiveIndex(objIndex), MapId(mapId), AreaId(areaId), FloorId(floorId), Unk3(unk3), Unk4(unk4) {} }; typedef std::vector<QuestPOI> QuestPOIVector; -------------------------- src/game/QueryHandler.cpp -------------------------- index 41d934a..bcdc955 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 @@ -520,16 +520,15 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) data << uint32(questId); // quest ID data << uint32(POI->size()); // POI count - int index = 0; 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 << uint32(itr->PoiId); // POI index + data << int32(itr->ObjectiveIndex); // Objective index + data << uint32(itr->MapId); // Mapid + data << uint32(itr->AreaId); // WorldMapArea index + data << uint32(itr->FloorId); // Floorid + 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) @@ -537,7 +536,6 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) data << int32(itr2->x); // POI point x data << int32(itr2->y); // POI point y } - ++index; } } else @@ -553,7 +551,6 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) } } - data.hexlike(); SendPacket(&data); } -- -- Table structure for table `quest_poi` -- DROP TABLE IF EXISTS `quest_poi`; CREATE TABLE IF NOT EXISTS `quest_poi` ( `questId` int(11) UNSIGNED NOT NULL DEFAULT '0', `poiId` int(11) UNSIGNED NOT NULL DEFAULT '0', `objIndex` int(11) NOT NULL DEFAULT '0', `mapId` int(11) UNSIGNED NOT NULL DEFAULT '0', `areaId` int(11) UNSIGNED NOT NULL DEFAULT '0', `floorId` int(11) UNSIGNED NOT NULL DEFAULT '0', `unk3` int(11) UNSIGNED NOT NULL DEFAULT '0', `unk4` int(11) UNSIGNED NOT NULL DEFAULT '0', KEY `questId` (`poiId`,`questId`), KEY `poiId` (`poiId`,`questId`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Table structure for table `quest_poi_points` -- DROP TABLE IF EXISTS `quest_poi_points`; CREATE TABLE IF NOT EXISTS `quest_poi_points` ( `questId` int(11) UNSIGNED NOT NULL DEFAULT '0', `poiId` int(11) UNSIGNED NOT NULL DEFAULT '0', `x` int(11) NOT NULL DEFAULT '0', `y` int(11) NOT NULL DEFAULT '0', KEY `questId` (`poiId`,`questId`), KEY `poiId` (`poiId`,`questId`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Update for existing tables -- ALTER TABLE `quest_poi` CHANGE `questid` `questId` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' ; ALTER TABLE `quest_poi` ADD `poiId` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `questId` ; ALTER TABLE `quest_poi` CHANGE `unk1` `areaId` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' ; ALTER TABLE `quest_poi` CHANGE `unk2` `florId` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' ; ALTER TABLE `quest_poi_points` CHANGE `objIndex` `poiId` INT( 11 ) NOT NULL DEFAULT '0' ; ALTER TABLE `quest_poi` DROP PRIMARY KEY , ADD INDEX `questId` ( `poiId` , `questId` ), ADD INDEX `poiId` ( `poiId` , `questId` ); ALTER TABLE `quest_poi_points` DROP INDEX `idx`, ADD INDEX `questId` ( `poiId` , `questId` ), ADD INDEX `poiId` ( `poiId` , `questId` );
×
×
  • 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