Ok, change of thought train here...
(In case you guys are wondering, I have insomnia so this has been something fun to occupy my time.)
I opted to make it a variable. 10 is too high. When I set it originally, I was in Fearplane, so it seemed like the drops were coming out good, but they are way to high on lower end mobs, especially ones with larger possible inventories. My solution is to default the value at 1, add a new database entry in called LootDropMod, and make it configurable. If you dont like the rate at which your database is dropping, just tweak this number. Heres the complete diff first.
120a121,133
>
> int LootDropMod;
> char temp[64];
> if (database.GetVariable("LootDropMod", temp, sizeof(temp)-1))
> {
> LootDropMod = atoi(temp);
> }
> else
> {
> cerr << "Variable not found ! Setting to default of 1" << endl;
> LootDropMod=1;
> }
127c140,143
< if(rand() * 100 < atoi(row[4]) < 10 ? 10 : atoi(row[4]))
---
> if ( (rand()%100) < (atoi(row[4]) * LootDropMod) )
144,145c160,161
< mysql_free_result(result);
< return;
---
> //mysql_free_result(result);
> //return;
So, load this code in, then go into mysql and do a
mysql>use eq;
mysql>insert into variables values ('LootDropMod','2');
I set mine to 2, adjust to taste. It will give you a linear scaling factor to up your drop rate on your server.
I still think the planes drops are way off from the low end drops, but thats just me. I really like this change though, I'd like to roll it into the money calc too , or a seperate variable to determine it.
Anyways, hope you guys like this addition, and it helps spice up your servers.
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
|