Skip to content

Commit

Permalink
-Nodegen: Added manually defined helper nodes for trouble spots such …
Browse files Browse the repository at this point in the history
…as underwater entrances and jumps.
  • Loading branch information
mostlikely4r committed Nov 1, 2024
1 parent 36ee56d commit e89d955
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions playerbot/TravelNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,40 @@ void TravelNodeMap::generateZoneMeanNodes()
}
}

void TravelNodeMap::addManualNodes()
{
TravelNode* node;
node = sTravelNodeMap.addNode(WorldPosition(0, -10416.45f, -3832.53f, -36.92f), "c1-Sunken temple", true, false);
node = sTravelNodeMap.addNode(WorldPosition(0, -10408.70f, -3834.29f, -44.69f), "c2-Sunken temple", true, false);
node = sTravelNodeMap.addNode(WorldPosition(0, -10325.23f, -3865.86f, -44.45f), "c3-Sunken temple", true, false);
//otherNode = sTravelNodeMap.addNode(WorldPosition(0, -10319.19f, -3868.16f, -40.90f), "c4-Sunken temple", true, false);

node = sTravelNodeMap.addNode(WorldPosition(0, -11367.45f, 1617.10f, 71.22f), "c1-Deadmine exit", true, false);
node = sTravelNodeMap.addNode(WorldPosition(0, -11367.12f, 1610.48f, 76.63f), "c2-Deadmine exit", true, false);
node = sTravelNodeMap.addNode(WorldPosition(0, -11381.49f, 1584.11f, 82.10f), "c3-Deadmine exit", true, false);
node = sTravelNodeMap.addNode(WorldPosition(0, -11379.64f, 1578.79f, 87.84f), "c4-Deadmine exit", true, false);
node = sTravelNodeMap.addNode(WorldPosition(0, -11340.23f, 1571.61f, 94.44f), "c5-Deadmine exit", true, false);

node = sTravelNodeMap.addNode(WorldPosition(1, -3034.70f, 144.04f, 70.87f), "c-Tauren start", true, false);
node = sTravelNodeMap.addNode(WorldPosition(1, -1424.04f, 2945.01f, 134.54f), "c-Maraudon", true, false);

node = sTravelNodeMap.addNode(WorldPosition(1, 4158.01f, 877.60f, -20.68f), "c1-Blackfathom deep", true, false);
node = sTravelNodeMap.addNode(WorldPosition(1, 4156.60f, 909.89f, -20.97f), "c2-Blackfathom deep", true, false);
node = sTravelNodeMap.addNode(WorldPosition(1, 4157.46f, 916.44f, -17.40f), "c3-Blackfathom deep", true, false);

node = sTravelNodeMap.addNode(WorldPosition(1, -3626.39f, 917.37f, 150.13f), "c1-Dire maul", true, false);
node = sTravelNodeMap.addNode(WorldPosition(1, -3628.08f, 919.55f, 137.84f), "c2-Dire maul", true, false);

//node = sTravelNodeMap.addNode(WorldPosition(1, 0, 0, 0), "c-Blackfathom deep", true, true);
node = sTravelNodeMap.addNode(WorldPosition(530, 571.10f, 6938.97f, -16.81f), "c1-Coilfang", true, false);
node = sTravelNodeMap.addNode(WorldPosition(530, 571.10f, 6938.97f, -15.20f), "c2-Coilfang", true, false);
node = sTravelNodeMap.addNode(WorldPosition(530, 651.07f, 6865.37f, -82.34f), "c3-Coilfang", true, false);
node = sTravelNodeMap.addNode(WorldPosition(530, 607.17f, 6908.68f, -49.20f), "c4-Coilfang", true, false);
node = sTravelNodeMap.addNode(WorldPosition(530, 574.68f, 6942.93f, -37.72f), "c5-Coilfang", true, false);
node = sTravelNodeMap.addNode(WorldPosition(530, 723.74f, 6865.78f, -74.10f), "c6-Coilfang", true, false);
node = sTravelNodeMap.addNode(WorldPosition(530, 731.57f, 6866.01f, -70.47f), "c7-Coilfang", true, false);
}

void TravelNodeMap::generateNodes()
{
sLog.outString("-Generating Start nodes");
Expand All @@ -2398,6 +2432,8 @@ void TravelNodeMap::generateNodes()
generateZoneMeanNodes();
sLog.outString("-Generating static portal nodes");
generatePortalNodes();
sLog.outString("-Adding manually defined nodes");
addManualNodes();
}

void TravelNodeMap::generateWalkPathMap(uint32 mapId, BarGoLink* bar)
Expand Down
1 change: 1 addition & 0 deletions playerbot/TravelNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ namespace ai
void generateTransportNodes(); //Create node at transport (boats/zepelins/elevators) and also create the path they move.
void generateZoneMeanNodes(); //Create node at zone mean (the avg location of all objects and creatures of a certain area/zone)
void generatePortalNodes(); //Create node at static portal (ie. dalaran->ironforge) and the desination of teleport spell (ie. teleport to ironforge)
void addManualNodes(); //Nodes manually placed to reach places that can not be pathed automatically.
void generateNodes(); //Call all above methods.

void generateWalkPathMap(uint32 mapId, BarGoLink* bar); //Pathfind from all nodes to all nodes in a specific map. Create a path for all attemps and a link for all paths that actually reach the end node.
Expand Down

0 comments on commit e89d955

Please sign in to comment.