Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 08-09-2004, 03:25 AM
govtcheeze
Hill Giant
 
Join Date: Mar 2004
Location: South Florida
Posts: 247
Default

The only thing I worry about are loottables that are not set up correctly...where multiplier is greater than the total number of items in the table. This will cause found to never be set to 1, and cause an infinite loop.

I think this will fix it, but defintely needs some testing (currently at work, not able to test ATM):

In function
Code:
const LootTable_Struct* Database::GetLootTable(int32 loottable_id) {:
Code:
			loottable_array[loottable_id]->Entries[i].lootdrop_id = atoi(row[1]);
			loottable_array[loottable_id]->Entries[i].multiplier = atoi(row[2]);
			loottable_array[loottable_id]->Entries[i].probability = atoi(row[3]);

+			if(loottable_array[loottable_id]->Entries[i].multiplier > NumEntries);
+				loottable_array[loottable_id]->Entries[i].multiplier = NumEntries;

			i++;
		}
		mysql_free_result(result);
__________________
GovtCheeze, Welfare Warrior
"Listen, here's the thing. If you can't spot the sucker in the first half hour at the table, then you ARE the sucker." -- Mike McDermott, Rounders

Developer of the original (circa 2004):
Loots v2.0, bitch!
Faction v1.0, bitch!
Magelo-like clone v0.3, bitch!
Zone geometry and spawn/path viewer, bitch!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:57 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3