Binarytree added to the FLHook plugin
-
like the title say can wee have that added to the plugin hook
its prity handy
think thats about all that needs added
once thats in you can prity mutch just take code of the old hooks and convert them to the pluginoh and maby wrapers i can always add the struc to my plugin if need be but would be nice to have it included
//wrappers struct UINT_WRAP { UINT_WRAP(uint u) {val = u;} bool operator==(UINT_WRAP uw) { return uw.val==val; } bool operator>=(UINT_WRAP uw) { return uw.val>=val; } bool operator<=(UINT_WRAP uw) { return uw.val<=val; } bool operator>(UINT_WRAP uw) { return uw.val>val; } bool operator<(UINT_WRAP uw) { return uw.val<val; }="" uint="" val;="" };="" struct="" int_wrap="" {="" int_wrap(int="" u)="" {val="u;}" bool="" operator="=(INT_WRAP" iw)="" return="" iw.val="=val;">=(INT_WRAP iw) { return iw.val>=val; } bool operator<=(INT_WRAP iw) { return iw.val<=val; } bool operator>(INT_WRAP iw) { return iw.val>val; } bool operator<(INT_WRAP iw) { return iw.val<val; }="" int="" val;="" };="" struct="" float_wrap="" {="" float_wrap(float="" f)="" {val="f;}" bool="" operator="=(FLOAT_WRAP" fw)="" return="" fw.val="=val;">=(FLOAT_WRAP fw) { return fw.val>=val; } bool operator<=(FLOAT_WRAP fw) { return fw.val<=val; } bool operator>(FLOAT_WRAP fw) { return fw.val>val; } bool operator<(FLOAT_WRAP fw) { return fw.val<val; }="" float="" val;="" };<="" pre=""></val;></val;></val;>
-
well alot of motah code uses it also alot of mine the wrapers also just gives you a easy way to work with lists
if you look at motah flack 1.6.7
you see binarytree.h binarytree.cpp
also means i can just import all my code and othere stuff straight into a plugin also easy use of lists with a bit more options and less codeBinaryTree <uint_wrap>*set_btBattleShipArchIDs = new BinaryTree<uint_wrap>(); IniGetSection(set_scShipsFile, "BattleShip", lstValues); set_btBattleShipArchIDs->Clear(); foreach(lstValues, INISECTIONVALUE, ships) { uint iShipArchID; pub::GetShipID(iShipArchID, ships->scKey.c_str()); UINT_WRAP *uw = new UINT_WRAP(iShipArchID); set_btBattleShipArchIDs->Add(uw); }</uint_wrap></uint_wrap>
there a example once its loaded with the info
you can easy search that info and not have to do alot of code to do it basicly like thisuint iShipArchID; pub::Player::GetShipID(iClientID, iShipArchID); UINT_WRAP uw = UINT_WRAP(iShipArchID); if(set_btBattleShipArchIDs->Find(&uw))
-
What exactly do you need a binary tree for? Normally you need this to speed up searching in large amount of data. I doubt there is that much data in plugins to manage ^^
-
there will be when i use the build command also for classing ships to what can do what so ye there a need for it
or is the plugin ver just for little alterations of hook
basicly i want to be able to search fast also the build uses big lists
the items you make are listed with the goods you need to get to build it also it searches through the list to make sure all the goods are there and then its built
also the ships clases the list tells me how mutch fuel they use also type of fuel
so ye i think its needed for more advanced stuff
the stuff i have built has been tested by us and also WTS
i just want to handle the list quick and not use alot of code to do itthere anothere thing that would be nice is to be able to use more than one ini file insted of the core FLHook.ini
i also want to add the anti cheat as well
that on its own uses a big listbasicly i dont want to add it my self that defeeting the porpose of the pluging version then im back to square one
only i and who has that version can use it