Exploitable bug in tradeskill containers
following code snippet (entire method) fixes an exploitable bug in tradeskill containers. replace the method in "tradeskills.cpp" with this one. (be careful, there are two methods with the same name, but different stack parameters)... enjoy
Code:
bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint8 tradeskill, |
slight fix
replace
sprintf( buf2, "%s", "SELECT tre.recipe_id, count( tre.item_id ) " with sprintf( buf2, "%s", "SELECT tre.recipe_id, sum( tre.componentcount ) " the first line was too restrictive and didnt allow for "experimentation" with recipes that require multiples of the same item (studs for example, which require 3 metal bits). the new query will allow for those, but there is a very small chance on false positives for recipes that have the exact same ingredients but only vary on the specific quantities of each ingredient but whose sum of ingredients is the same. if you find any such combines, post them to the forum so that we can work out a fix for it. == sfisque |
i have a real fix for it. just have to do some more rigorous testing and then i'll post it up here.
== sfisque |
fixed, i mean it this time
two phase fix. first update your database by running the sql here:
Code:
-- Code:
bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint8 tradeskill, |
All times are GMT -4. The time now is 10:59 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.