diff --git a/common/database_schema.h b/common/database_schema.h index bd8e89b6c..e86230f9d 100644 --- a/common/database_schema.h +++ b/common/database_schema.h @@ -218,7 +218,6 @@ namespace DatabaseSchema { "skill_caps", "spawn2", "spawn_conditions", - "spawn_events", "spawnentry", "spawngroup", "spells_new", @@ -254,6 +253,7 @@ namespace DatabaseSchema { "launcher", "launcher_zones", "spawn_condition_values", + "spawn_events", "level_exp_mods", "logsys_categories", "name_filter", diff --git a/common/repositories/base/base_spawn_events_repository.h b/common/repositories/base/base_spawn_events_repository.h index 723a670d8..c0e92ee26 100644 --- a/common/repositories/base/base_spawn_events_repository.h +++ b/common/repositories/base/base_spawn_events_repository.h @@ -159,7 +159,7 @@ public: int spawn_events_id ) { - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "{} WHERE id = {} LIMIT 1", BaseSelect(), @@ -196,7 +196,7 @@ public: int spawn_events_id ) { - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "DELETE FROM {} WHERE {} = {}", TableName(), @@ -230,7 +230,7 @@ public: update_values.push_back(columns[12] + " = " + std::to_string(spawn_events_entry.argument)); update_values.push_back(columns[13] + " = " + std::to_string(spawn_events_entry.strict)); - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "UPDATE {} SET {} WHERE {} = {}", TableName(), @@ -263,7 +263,7 @@ public: insert_values.push_back(std::to_string(spawn_events_entry.argument)); insert_values.push_back(std::to_string(spawn_events_entry.strict)); - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "{} VALUES ({})", BaseInsert(), @@ -309,7 +309,7 @@ public: std::vector insert_values; - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "{} VALUES {}", BaseInsert(), @@ -324,7 +324,7 @@ public: { std::vector all_entries; - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "{}", BaseSelect() @@ -361,7 +361,7 @@ public: { std::vector all_entries; - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "{} WHERE {}", BaseSelect(), @@ -397,7 +397,7 @@ public: static int DeleteWhere(std::string where_filter) { - auto results = content_db.QueryDatabase( + auto results = database.QueryDatabase( fmt::format( "DELETE FROM {} WHERE {}", TableName(), diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index 3571effe9..1272e1487 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -507,7 +507,7 @@ bool ZoneDatabase::PopulateZoneSpawnListClose(uint32 zoneid, LinkedList if (mob_distance > repop_distance) continue; - new_spawn = new Spawn2( // + new_spawn = new Spawn2( // atoi(row[0]), // uint32 in_spawn2_id atoi(row[1]), // uint32 spawngroup_id atof(row[2]), // float in_x @@ -595,14 +595,14 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList &spa for (auto row = results.begin(); row != results.end(); ++row) { - uint32 spawn_time_left = 0; - Spawn2* new_spawn = 0; + uint32 spawn_time_left = 0; + Spawn2* new_spawn = 0; bool perl_enabled = atoi(row[11]) == 1 ? true : false; if (spawn_times.count(atoi(row[0])) != 0) spawn_time_left = spawn_times[atoi(row[0])]; - new_spawn = new Spawn2( // + new_spawn = new Spawn2( // atoi(row[0]), // uint32 in_spawn2_id atoi(row[1]), // uint32 spawngroup_id atof(row[2]), // float in_x @@ -910,7 +910,7 @@ void SpawnConditionManager::UpdateDBEvent(SpawnEvent &event) { event.next.day, event.next.month, event.next.year, event.enabled? 1: 0, event.strict? 1: 0, event.id); - content_db.QueryDatabase(query); + database.QueryDatabase(query); } void SpawnConditionManager::UpdateDBCondition(const char* zone_name, uint32 instance_id, uint16 cond_id, int16 value) { @@ -929,7 +929,7 @@ bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std: "next_month, next_year, enabled, " "action, argument, strict, zone " "FROM spawn_events WHERE id = %d", event_id); - auto results = content_db.QueryDatabase(query); + auto results = database.QueryDatabase(query); if (!results.Success()) { return false; } @@ -1009,7 +1009,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in query = StringFormat("SELECT id, cond_id, period, next_minute, next_hour, " "next_day, next_month, next_year, enabled, action, argument, strict " "FROM spawn_events WHERE zone = '%s'", zone_name); - results = content_db.QueryDatabase(query); + results = database.QueryDatabase(query); if (!results.Success()) { return false; }