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 01-11-2015, 06:20 PM
iluvseq
Sarnak
 
Join Date: Aug 2009
Location: Somewhere
Posts: 53
Default

Ok, here's the deal:

If you configure the startzone variable, then the start_zones table is ignored completely. Also, the starting location will be the safe point of the zone. This is hard coded.

The documentation for the start_zones table is incorrect. The way the code works, it queries start_zones using zone_id, player_class, player_deity and player_race. Most guides say to set zone_id and start_zone to the zone you want players to start in, and this is incorrect. You should instead ONLY set start_zone, leaving zone_id and player_choice set as default in the PEQ tables, otherwise the various queries against start_zone will fail and your characters will end up in the default (hard-coded by class/race for Titanium and older clients, and hard-coded to Crescent Reach for SoF and newer clients.)

Additionally, for SoF+ clients, only the x,y,z, heading and bind_id are actually pulled from the start_zones table, not the start_zone (this is probably a bug). So with the default code base, it is not possible to over-ride the start zone for SoF+ clients in any way other than using the startzone variable (which has the issue of always using the safe point of the zone).

This patch fixes that issue, so that the start_zone set in start_zones works for both Titanium and SoF+ clients.

Code:
diff --git a/world/worlddb.cpp b/world/worlddb.cpp
index 91406b5..23d6722 100644
--- a/world/worlddb.cpp
+++ b/world/worlddb.cpp
@@ -429,7 +429,7 @@ bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Stru
        in_pp->x = in_pp->y = in_pp->z = in_pp->heading = 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 = in_pp->binds[0].instance_id = 0;
 
-    std::string query = StringFormat("SELECT x, y, z, heading, bind_id FROM start_zones WHERE zone_id = %i "
+    std::string query = StringFormat("SELECT x, y, z, heading, start_zone, 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);
     auto results = QueryDatabase(query);
@@ -459,8 +459,8 @@ bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Stru
                in_pp->y = atof(row[1]);
                in_pp->z = atof(row[2]);
                in_pp->heading = atof(row[3]);
-               in_pp->zone_id = in_cc->start_zone;
-               in_pp->binds[0].zoneId = atoi(row[4]);
+               in_pp->zone_id = atoi(row[4]);
+               in_pp->binds[0].zoneId = atoi(row[5]);
        }
 
        if(in_pp->x == 0 && in_pp->y == 0 && in_pp->z == 0)
Reply With Quote
  #2  
Old 01-14-2015, 05:49 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

Iluvseq- I've made a pull request based on your changes. There's a few changes in the way it works as well as I think really it was code that evolved over time and needed a bit of a clean up (imo).Simply, I put the start zone definitions for both Titanium and newer clients in the server_rules table rather than one in there and one in the variables table.

https://github.com/EQEmu/Server/pull/336

My home pc died literally just after making the PR so I didn't get to discuss it with the devs in IRC, but feel free to comment on the link above and try to spot any bugs. I tested it quite a bit, but I may have missed the odd scenario.
Reply With Quote
  #3  
Old 01-19-2015, 10:29 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

The method has slightly changed now and is detailed here:-
http://wiki.eqemulator.org/p?Changin...Zones&frm=Main
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:12 PM.


 

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