mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository
This commit is contained in:
+29
-11
@@ -438,18 +438,36 @@ bool WorldDatabase::GetStartZone(
|
||||
p_player_profile_struct->binds[0].instance_id = 0;
|
||||
|
||||
// see if we have an entry for start_zone. We can support both titanium & SOF+ by having two entries per class/race/deity combo with different zone_ids
|
||||
std::string query = StringFormat(
|
||||
"SELECT x, y, z, heading, start_zone, bind_id, bind_x, bind_y, bind_z FROM start_zones WHERE zone_id = %i "
|
||||
"AND player_class = %i AND player_deity = %i AND player_race = %i %s",
|
||||
p_char_create_struct->start_zone,
|
||||
p_char_create_struct->class_,
|
||||
p_char_create_struct->deity,
|
||||
p_char_create_struct->race,
|
||||
ContentFilterCriteria::apply().c_str()
|
||||
);
|
||||
std::string query;
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
if (is_titanium) {
|
||||
// Titanium sends player choice (starting city) instead of a zone id
|
||||
query = StringFormat(
|
||||
"SELECT x, y, z, heading, start_zone, bind_id, bind_x, bind_y, bind_z FROM start_zones WHERE player_choice = %i "
|
||||
"AND player_class = %i AND player_deity = %i AND player_race = %i %s",
|
||||
p_char_create_struct->start_zone,
|
||||
p_char_create_struct->class_,
|
||||
p_char_create_struct->deity,
|
||||
p_char_create_struct->race,
|
||||
ContentFilterCriteria::apply().c_str()
|
||||
);
|
||||
LogInfo("Titanium Start zone query: [{}]\n", query.c_str());
|
||||
}
|
||||
else {
|
||||
query = StringFormat(
|
||||
"SELECT x, y, z, heading, start_zone, bind_id, bind_x, bind_y, bind_z FROM start_zones WHERE zone_id = %i "
|
||||
"AND player_class = %i AND player_deity = %i AND player_race = %i %s",
|
||||
p_char_create_struct->start_zone,
|
||||
p_char_create_struct->class_,
|
||||
p_char_create_struct->deity,
|
||||
p_char_create_struct->race,
|
||||
ContentFilterCriteria::apply().c_str()
|
||||
);
|
||||
LogInfo("SoF Start zone query: [{}]\n", query.c_str());
|
||||
}
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user