EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Small fix: Random name generator (https://www.eqemulator.org/forums/showthread.php?t=25862)

kraeger 08-03-2008 05:47 PM

Small fix: Random name generator
 
Hey. It's my first time posting here, so I would like to first say hi to the EqEmu community.

There seem to be a problem with the random name generator in the character creation. Every 5 or 10 names, it gives an invalid name (From 0 to 4 characters long). The char arrays were too small for the values that could be generated with rand().

Here is a fix. Replace the old lines in client.cpp by these:
Code:

Line 335:
char vowels[18]="aeiouyaeiouaeioea";
Line 336:
char cons[48]="bcdfghjklmnpqrstvwxzybcdgklmnprstvwbcdgkpstrkdm";
Line 338:
char paircons[33]="ngrkndstshthphsktrdrbrgrfrclcrsk";



All times are GMT -4. The time now is 01:06 PM.

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