EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   coin dupe prevent (https://www.eqemulator.org/forums/showthread.php?t=29597)

tsowl 09-19-2009 04:39 AM

coin dupe prevent
 
when you have 2.15~4.29M platinum then you and dupe them just simply take them out of bank and put them back

zone/client_process.cpp

Code:

-        value = amount_to_take * CoinTypeCoppers(mc->cointype1);
-        amount_to_add = value / CoinTypeCoppers(mc->cointype2);
+        amount_to_add = amount_to_take * ((float)CoinTypeCoppers(mc->cointype1) / (float)CoinTypeCoppers(mc->cointype2));

        // the amount we're adding could be different than what was requested, so
        // we have to adjust the amount we take as well
-        value = amount_to_add * CoinTypeCoppers(mc->cointype2);
-        amount_to_take = value / CoinTypeCoppers(mc->cointype1);
+        amount_to_take = amount_to_add * ((float)CoinTypeCoppers(mc->cointype2) / (float)CoinTypeCoppers(mc->cointype1));


cavedude 09-27-2009 12:38 PM

Added to revision 995.


All times are GMT -4. The time now is 02:26 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.