mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-03 21:50:09 +00:00
added better drop handling, parsing, rng
This commit is contained in:
committed by
Gent Semaj
parent
aa028392f0
commit
78b17aea72
@@ -1,4 +1,5 @@
|
||||
#include "Vendors.hpp"
|
||||
#include "Rand.hpp"
|
||||
|
||||
using namespace Vendors;
|
||||
|
||||
@@ -328,7 +329,7 @@ static void vendorCombineItems(CNSocket* sock, CNPacketData* data) {
|
||||
break;
|
||||
}
|
||||
|
||||
float rolled = (rand() * 1.0f / RAND_MAX) * 100.0f; // success chance out of 100
|
||||
float rolled = Rand::randFloat(100.0f); // success chance out of 100
|
||||
//std::cout << rolled << " vs " << successChance << std::endl;
|
||||
plr->money -= cost;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user