Second pass through tables [skip ci]

This commit is contained in:
Akkadius 2020-03-22 03:27:44 -05:00
parent 06a51f555e
commit 8effd671c5
6 changed files with 79 additions and 79 deletions

View File

@ -165,85 +165,85 @@ namespace DatabaseSchema {
static std::vector<std::string> GetContentTables() static std::vector<std::string> GetContentTables()
{ {
return { return {
"aa_ability", // "aa_ability", // --
"aa_actions", // not in use? "aa_actions", // not in use?
"aa_effects", // not in use? "aa_effects", // not in use?
"aa_rank_effects", // "aa_rank_effects", // --
"aa_rank_prereqs", // "aa_rank_prereqs", // --
"aa_ranks", // "aa_ranks", // --
"aa_required_level_cost", // not in use? "aa_required_level_cost", // not in use?
"adventure_template", // "adventure_template", // --
"adventure_template_entry", // "adventure_template_entry", // --
"adventure_template_entry_flavor", // "adventure_template_entry_flavor", // --
"altadv_vars", // no longer in use? "altadv_vars", // no longer in use?
"alternate_currency", // "alternate_currency", // --
"auras", // "auras", // --
"base_data", "base_data", // --
"blocked_spells", // "blocked_spells", // --
"books", // "books", // --
"char_create_combinations", // "char_create_combinations", // --
"char_create_point_allocations", // "char_create_point_allocations", // --
"class_skill", // not in use? "class_skill", // not in use?
"damageshieldtypes", // not in use ? "damageshieldtypes", // not in use ?
"doors", // "doors", // --
"faction_base_data", // "faction_base_data", // --
"faction_list", // "faction_list", // --
"faction_list_mod", // "faction_list_mod", // --
"fear_hints", // not used "fear_hints", // not used
"fishing", // "fishing", // --
"forage", // "forage", // --
"global_loot", // "global_loot", // --
"goallists", // "goallists", // --
"graveyard", "graveyard", // --
"grid", // "grid", // --
"grid_entries", // "grid_entries", // --
"ground_spawns", // "ground_spawns", // --
"horses", // "horses", // --
"items", // "items", // --
"ldon_trap_entries", // "ldon_trap_entries", // --
"ldon_trap_templates", // "ldon_trap_templates", // --
"lootdrop", // "lootdrop", // --
"lootdrop_entries", // "lootdrop_entries", // --
"loottable", // "loottable", // --
"loottable_entries", // "loottable_entries", // --
"merchantlist", // "merchantlist", // --
"npc_emotes", // "npc_emotes", // --
"npc_faction", // "npc_faction", // --
"npc_faction_entries", // "npc_faction_entries", // --
"npc_scale_global_base", // "npc_scale_global_base", // --
"npc_spells", // "npc_spells", // --
"npc_spells_effects", // "npc_spells_effects", // --
"npc_spells_effects_entries", // "npc_spells_effects_entries", // --
"npc_spells_entries", // "npc_spells_entries", // --
"npc_types", // "npc_types", // --
"npc_types_metadata", // not in use? "npc_types_metadata", // not in use?
"npc_types_tint", // "npc_types_tint", // --
"object", // "object", // --
"pets", // "pets", // --
"pets_equipmentset", // "pets_equipmentset", // --
"pets_equipmentset_entries", // "pets_equipmentset_entries", // --
"proximities", // "proximities", // --
"races", // not used - peq editor? "races", // not used - peq editor?
"skill_caps", // "skill_caps", // --
"spawn2", // "spawn2", // --
"spawn_conditions", // "spawn_conditions", // --
"spawn_events", // "spawn_events", // --
"spawnentry", // "spawnentry", // --
"spawngroup", // "spawngroup", // --
"spells_new", // "spells_new", // --
"start_zones", // "start_zones", // --
"starting_items", // "starting_items", // --
"task_activities", // "task_activities", // --
"tasks", // "tasks", // --
"tasksets", // "tasksets", // --
"tradeskill_recipe", // "tradeskill_recipe", // --
"tradeskill_recipe_entries", // "tradeskill_recipe_entries", // --
"traps", // "traps", // --
"tribute_levels", // "tribute_levels", // --
"tributes", // "tributes", // --
"veteran_reward_templates", // "veteran_reward_templates", // --
"zone", // "zone", // --
"zone_points", // "zone_points", // --
"zone_server", // unused "zone_server", // unused
"zoneserver_auth", // unused "zoneserver_auth", // unused
}; };

View File

@ -8123,7 +8123,7 @@ void Client::SendFactionMessage(int32 tmpvalue, int32 faction_id, int32 faction_
faction_value = faction_before_hit; faction_value = faction_before_hit;
// default to Faction# if we couldn't get the name from the ID // default to Faction# if we couldn't get the name from the ID
if (database.GetFactionName(faction_id, name, sizeof(name)) == false) if (content_db.GetFactionName(faction_id, name, sizeof(name)) == false)
snprintf(name, sizeof(name), "Faction%i", faction_id); snprintf(name, sizeof(name), "Faction%i", faction_id);
if (tmpvalue == 0 || temp == 1 || temp == 2) if (tmpvalue == 0 || temp == 1 || temp == 2)

View File

@ -1799,7 +1799,7 @@ void command_timezone(Client *c, const Seperator *sep)
c->Message(Chat::Red, "Setting timezone to %i h %i m", hours, minutes); c->Message(Chat::Red, "Setting timezone to %i h %i m", hours, minutes);
uint32 ntz=(hours*60)+minutes; uint32 ntz=(hours*60)+minutes;
zone->zone_time.setEQTimeZone(ntz); zone->zone_time.setEQTimeZone(ntz);
database.SetZoneTZ(zone->GetZoneID(), zone->GetInstanceVersion(), ntz); content_db.SetZoneTZ(zone->GetZoneID(), zone->GetInstanceVersion(), ntz);
// Update all clients with new TZ. // Update all clients with new TZ.
auto outapp = new EQApplicationPacket(OP_TimeOfDay, sizeof(TimeOfDay_Struct)); auto outapp = new EQApplicationPacket(OP_TimeOfDay, sizeof(TimeOfDay_Struct));
@ -9609,11 +9609,11 @@ void command_setgraveyard(Client *c, const Seperator *sep)
zoneid = content_db.GetZoneID(sep->arg[1]); zoneid = content_db.GetZoneID(sep->arg[1]);
if(zoneid > 0) { if(zoneid > 0) {
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetPosition()); graveyard_id = content_db.CreateGraveyardRecord(zoneid, t->GetPosition());
if(graveyard_id > 0) { if(graveyard_id > 0) {
c->Message(Chat::White, "Successfuly added a new record for this graveyard!"); c->Message(Chat::White, "Successfuly added a new record for this graveyard!");
if(database.AddGraveyardIDToZone(zoneid, graveyard_id) > 0) { if(content_db.AddGraveyardIDToZone(zoneid, graveyard_id) > 0) {
c->Message(Chat::White, "Successfuly added this new graveyard for the zone %s.", sep->arg[1]); c->Message(Chat::White, "Successfuly added this new graveyard for the zone %s.", sep->arg[1]);
// TODO: Set graveyard data to the running zone process. // TODO: Set graveyard data to the running zone process.
c->Message(Chat::White, "Done!"); c->Message(Chat::White, "Done!");
@ -9646,7 +9646,7 @@ void command_deletegraveyard(Client *c, const Seperator *sep)
graveyard_id = content_db.GetZoneGraveyardID(zoneid, 0); graveyard_id = content_db.GetZoneGraveyardID(zoneid, 0);
if(zoneid > 0 && graveyard_id > 0) { if(zoneid > 0 && graveyard_id > 0) {
if(database.DeleteGraveyard(zoneid, graveyard_id)) if(content_db.DeleteGraveyard(zoneid, graveyard_id))
c->Message(Chat::White, "Successfuly deleted graveyard %u for zone %s.", graveyard_id, sep->arg[1]); c->Message(Chat::White, "Successfuly deleted graveyard %u for zone %s.", graveyard_id, sep->arg[1]);
else else
c->Message(Chat::White, "Unable to delete graveyard %u for zone %s.", graveyard_id, sep->arg[1]); c->Message(Chat::White, "Unable to delete graveyard %u for zone %s.", graveyard_id, sep->arg[1]);

View File

@ -269,7 +269,7 @@ public:
void SetNPCFactionID(int32 in) void SetNPCFactionID(int32 in)
{ {
npc_faction_id = in; npc_faction_id = in;
database.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction); content_db.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction);
} }
glm::vec4 m_SpawnPoint; glm::vec4 m_SpawnPoint;

View File

@ -550,7 +550,7 @@ bool NpcScaleManager::ApplyGlobalBaseScalingToNPCStatically(NPC *&npc)
npc->GetNPCTypeID() npc->GetNPCTypeID()
); );
auto results = database.QueryDatabase(query); auto results = content_db.QueryDatabase(query);
return results.Success(); return results.Success();
} }
@ -610,7 +610,7 @@ bool NpcScaleManager::ApplyGlobalBaseScalingToNPCDynamically(NPC *&npc)
npc->GetNPCTypeID() npc->GetNPCTypeID()
); );
auto results = database.QueryDatabase(query); auto results = content_db.QueryDatabase(query);
return results.Success(); return results.Success();
} }

View File

@ -815,7 +815,7 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
if(graveyard_id() > 0) if(graveyard_id() > 0)
{ {
LogDebug("Graveyard ID is [{}]", graveyard_id()); LogDebug("Graveyard ID is [{}]", graveyard_id());
bool GraveYardLoaded = database.GetZoneGraveyard(graveyard_id(), &pgraveyard_zoneid, &m_Graveyard.x, &m_Graveyard.y, &m_Graveyard.z, &m_Graveyard.w); bool GraveYardLoaded = content_db.GetZoneGraveyard(graveyard_id(), &pgraveyard_zoneid, &m_Graveyard.x, &m_Graveyard.y, &m_Graveyard.z, &m_Graveyard.w);
if (GraveYardLoaded) { if (GraveYardLoaded) {
LogDebug("Loaded a graveyard for zone [{}]: graveyard zoneid is [{}] at [{}]", short_name, graveyard_zoneid(), to_string(m_Graveyard).c_str()); LogDebug("Loaded a graveyard for zone [{}]: graveyard zoneid is [{}] at [{}]", short_name, graveyard_zoneid(), to_string(m_Graveyard).c_str());