View Full Version : Cash loot distribution
Elrach
07-16-2003, 05:39 AM
Database::AddLootTableToNPC() in the loottables.cpp file seems to be doing strange things when distributing cash.
Can whoever wrote, or understands the concept explain to me what the avgcoin variable does? In some instances it produces negatives (very high integers in uint). I'm trying to understand the way it works, or was intended to work.
Thanks
Trumpcard
07-16-2003, 06:55 AM
I didnt write it, but I've noticed odd problems with our rand's at times. We had a long running bug in loot determination because the rand was coming out with a REALLY screwed up range, I'm guessing that might be what you're seeing. I doubt you'd ever want to see a negative value. Usually when that happens, it turns out to be a casting problem, a unit32 just won't fit correctly into an int8.
Elrach
07-16-2003, 07:09 AM
I've seen some issues with the items distribution. At first glance, what's there seems to work with what I had in mind.
Cash is another story. Ok, I'll try it out when I get home tonight. Right now, if I use a mincash 0, maxcash 25 and avgcoin 5 it looks pretty nasty. hehe, will see how the client spews the cash over.
Should be fairly screwed up in many occasions, unless there is some other code i've not gone through that filters it when passed to the client.
P.S. Big "Way to Go" to anyone who is re-populating a zone. It's a hell of a job!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.