mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-03 14:43:54 +00:00
Fixed spawn2 and ground spawn issue
This commit is contained in:
parent
d545e1ba04
commit
0eb7667779
@ -699,7 +699,7 @@ Ground_Spawns* ZoneDatabase::LoadGroundSpawns(uint32 zone_id, int16 version, Gro
|
||||
"min_x, min_y, heading, name, "
|
||||
"item, max_allowed, respawn_timer "
|
||||
"FROM ground_spawns "
|
||||
"WHERE zoneid = %i AND (version = %u OR version = -1) AND min_expansion <= %i AND max_expansion >= %i"
|
||||
"WHERE zoneid = %i AND (version = %u OR version = -1) AND min_expansion <= %i AND max_expansion >= %i "
|
||||
"LIMIT 50", zone_id, version, latest_expansion, latest_expansion);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
|
||||
@ -575,6 +575,7 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
|
||||
}
|
||||
|
||||
const char *zone_name = database.GetZoneName(zoneid);
|
||||
auto latest_expansion = EQEmu::expansions::ConvertExpansionMaskToLatestExpansion(RuleI(World, ExpansionSettings));
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
"id, "
|
||||
@ -592,11 +593,15 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
|
||||
"animation "
|
||||
"FROM "
|
||||
"spawn2 "
|
||||
"WHERE zone = '%s' AND (version = %u OR version = -1)",
|
||||
"WHERE zone = '%s' AND (version = %u OR version = -1) AND min_expansion <= %i AND max_expansion >= %i",
|
||||
zone_name,
|
||||
version
|
||||
version,
|
||||
latest_expansion,
|
||||
latest_expansion
|
||||
);
|
||||
results = QueryDatabase(query);
|
||||
Log(Logs::General, Logs::Status, "%s", query.c_str());
|
||||
|
||||
|
||||
if (!results.Success()) {
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user