Auto-Learn Flight Nodes

Dear Trinity community,

I would like to make travelling easier for players without granting them access to every flight node in the game (or making them instant). So, I had the idea to create an auto-learn flight node system, an identical system existed in Cataclysm. Does anyone know how to do this?

For example, when a human reaches level fifteen (15) they would learn the Redridge Mountains flight node automatically.

You should take a look into the flight path learning function.

Flight paths are learned by opening gossip with a flight master. This means that some function is run when the player talks to the NPC and learns the point for him.

See where and what it does, then use it on level to grant points to players.

I made a small search and this is what I came up with…

mischandler->gossipselect->SendTaximenu->m_taximask->SetTaximaskNode

So you should probably try PlayerTaxi::SetTaximaskNode(nodeidx)

You can make a core edit by editing PlayerTaxi::InitTaxiNodesForLevel or you can just make a playerscript on level

nodeidx can be found from TaxiNodes.dbc or in C++ sTaxiNodesStore

You can access PlayerTaxi for a player with player->m_taxi

— Canned message start —

This thread is not related to the official Trinity codebase and was moved to the Custom Code section.

Please read the stickies next time.

— Canned message end —

void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level)
{
// class specific initial known nodes
switch (chrClass)
{
case CLASS_DEATH_KNIGHT:
{
for (uint8 i = 0; i < TaxiMaskSize; ++i)
m_taximask[i] |= sOldContinentsNodesMask[i];
break;
}
}

I found this; however, what would I do exactly to edit it? Would you have an example?

You need to add cases for each team / class / race / level etc what you want and use PlayerTaxi::SetTaximaskNode(nodeidx) like I said.

I also told that you can edit the function you just posted by using PlayerTaxi::SetTaximaskNode(nodeidx) and the nodeidx can be found from DBC for example.

You can see examples right below the code block you posted…

The difficult part or tidious part is to figure out how you determine what places to give to a player and when.

Can become quite a big script if you define each point separately and have cases for teams etc.

Ok, thanks, Rochet! /emoticons/default_smile.png