I would like to make a custom flightmaster with a custom taxipath.
However I stuck a little bit. In Arcemu it was easy to do with a Lua script ^^
So my questions:
Can it be done with a custom coordinates or is the core using DBC coords only ?
Can it be done with smart scripts ?
May somebody can point me to a c++ example ?
Thank you very much.
Core is using DBC only.
With some modifications you can ofcourse make it possible for it to use non DBC data or you could edit the data loaded from DBC afterwards
It can be done with anything you implement it to afterwards /emoticons/default_tongue.png
It should be noted that flight paths should be rather static as the path the player is on is saved and when he logs in, he will continue the same path he was on.
The flight master menu can not be used with custom flight points (no custom flight masters like that) and you must use something else like gossip options to start the path. Otherwise it requires client modification.
Preferred way would ofcourse be to edit the data itself and not tamper afterwards : |
Still want it in C++ : |?
I remember one c++ script for trinity doing this, but it’s extremely outdated.
Do you happen to remember the method it used to add paths?Did it for example edit the DBC data loaded or did it alter the flight point system or …?
The way we have it atm is like spell dbc, so DBC data is loaded into a map so its easier to edit etc.
Core is using DBC only.
I was afraid about this answer but looking into the code I already thought about that.
I want to prevent client modifications.
If it would be possible to edit the dbc files on server side only, this may be worthy to give a try. However never done such things ^^
The path would be static. Just a small flight over a hill. And I wanted to use a custom NPC with gossip to start this flight.
Now i’m confused where to start. Also editing DBC files is not trivial for me.
Shame the patch link is dead
As editing DBC is not really supported here … uh … right…
And no, you dont need a client modification for things to work on the server side.
The below code should work out of the box I think if you create a function like this:
or similar to edit the loaded DBC or something.
static uint32 nodeId;
static void StartTaxi(Player* player, uint32 pathid);
static uint32 AddPath(std::list<TaxiPathNodeEntry> nodes, uint32 mountA, uint32 mountH, uint32 price = 0, uint32 pathId = 0);
[CODE]uint32 LuaTaxiMgr::nodeId = 500;
void LuaTaxiMgr::StartTaxi(Player* player, uint32 pathid)
if (pathid >= sTaxiPathNodesByPath.size())
TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathid];
if (path.size() < 2)
nodes = path.index;
nodes = path[path.size() - 1].index;
uint32 LuaTaxiMgr::AddPath(std::list nodes, uint32 mountA, uint32 mountH, uint32 price, uint32 pathId)
if (nodes.size() < 2)
pathId = sTaxiPathNodesByPath.size();
if (sTaxiPathNodesByPath.size() <= pathId)
sTaxiPathNodesByPath.resize(pathId + 1);
uint32 startNode = nodeId;
uint32 index = 0;
for (std::list::const_iterator it = nodes.begin(); it != nodes.end(); ++it)
TaxiPathNodeEntry entry = it;
entry.path = pathId;
TaxiNodesEntry nodeEntry = new TaxiNodesEntry();
nodeEntry->ID = index;
nodeEntry->map_id = entry.mapid;
nodeEntry->MountCreatureID = mountH;
nodeEntry->MountCreatureID = mountA;
nodeEntry->x = entry.x;
nodeEntry->y = entry.y;
nodeEntry->z = entry.z;
entry.index = nodeId++;
sTaxiPathNodesByPath[pathId].set(index++, TaxiPathNodePtr(new TaxiPathNodeEntry(entry)));
if (startNode >= nodeId)
sTaxiPathSetBySource[startNode][nodeId - 1] = TaxiPathBySourceAndDestination(pathId, price);
Hmm, the movement in the video looks bad though.
Its not actual flight movement.
Editing the points is probably a lot better.