Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-02-2009, 02:52 PM
warlorn81
Fire Beetle
 
Join Date: Apr 2008
Location: fl
Posts: 18
Default Error with Rule_Values Table??

I just bought and installed SOF runs perfectly for the most part.. but in the table startsofcharsdifzone -1 is for disabled or w/e i have it set to -1 and SoF chars still goto crescent reach instead of where i have races start.. any idea's on how to fix this?
Reply With Quote
  #2  
Old 07-02-2009, 03:00 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

During character creation, the client gives users a drop-down list of which city they would like to start out in.

I believe SoF defaults to Crescent Reach for all new characters, so the player must specifically choose an older zone to start out in to end up there.
Reply With Quote
  #3  
Old 07-02-2009, 03:07 PM
warlorn81
Fire Beetle
 
Join Date: Apr 2008
Location: fl
Posts: 18
Default

ok so the starting_zones table is useless for SoF Clients then correct?
Reply With Quote
  #4  
Old 07-02-2009, 05:20 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Okay, according to my investigating, you are correct. The 'starting_zones' table is not used by SoF clients. The SoF client doesn't tell the server what race, class, or deity choices the player chose for the character on character creation anymore, it tells the server the exact ZoneID the player selected from the drop-down list.

http://eqemulator.net/forums/showpos...&postcount=174

Quote:
The character creation in SoF is different in that it doesn't send the player_choice field anymore, rather it sends the actual ZoneID of the requested start zone...
So there are really only two options for SoF client users:

- Allow them to explicitly choose their own starting zone from the drop-down list on the client (which seems to default to Crescent Reach)

- Set the rule value for 'World:SoFStartZoneID' to a specific ZoneID for SoF users to start all of their characters in.

It's possible I'm off in my educated guessing here, and the Emu devs have implemented a different way of handling the new SoF ZoneID way of choosing start cities.
Reply With Quote
  #5  
Old 07-02-2009, 10:38 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

[insert tire screech sound effect]

UPDATE: SoF clients DO use the start_zones table.

What the server does is take the new character's race, class, and deity, as well as the ZoneID of their choice in the start zone drop-down list, and looks for a match in start_zones.

If it finds a record with the specified race, class, deity, and zone, it starts the character in the specified zone at the coords in the record.

If it doesn't find a match, it simply starts them in a default spot in Crescent Reach as a fallback.

So, you can add a record to start_zones for each race/class/deity and zoneid 394 to have different race/class/deity combinations start in different areas of Crescent Reach if the player leaves the zone selection drop-down at the default of Crescent Reach.

File: worlddb.cpp (Line 429), Rev 742
Code:
bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Struct* in_cc)
{

	// SoF doesn't send the player_choice field in character creation, it now sends the real zoneID instead.
	//
	// For SoF, search for an entry in start_zones with a matching zone_id, class, race and deity.
	//
	// For now, if no row matching row is found, send them to Crescent Reach, as that is probably the most likely
	// reason for no match being found.
	//
	char errbuf[MYSQL_ERRMSG_SIZE];
	char *query = 0;
	MYSQL_RES *result;
	MYSQL_ROW row = 0;
	int rows;

	if(!in_pp || !in_cc)
		return false;

	in_pp->x = in_pp->y = in_pp->z = in_pp->zone_id = 0;
	in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = 0;

	RunQuery
	(
		query,
		MakeAnyLenString
		(
			&query,
			"SELECT x,y,z,bind_id FROM start_zones "
			"WHERE zone_id=%i AND player_class=%i "
			"AND player_deity=%i AND player_race=%i",
			in_cc->start_zone,
			in_cc->class_,
			in_cc->deity,
			in_cc->race
		),
		errbuf,
		&result
	);
	LogFile->write(EQEMuLog::Status, "SoF Start zone query: %s\n", query);
	_log(WORLD__CLIENT_TRACE, "SoF Start zone query: %s\n", query);
	safe_delete_array(query); 
	
	if((rows = mysql_num_rows(result)) > 0)
		row = mysql_fetch_row(result);
	
	if(row)
	{         
		LogFile->write(EQEMuLog::Status, "Found starting location in start_zones");
		in_pp->x = atof(row[0]); 
		in_pp->y = atof(row[1]); 
		in_pp->z = atof(row[2]); 
		in_pp->zone_id = in_cc->start_zone;
		in_pp->binds[0].zoneId = atoi(row[4]); 
	} 
	else
	{
		printf("No start_zones entry in database, using defaults\n");

		if(in_cc->start_zone == RuleI(World, TutorialZoneID))
			in_pp->zone_id = in_cc->start_zone;
		else {
			in_pp->x = in_pp->binds[0].x = -51;
			in_pp->y = in_pp->binds[0].y = -20;
			in_pp->z = in_pp->binds[0].z = 0.79;
			in_pp->zone_id = in_pp->binds[0].zoneId = 394; // Crescent Reach.
		}

	}

	if(in_pp->x == 0 && in_pp->y == 0 && in_pp->z == 0)
		database.GetSafePoints(in_pp->zone_id, &in_pp->x, &in_pp->y, &in_pp->z);

	if(in_pp->binds[0].x == 0 && in_pp->binds[0].y == 0 && in_pp->binds[0].z == 0)
		database.GetSafePoints(in_pp->binds[0].zoneId, &in_pp->binds[0].x, &in_pp->binds[0].y, &in_pp->binds[0].z);
	if(result) 
		mysql_free_result(result);	
	return true;
}
Reply With Quote
  #6  
Old 07-04-2009, 02:34 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

Might want to look at this post also.....


http://www.eqemulator.net/forums/showthread.php?t=28582
Reply With Quote
Reply


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 01:00 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3