• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[AscEmu] Custom TaxiPath without DBC edit

Tulba

Glorious
This script is a simple example how to add custom taxi nodes (without dbc edit).
Of course this script can be written in another way, sure, it is just an example (feel free to improve and change this in the way you like).


Working for latest AscEmu WotLK (master repo).

The attachment includes the .diff for core changes and the sql for Mirko (the flightmaster)
View attachment TaxiPath_AscEmu_sql_diff.zip


I think it was Cromon who showed me the way how to do it (back in the days 2008 maybe)
regards
Tulba
 
Last edited:

Rochet2

Moderator / Eluna Dev
Calling new without delete looks a bit off. I think it might be a memory leak.
I assume the methods usually use DBC data which is static, so you should probably make static data too instead of calling new all the time.
 

Rochet2

Moderator / Eluna Dev
I dont have the source locally and have not browsed through it much.

But looks like TaxiPathNode added to TaxiPath are destroyed when TaxiPath is destroyed.
But the TaxiPath is not destroyed anywhere since TaxiStart seems to assume that the memory management is handled by something else.
So through leaking TaxiPath it is also leaking the TaxiPathNode.
So the created things would be deleted only once the whole program exits, which would also happen if they were stored in taximgr for the lifetime of the mgr since it is a singleton and not per player thing.

Cant say for sure since I am not familiar with how arcemu and ascemu work at all.
Probably best bet would be looking at where the normal TaxiPath are stored at and how. If they are in taximgr or stored somewhere on startup, then the code is leaking as those are created once on startup and this is creating on every click.
 
Top