From fe7e850a04b9beb1e44c26adc4faba2d244fbd0d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 4 Apr 2020 04:48:46 -0500 Subject: [PATCH] Return blank string values for string entries that return back null --- common/repositories/aa_ability_repository.h | 6 +- .../repositories/account_flags_repository.h | 12 +- common/repositories/account_ip_repository.h | 12 +- common/repositories/account_repository.h | 48 ++--- ...venture_template_entry_flavor_repository.h | 6 +- .../adventure_template_repository.h | 12 +- common/repositories/auras_repository.h | 6 +- common/repositories/banned_ips_repository.h | 12 +- .../repositories/blocked_spells_repository.h | 12 +- common/repositories/books_repository.h | 12 +- common/repositories/bug_reports_repository.h | 78 ++++---- common/repositories/bugs_repository.h | 42 ++--- common/repositories/buyer_repository.h | 6 +- .../character_bandolier_repository.h | 6 +- .../repositories/character_buffs_repository.h | 6 +- .../character_corpses_repository.h | 12 +- .../repositories/character_data_repository.h | 36 ++-- .../character_inspect_messages_repository.h | 6 +- .../character_pet_buffs_repository.h | 6 +- .../character_pet_info_repository.h | 6 +- common/repositories/chatchannels_repository.h | 18 +- .../command_settings_repository.h | 12 +- common/repositories/data_buckets_repository.h | 12 +- common/repositories/db_str_repository.h | 6 +- .../discovered_items_repository.h | 6 +- common/repositories/doors_repository.h | 18 +- common/repositories/eventlog_repository.h | 36 ++-- .../faction_list_mod_repository.h | 6 +- common/repositories/faction_list_repository.h | 6 +- common/repositories/friends_repository.h | 6 +- common/repositories/global_loot_repository.h | 30 ++-- common/repositories/gm_ips_repository.h | 12 +- .../repositories/ground_spawns_repository.h | 12 +- common/repositories/group_id_repository.h | 6 +- .../repositories/group_leaders_repository.h | 42 ++--- .../repositories/guild_members_repository.h | 6 +- common/repositories/guild_ranks_repository.h | 6 +- common/repositories/guilds_repository.h | 30 ++-- common/repositories/hackers_repository.h | 30 ++-- common/repositories/horses_repository.h | 12 +- common/repositories/inventory_repository.h | 6 +- .../inventory_snapshots_repository.h | 6 +- .../repositories/ip_exemptions_repository.h | 6 +- common/repositories/item_tick_repository.h | 6 +- common/repositories/items_repository.h | 168 +++++++++--------- common/repositories/launcher_repository.h | 6 +- .../repositories/launcher_zones_repository.h | 12 +- common/repositories/lfguild_repository.h | 12 +- .../repositories/login_accounts_repository.h | 48 ++--- .../login_api_tokens_repository.h | 18 +- .../login_server_admins_repository.h | 42 ++--- .../login_server_list_types_repository.h | 6 +- .../login_world_servers_repository.h | 36 ++-- .../logsys_categories_repository.h | 6 +- common/repositories/lootdrop_repository.h | 6 +- common/repositories/loottable_repository.h | 6 +- common/repositories/mail_repository.h | 24 +-- common/repositories/name_filter_repository.h | 6 +- common/repositories/npc_emotes_repository.h | 6 +- common/repositories/npc_faction_repository.h | 6 +- .../npc_scale_global_base_repository.h | 6 +- .../npc_spells_effects_repository.h | 6 +- common/repositories/npc_spells_repository.h | 6 +- common/repositories/npc_types_repository.h | 30 ++-- .../repositories/npc_types_tint_repository.h | 6 +- .../repositories/object_contents_repository.h | 6 +- common/repositories/object_repository.h | 12 +- .../perl_event_export_settings_repository.h | 6 +- common/repositories/petitions_repository.h | 36 ++-- .../pets_equipmentset_repository.h | 6 +- common/repositories/pets_repository.h | 6 +- .../repositories/quest_globals_repository.h | 12 +- common/repositories/raid_details_repository.h | 6 +- common/repositories/raid_members_repository.h | 6 +- common/repositories/reports_repository.h | 18 +- common/repositories/rule_sets_repository.h | 6 +- common/repositories/rule_values_repository.h | 18 +- common/repositories/saylink_repository.h | 6 +- common/repositories/spawn2_repository.h | 6 +- .../spawn_condition_values_repository.h | 6 +- .../spawn_conditions_repository.h | 12 +- common/repositories/spawn_events_repository.h | 12 +- common/repositories/spawngroup_repository.h | 6 +- .../repositories/spell_buckets_repository.h | 12 +- .../repositories/spell_globals_repository.h | 18 +- common/repositories/spells_new_repository.h | 48 ++--- .../repositories/task_activities_repository.h | 36 ++-- common/repositories/tasks_repository.h | 24 +-- common/repositories/titles_repository.h | 12 +- common/repositories/traps_repository.h | 12 +- common/repositories/tributes_repository.h | 12 +- common/repositories/variables_repository.h | 24 +-- .../veteran_reward_templates_repository.h | 6 +- common/repositories/zone_points_repository.h | 6 +- common/repositories/zone_repository.h | 36 ++-- .../generators/repository-generator.pl | 4 +- world/world_server_command_handler.cpp | 2 - 97 files changed, 788 insertions(+), 790 deletions(-) diff --git a/common/repositories/aa_ability_repository.h b/common/repositories/aa_ability_repository.h index 62aeb7a4b..aaba219b9 100644 --- a/common/repositories/aa_ability_repository.h +++ b/common/repositories/aa_ability_repository.h @@ -164,7 +164,7 @@ public: AaAbility entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.category = atoi(row[2]); entry.classes = atoi(row[3]); entry.races = atoi(row[4]); @@ -329,7 +329,7 @@ public: AaAbility entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.category = atoi(row[2]); entry.classes = atoi(row[3]); entry.races = atoi(row[4]); @@ -367,7 +367,7 @@ public: AaAbility entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.category = atoi(row[2]); entry.classes = atoi(row[3]); entry.races = atoi(row[4]); diff --git a/common/repositories/account_flags_repository.h b/common/repositories/account_flags_repository.h index 6943d1d3e..e9f0382c7 100644 --- a/common/repositories/account_flags_repository.h +++ b/common/repositories/account_flags_repository.h @@ -131,8 +131,8 @@ public: AccountFlags entry{}; entry.p_accid = atoi(row[0]); - entry.p_flag = row[1]; - entry.p_value = row[2]; + entry.p_flag = row[1] ? row[1] : ""; + entry.p_value = row[2] ? row[2] : ""; return entry; } @@ -249,8 +249,8 @@ public: AccountFlags entry{}; entry.p_accid = atoi(row[0]); - entry.p_flag = row[1]; - entry.p_value = row[2]; + entry.p_flag = row[1] ? row[1] : ""; + entry.p_value = row[2] ? row[2] : ""; all_entries.push_back(entry); } @@ -276,8 +276,8 @@ public: AccountFlags entry{}; entry.p_accid = atoi(row[0]); - entry.p_flag = row[1]; - entry.p_value = row[2]; + entry.p_flag = row[1] ? row[1] : ""; + entry.p_value = row[2] ? row[2] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/account_ip_repository.h b/common/repositories/account_ip_repository.h index aea63827d..d1f7726fb 100644 --- a/common/repositories/account_ip_repository.h +++ b/common/repositories/account_ip_repository.h @@ -134,9 +134,9 @@ public: AccountIp entry{}; entry.accid = atoi(row[0]); - entry.ip = row[1]; + entry.ip = row[1] ? row[1] : ""; entry.count = atoi(row[2]); - entry.lastused = row[3]; + entry.lastused = row[3] ? row[3] : ""; return entry; } @@ -256,9 +256,9 @@ public: AccountIp entry{}; entry.accid = atoi(row[0]); - entry.ip = row[1]; + entry.ip = row[1] ? row[1] : ""; entry.count = atoi(row[2]); - entry.lastused = row[3]; + entry.lastused = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -284,9 +284,9 @@ public: AccountIp entry{}; entry.accid = atoi(row[0]); - entry.ip = row[1]; + entry.ip = row[1] ? row[1] : ""; entry.count = atoi(row[2]); - entry.lastused = row[3]; + entry.lastused = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/account_repository.h b/common/repositories/account_repository.h index c043dc8ee..3667ac864 100644 --- a/common/repositories/account_repository.h +++ b/common/repositories/account_repository.h @@ -179,24 +179,24 @@ public: Account entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.charname = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.charname = row[2] ? row[2] : ""; entry.sharedplat = atoi(row[3]); - entry.password = row[4]; + entry.password = row[4] ? row[4] : ""; entry.status = atoi(row[5]); - entry.ls_id = row[6]; + entry.ls_id = row[6] ? row[6] : ""; entry.lsaccount_id = atoi(row[7]); entry.gmspeed = atoi(row[8]); entry.revoked = atoi(row[9]); entry.karma = atoi(row[10]); - entry.minilogin_ip = row[11]; + entry.minilogin_ip = row[11] ? row[11] : ""; entry.hideme = atoi(row[12]); entry.rulesflag = atoi(row[13]); - entry.suspendeduntil = row[14]; + entry.suspendeduntil = row[14] ? row[14] : ""; entry.time_creation = atoi(row[15]); entry.expansion = atoi(row[16]); - entry.ban_reason = row[17]; - entry.suspend_reason = row[18]; + entry.ban_reason = row[17] ? row[17] : ""; + entry.suspend_reason = row[18] ? row[18] : ""; return entry; } @@ -364,24 +364,24 @@ public: Account entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.charname = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.charname = row[2] ? row[2] : ""; entry.sharedplat = atoi(row[3]); - entry.password = row[4]; + entry.password = row[4] ? row[4] : ""; entry.status = atoi(row[5]); - entry.ls_id = row[6]; + entry.ls_id = row[6] ? row[6] : ""; entry.lsaccount_id = atoi(row[7]); entry.gmspeed = atoi(row[8]); entry.revoked = atoi(row[9]); entry.karma = atoi(row[10]); - entry.minilogin_ip = row[11]; + entry.minilogin_ip = row[11] ? row[11] : ""; entry.hideme = atoi(row[12]); entry.rulesflag = atoi(row[13]); - entry.suspendeduntil = row[14]; + entry.suspendeduntil = row[14] ? row[14] : ""; entry.time_creation = atoi(row[15]); entry.expansion = atoi(row[16]); - entry.ban_reason = row[17]; - entry.suspend_reason = row[18]; + entry.ban_reason = row[17] ? row[17] : ""; + entry.suspend_reason = row[18] ? row[18] : ""; all_entries.push_back(entry); } @@ -407,24 +407,24 @@ public: Account entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.charname = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.charname = row[2] ? row[2] : ""; entry.sharedplat = atoi(row[3]); - entry.password = row[4]; + entry.password = row[4] ? row[4] : ""; entry.status = atoi(row[5]); - entry.ls_id = row[6]; + entry.ls_id = row[6] ? row[6] : ""; entry.lsaccount_id = atoi(row[7]); entry.gmspeed = atoi(row[8]); entry.revoked = atoi(row[9]); entry.karma = atoi(row[10]); - entry.minilogin_ip = row[11]; + entry.minilogin_ip = row[11] ? row[11] : ""; entry.hideme = atoi(row[12]); entry.rulesflag = atoi(row[13]); - entry.suspendeduntil = row[14]; + entry.suspendeduntil = row[14] ? row[14] : ""; entry.time_creation = atoi(row[15]); entry.expansion = atoi(row[16]); - entry.ban_reason = row[17]; - entry.suspend_reason = row[18]; + entry.ban_reason = row[17] ? row[17] : ""; + entry.suspend_reason = row[18] ? row[18] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/adventure_template_entry_flavor_repository.h b/common/repositories/adventure_template_entry_flavor_repository.h index 4c72735a5..6eb0c8572 100644 --- a/common/repositories/adventure_template_entry_flavor_repository.h +++ b/common/repositories/adventure_template_entry_flavor_repository.h @@ -128,7 +128,7 @@ public: AdventureTemplateEntryFlavor entry{}; entry.id = atoi(row[0]); - entry.text = row[1]; + entry.text = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: AdventureTemplateEntryFlavor entry{}; entry.id = atoi(row[0]); - entry.text = row[1]; + entry.text = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: AdventureTemplateEntryFlavor entry{}; entry.id = atoi(row[0]); - entry.text = row[1]; + entry.text = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/adventure_template_repository.h b/common/repositories/adventure_template_repository.h index 4ef56ca80..8590ebfad 100644 --- a/common/repositories/adventure_template_repository.h +++ b/common/repositories/adventure_template_repository.h @@ -221,7 +221,7 @@ public: AdventureTemplate entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.zone_version = atoi(row[2]); entry.is_hard = atoi(row[3]); entry.is_raid = atoi(row[4]); @@ -234,7 +234,7 @@ public: entry.assa_y = atof(row[11]); entry.assa_z = atof(row[12]); entry.assa_h = atof(row[13]); - entry.text = row[14]; + entry.text = row[14] ? row[14] : ""; entry.duration = atoi(row[15]); entry.zone_in_time = atoi(row[16]); entry.win_points = atoi(row[17]); @@ -462,7 +462,7 @@ public: AdventureTemplate entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.zone_version = atoi(row[2]); entry.is_hard = atoi(row[3]); entry.is_raid = atoi(row[4]); @@ -475,7 +475,7 @@ public: entry.assa_y = atof(row[11]); entry.assa_z = atof(row[12]); entry.assa_h = atof(row[13]); - entry.text = row[14]; + entry.text = row[14] ? row[14] : ""; entry.duration = atoi(row[15]); entry.zone_in_time = atoi(row[16]); entry.win_points = atoi(row[17]); @@ -519,7 +519,7 @@ public: AdventureTemplate entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.zone_version = atoi(row[2]); entry.is_hard = atoi(row[3]); entry.is_raid = atoi(row[4]); @@ -532,7 +532,7 @@ public: entry.assa_y = atof(row[11]); entry.assa_z = atof(row[12]); entry.assa_h = atof(row[13]); - entry.text = row[14]; + entry.text = row[14] ? row[14] : ""; entry.duration = atoi(row[15]); entry.zone_in_time = atoi(row[16]); entry.win_points = atoi(row[17]); diff --git a/common/repositories/auras_repository.h b/common/repositories/auras_repository.h index f76ca9e59..08a70fbb5 100644 --- a/common/repositories/auras_repository.h +++ b/common/repositories/auras_repository.h @@ -156,7 +156,7 @@ public: entry.type = atoi(row[0]); entry.npc_type = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; entry.spell_id = atoi(row[3]); entry.distance = atoi(row[4]); entry.aura_type = atoi(row[5]); @@ -309,7 +309,7 @@ public: entry.type = atoi(row[0]); entry.npc_type = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; entry.spell_id = atoi(row[3]); entry.distance = atoi(row[4]); entry.aura_type = atoi(row[5]); @@ -344,7 +344,7 @@ public: entry.type = atoi(row[0]); entry.npc_type = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; entry.spell_id = atoi(row[3]); entry.distance = atoi(row[4]); entry.aura_type = atoi(row[5]); diff --git a/common/repositories/banned_ips_repository.h b/common/repositories/banned_ips_repository.h index 26e8293f0..f8afcf0a2 100644 --- a/common/repositories/banned_ips_repository.h +++ b/common/repositories/banned_ips_repository.h @@ -127,8 +127,8 @@ public: if (results.RowCount() == 1) { BannedIps entry{}; - entry.ip_address = row[0]; - entry.notes = row[1]; + entry.ip_address = row[0] ? row[0] : ""; + entry.notes = row[1] ? row[1] : ""; return entry; } @@ -244,8 +244,8 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { BannedIps entry{}; - entry.ip_address = row[0]; - entry.notes = row[1]; + entry.ip_address = row[0] ? row[0] : ""; + entry.notes = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -270,8 +270,8 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { BannedIps entry{}; - entry.ip_address = row[0]; - entry.notes = row[1]; + entry.ip_address = row[0] ? row[0] : ""; + entry.notes = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/blocked_spells_repository.h b/common/repositories/blocked_spells_repository.h index c4eba3581..57138a2ad 100644 --- a/common/repositories/blocked_spells_repository.h +++ b/common/repositories/blocked_spells_repository.h @@ -167,8 +167,8 @@ public: entry.x_diff = atof(row[7]); entry.y_diff = atof(row[8]); entry.z_diff = atof(row[9]); - entry.message = row[10]; - entry.description = row[11]; + entry.message = row[10] ? row[10] : ""; + entry.description = row[11] ? row[11] : ""; return entry; } @@ -324,8 +324,8 @@ public: entry.x_diff = atof(row[7]); entry.y_diff = atof(row[8]); entry.z_diff = atof(row[9]); - entry.message = row[10]; - entry.description = row[11]; + entry.message = row[10] ? row[10] : ""; + entry.description = row[11] ? row[11] : ""; all_entries.push_back(entry); } @@ -360,8 +360,8 @@ public: entry.x_diff = atof(row[7]); entry.y_diff = atof(row[8]); entry.z_diff = atof(row[9]); - entry.message = row[10]; - entry.description = row[11]; + entry.message = row[10] ? row[10] : ""; + entry.description = row[11] ? row[11] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/books_repository.h b/common/repositories/books_repository.h index 7baa6ef7c..d3464f090 100644 --- a/common/repositories/books_repository.h +++ b/common/repositories/books_repository.h @@ -130,8 +130,8 @@ public: if (results.RowCount() == 1) { Books entry{}; - entry.name = row[0]; - entry.txtfile = row[1]; + entry.name = row[0] ? row[0] : ""; + entry.txtfile = row[1] ? row[1] : ""; entry.language = atoi(row[2]); return entry; @@ -251,8 +251,8 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Books entry{}; - entry.name = row[0]; - entry.txtfile = row[1]; + entry.name = row[0] ? row[0] : ""; + entry.txtfile = row[1] ? row[1] : ""; entry.language = atoi(row[2]); all_entries.push_back(entry); @@ -278,8 +278,8 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Books entry{}; - entry.name = row[0]; - entry.txtfile = row[1]; + entry.name = row[0] ? row[0] : ""; + entry.txtfile = row[1] ? row[1] : ""; entry.language = atoi(row[2]); all_entries.push_back(entry); diff --git a/common/repositories/bug_reports_repository.h b/common/repositories/bug_reports_repository.h index f58d2e121..06f16ea50 100644 --- a/common/repositories/bug_reports_repository.h +++ b/common/repositories/bug_reports_repository.h @@ -218,37 +218,37 @@ public: BugReports entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.client_version_id = atoi(row[2]); - entry.client_version_name = row[3]; + entry.client_version_name = row[3] ? row[3] : ""; entry.account_id = atoi(row[4]); entry.character_id = atoi(row[5]); - entry.character_name = row[6]; + entry.character_name = row[6] ? row[6] : ""; entry.reporter_spoof = atoi(row[7]); entry.category_id = atoi(row[8]); - entry.category_name = row[9]; - entry.reporter_name = row[10]; - entry.ui_path = row[11]; + entry.category_name = row[9] ? row[9] : ""; + entry.reporter_name = row[10] ? row[10] : ""; + entry.ui_path = row[11] ? row[11] : ""; entry.pos_x = atof(row[12]); entry.pos_y = atof(row[13]); entry.pos_z = atof(row[14]); entry.heading = atoi(row[15]); entry.time_played = atoi(row[16]); entry.target_id = atoi(row[17]); - entry.target_name = row[18]; + entry.target_name = row[18] ? row[18] : ""; entry.optional_info_mask = atoi(row[19]); entry._can_duplicate = atoi(row[20]); entry._crash_bug = atoi(row[21]); entry._target_info = atoi(row[22]); entry._character_flags = atoi(row[23]); entry._unknown_value = atoi(row[24]); - entry.bug_report = row[25]; - entry.system_info = row[26]; - entry.report_datetime = row[27]; + entry.bug_report = row[25] ? row[25] : ""; + entry.system_info = row[26] ? row[26] : ""; + entry.report_datetime = row[27] ? row[27] : ""; entry.bug_status = atoi(row[28]); - entry.last_review = row[29]; - entry.last_reviewer = row[30]; - entry.reviewer_notes = row[31]; + entry.last_review = row[29] ? row[29] : ""; + entry.last_reviewer = row[30] ? row[30] : ""; + entry.reviewer_notes = row[31] ? row[31] : ""; return entry; } @@ -455,37 +455,37 @@ public: BugReports entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.client_version_id = atoi(row[2]); - entry.client_version_name = row[3]; + entry.client_version_name = row[3] ? row[3] : ""; entry.account_id = atoi(row[4]); entry.character_id = atoi(row[5]); - entry.character_name = row[6]; + entry.character_name = row[6] ? row[6] : ""; entry.reporter_spoof = atoi(row[7]); entry.category_id = atoi(row[8]); - entry.category_name = row[9]; - entry.reporter_name = row[10]; - entry.ui_path = row[11]; + entry.category_name = row[9] ? row[9] : ""; + entry.reporter_name = row[10] ? row[10] : ""; + entry.ui_path = row[11] ? row[11] : ""; entry.pos_x = atof(row[12]); entry.pos_y = atof(row[13]); entry.pos_z = atof(row[14]); entry.heading = atoi(row[15]); entry.time_played = atoi(row[16]); entry.target_id = atoi(row[17]); - entry.target_name = row[18]; + entry.target_name = row[18] ? row[18] : ""; entry.optional_info_mask = atoi(row[19]); entry._can_duplicate = atoi(row[20]); entry._crash_bug = atoi(row[21]); entry._target_info = atoi(row[22]); entry._character_flags = atoi(row[23]); entry._unknown_value = atoi(row[24]); - entry.bug_report = row[25]; - entry.system_info = row[26]; - entry.report_datetime = row[27]; + entry.bug_report = row[25] ? row[25] : ""; + entry.system_info = row[26] ? row[26] : ""; + entry.report_datetime = row[27] ? row[27] : ""; entry.bug_status = atoi(row[28]); - entry.last_review = row[29]; - entry.last_reviewer = row[30]; - entry.reviewer_notes = row[31]; + entry.last_review = row[29] ? row[29] : ""; + entry.last_reviewer = row[30] ? row[30] : ""; + entry.reviewer_notes = row[31] ? row[31] : ""; all_entries.push_back(entry); } @@ -511,37 +511,37 @@ public: BugReports entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.client_version_id = atoi(row[2]); - entry.client_version_name = row[3]; + entry.client_version_name = row[3] ? row[3] : ""; entry.account_id = atoi(row[4]); entry.character_id = atoi(row[5]); - entry.character_name = row[6]; + entry.character_name = row[6] ? row[6] : ""; entry.reporter_spoof = atoi(row[7]); entry.category_id = atoi(row[8]); - entry.category_name = row[9]; - entry.reporter_name = row[10]; - entry.ui_path = row[11]; + entry.category_name = row[9] ? row[9] : ""; + entry.reporter_name = row[10] ? row[10] : ""; + entry.ui_path = row[11] ? row[11] : ""; entry.pos_x = atof(row[12]); entry.pos_y = atof(row[13]); entry.pos_z = atof(row[14]); entry.heading = atoi(row[15]); entry.time_played = atoi(row[16]); entry.target_id = atoi(row[17]); - entry.target_name = row[18]; + entry.target_name = row[18] ? row[18] : ""; entry.optional_info_mask = atoi(row[19]); entry._can_duplicate = atoi(row[20]); entry._crash_bug = atoi(row[21]); entry._target_info = atoi(row[22]); entry._character_flags = atoi(row[23]); entry._unknown_value = atoi(row[24]); - entry.bug_report = row[25]; - entry.system_info = row[26]; - entry.report_datetime = row[27]; + entry.bug_report = row[25] ? row[25] : ""; + entry.system_info = row[26] ? row[26] : ""; + entry.report_datetime = row[27] ? row[27] : ""; entry.bug_status = atoi(row[28]); - entry.last_review = row[29]; - entry.last_reviewer = row[30]; - entry.reviewer_notes = row[31]; + entry.last_review = row[29] ? row[29] : ""; + entry.last_reviewer = row[30] ? row[30] : ""; + entry.reviewer_notes = row[31] ? row[31] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/bugs_repository.h b/common/repositories/bugs_repository.h index 85ebb2852..b0d8f45f4 100644 --- a/common/repositories/bugs_repository.h +++ b/common/repositories/bugs_repository.h @@ -161,17 +161,17 @@ public: Bugs entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; - entry.name = row[2]; - entry.ui = row[3]; + entry.zone = row[1] ? row[1] : ""; + entry.name = row[2] ? row[2] : ""; + entry.ui = row[3] ? row[3] : ""; entry.x = atof(row[4]); entry.y = atof(row[5]); entry.z = atof(row[6]); - entry.type = row[7]; + entry.type = row[7] ? row[7] : ""; entry.flag = atoi(row[8]); - entry.target = row[9]; - entry.bug = row[10]; - entry.date = row[11]; + entry.target = row[9] ? row[9] : ""; + entry.bug = row[10] ? row[10] : ""; + entry.date = row[11] ? row[11] : ""; entry.status = atoi(row[12]); return entry; @@ -322,17 +322,17 @@ public: Bugs entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; - entry.name = row[2]; - entry.ui = row[3]; + entry.zone = row[1] ? row[1] : ""; + entry.name = row[2] ? row[2] : ""; + entry.ui = row[3] ? row[3] : ""; entry.x = atof(row[4]); entry.y = atof(row[5]); entry.z = atof(row[6]); - entry.type = row[7]; + entry.type = row[7] ? row[7] : ""; entry.flag = atoi(row[8]); - entry.target = row[9]; - entry.bug = row[10]; - entry.date = row[11]; + entry.target = row[9] ? row[9] : ""; + entry.bug = row[10] ? row[10] : ""; + entry.date = row[11] ? row[11] : ""; entry.status = atoi(row[12]); all_entries.push_back(entry); @@ -359,17 +359,17 @@ public: Bugs entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; - entry.name = row[2]; - entry.ui = row[3]; + entry.zone = row[1] ? row[1] : ""; + entry.name = row[2] ? row[2] : ""; + entry.ui = row[3] ? row[3] : ""; entry.x = atof(row[4]); entry.y = atof(row[5]); entry.z = atof(row[6]); - entry.type = row[7]; + entry.type = row[7] ? row[7] : ""; entry.flag = atoi(row[8]); - entry.target = row[9]; - entry.bug = row[10]; - entry.date = row[11]; + entry.target = row[9] ? row[9] : ""; + entry.bug = row[10] ? row[10] : ""; + entry.date = row[11] ? row[11] : ""; entry.status = atoi(row[12]); all_entries.push_back(entry); diff --git a/common/repositories/buyer_repository.h b/common/repositories/buyer_repository.h index 3c3d85d9b..45c138b90 100644 --- a/common/repositories/buyer_repository.h +++ b/common/repositories/buyer_repository.h @@ -142,7 +142,7 @@ public: entry.charid = atoi(row[0]); entry.buyslot = atoi(row[1]); entry.itemid = atoi(row[2]); - entry.itemname = row[3]; + entry.itemname = row[3] ? row[3] : ""; entry.quantity = atoi(row[4]); entry.price = atoi(row[5]); @@ -272,7 +272,7 @@ public: entry.charid = atoi(row[0]); entry.buyslot = atoi(row[1]); entry.itemid = atoi(row[2]); - entry.itemname = row[3]; + entry.itemname = row[3] ? row[3] : ""; entry.quantity = atoi(row[4]); entry.price = atoi(row[5]); @@ -302,7 +302,7 @@ public: entry.charid = atoi(row[0]); entry.buyslot = atoi(row[1]); entry.itemid = atoi(row[2]); - entry.itemname = row[3]; + entry.itemname = row[3] ? row[3] : ""; entry.quantity = atoi(row[4]); entry.price = atoi(row[5]); diff --git a/common/repositories/character_bandolier_repository.h b/common/repositories/character_bandolier_repository.h index 138882959..446ae5b0f 100644 --- a/common/repositories/character_bandolier_repository.h +++ b/common/repositories/character_bandolier_repository.h @@ -144,7 +144,7 @@ public: entry.bandolier_slot = atoi(row[2]); entry.item_id = atoi(row[3]); entry.icon = atoi(row[4]); - entry.bandolier_name = row[5]; + entry.bandolier_name = row[5] ? row[5] : ""; return entry; } @@ -271,7 +271,7 @@ public: entry.bandolier_slot = atoi(row[2]); entry.item_id = atoi(row[3]); entry.icon = atoi(row[4]); - entry.bandolier_name = row[5]; + entry.bandolier_name = row[5] ? row[5] : ""; all_entries.push_back(entry); } @@ -301,7 +301,7 @@ public: entry.bandolier_slot = atoi(row[2]); entry.item_id = atoi(row[3]); entry.icon = atoi(row[4]); - entry.bandolier_name = row[5]; + entry.bandolier_name = row[5] ? row[5] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/character_buffs_repository.h b/common/repositories/character_buffs_repository.h index cebad8ad6..a167a6d55 100644 --- a/common/repositories/character_buffs_repository.h +++ b/common/repositories/character_buffs_repository.h @@ -176,7 +176,7 @@ public: entry.slot_id = atoi(row[1]); entry.spell_id = atoi(row[2]); entry.caster_level = atoi(row[3]); - entry.caster_name = row[4]; + entry.caster_name = row[4] ? row[4] : ""; entry.ticsremaining = atoi(row[5]); entry.counters = atoi(row[6]); entry.numhits = atoi(row[7]); @@ -350,7 +350,7 @@ public: entry.slot_id = atoi(row[1]); entry.spell_id = atoi(row[2]); entry.caster_level = atoi(row[3]); - entry.caster_name = row[4]; + entry.caster_name = row[4] ? row[4] : ""; entry.ticsremaining = atoi(row[5]); entry.counters = atoi(row[6]); entry.numhits = atoi(row[7]); @@ -391,7 +391,7 @@ public: entry.slot_id = atoi(row[1]); entry.spell_id = atoi(row[2]); entry.caster_level = atoi(row[3]); - entry.caster_name = row[4]; + entry.caster_name = row[4] ? row[4] : ""; entry.ticsremaining = atoi(row[5]); entry.counters = atoi(row[6]); entry.numhits = atoi(row[7]); diff --git a/common/repositories/character_corpses_repository.h b/common/repositories/character_corpses_repository.h index 7ba5f98e8..3299a2e10 100644 --- a/common/repositories/character_corpses_repository.h +++ b/common/repositories/character_corpses_repository.h @@ -264,14 +264,14 @@ public: entry.id = atoi(row[0]); entry.charid = atoi(row[1]); - entry.charname = row[2]; + entry.charname = row[2] ? row[2] : ""; entry.zone_id = atoi(row[3]); entry.instance_id = atoi(row[4]); entry.x = atof(row[5]); entry.y = atof(row[6]); entry.z = atof(row[7]); entry.heading = atof(row[8]); - entry.time_of_death = row[9]; + entry.time_of_death = row[9] ? row[9] : ""; entry.guild_consent_id = atoi(row[10]); entry.is_rezzed = atoi(row[11]); entry.is_buried = atoi(row[12]); @@ -561,14 +561,14 @@ public: entry.id = atoi(row[0]); entry.charid = atoi(row[1]); - entry.charname = row[2]; + entry.charname = row[2] ? row[2] : ""; entry.zone_id = atoi(row[3]); entry.instance_id = atoi(row[4]); entry.x = atof(row[5]); entry.y = atof(row[6]); entry.z = atof(row[7]); entry.heading = atof(row[8]); - entry.time_of_death = row[9]; + entry.time_of_death = row[9] ? row[9] : ""; entry.guild_consent_id = atoi(row[10]); entry.is_rezzed = atoi(row[11]); entry.is_buried = atoi(row[12]); @@ -632,14 +632,14 @@ public: entry.id = atoi(row[0]); entry.charid = atoi(row[1]); - entry.charname = row[2]; + entry.charname = row[2] ? row[2] : ""; entry.zone_id = atoi(row[3]); entry.instance_id = atoi(row[4]); entry.x = atof(row[5]); entry.y = atof(row[6]); entry.z = atof(row[7]); entry.heading = atof(row[8]); - entry.time_of_death = row[9]; + entry.time_of_death = row[9] ? row[9] : ""; entry.guild_consent_id = atoi(row[10]); entry.is_rezzed = atoi(row[11]); entry.is_buried = atoi(row[12]); diff --git a/common/repositories/character_data_repository.h b/common/repositories/character_data_repository.h index 605524bf5..3e5f0749d 100644 --- a/common/repositories/character_data_repository.h +++ b/common/repositories/character_data_repository.h @@ -429,10 +429,10 @@ public: entry.id = atoi(row[0]); entry.account_id = atoi(row[1]); - entry.name = row[2]; - entry.last_name = row[3]; - entry.title = row[4]; - entry.suffix = row[5]; + entry.name = row[2] ? row[2] : ""; + entry.last_name = row[3] ? row[3] : ""; + entry.title = row[4] ? row[4] : ""; + entry.suffix = row[5] ? row[5] : ""; entry.zone_id = atoi(row[6]); entry.zone_instance = atoi(row[7]); entry.y = atof(row[8]); @@ -519,7 +519,7 @@ public: entry.autosplit_enabled = atoi(row[89]); entry.lfp = atoi(row[90]); entry.lfg = atoi(row[91]); - entry.mailkey = row[92]; + entry.mailkey = row[92] ? row[92] : ""; entry.xtargets = atoi(row[93]); entry.firstlogon = atoi(row[94]); entry.e_aa_effects = atoi(row[95]); @@ -528,7 +528,7 @@ public: entry.aa_points_spent_old = atoi(row[98]); entry.aa_points_old = atoi(row[99]); entry.e_last_invsnapshot = atoi(row[100]); - entry.deleted_at = row[101]; + entry.deleted_at = row[101] ? row[101] : ""; return entry; } @@ -946,10 +946,10 @@ public: entry.id = atoi(row[0]); entry.account_id = atoi(row[1]); - entry.name = row[2]; - entry.last_name = row[3]; - entry.title = row[4]; - entry.suffix = row[5]; + entry.name = row[2] ? row[2] : ""; + entry.last_name = row[3] ? row[3] : ""; + entry.title = row[4] ? row[4] : ""; + entry.suffix = row[5] ? row[5] : ""; entry.zone_id = atoi(row[6]); entry.zone_instance = atoi(row[7]); entry.y = atof(row[8]); @@ -1036,7 +1036,7 @@ public: entry.autosplit_enabled = atoi(row[89]); entry.lfp = atoi(row[90]); entry.lfg = atoi(row[91]); - entry.mailkey = row[92]; + entry.mailkey = row[92] ? row[92] : ""; entry.xtargets = atoi(row[93]); entry.firstlogon = atoi(row[94]); entry.e_aa_effects = atoi(row[95]); @@ -1045,7 +1045,7 @@ public: entry.aa_points_spent_old = atoi(row[98]); entry.aa_points_old = atoi(row[99]); entry.e_last_invsnapshot = atoi(row[100]); - entry.deleted_at = row[101]; + entry.deleted_at = row[101] ? row[101] : ""; all_entries.push_back(entry); } @@ -1072,10 +1072,10 @@ public: entry.id = atoi(row[0]); entry.account_id = atoi(row[1]); - entry.name = row[2]; - entry.last_name = row[3]; - entry.title = row[4]; - entry.suffix = row[5]; + entry.name = row[2] ? row[2] : ""; + entry.last_name = row[3] ? row[3] : ""; + entry.title = row[4] ? row[4] : ""; + entry.suffix = row[5] ? row[5] : ""; entry.zone_id = atoi(row[6]); entry.zone_instance = atoi(row[7]); entry.y = atof(row[8]); @@ -1162,7 +1162,7 @@ public: entry.autosplit_enabled = atoi(row[89]); entry.lfp = atoi(row[90]); entry.lfg = atoi(row[91]); - entry.mailkey = row[92]; + entry.mailkey = row[92] ? row[92] : ""; entry.xtargets = atoi(row[93]); entry.firstlogon = atoi(row[94]); entry.e_aa_effects = atoi(row[95]); @@ -1171,7 +1171,7 @@ public: entry.aa_points_spent_old = atoi(row[98]); entry.aa_points_old = atoi(row[99]); entry.e_last_invsnapshot = atoi(row[100]); - entry.deleted_at = row[101]; + entry.deleted_at = row[101] ? row[101] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/character_inspect_messages_repository.h b/common/repositories/character_inspect_messages_repository.h index 4a087e994..7595a8cfe 100644 --- a/common/repositories/character_inspect_messages_repository.h +++ b/common/repositories/character_inspect_messages_repository.h @@ -128,7 +128,7 @@ public: CharacterInspectMessages entry{}; entry.id = atoi(row[0]); - entry.inspect_message = row[1]; + entry.inspect_message = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: CharacterInspectMessages entry{}; entry.id = atoi(row[0]); - entry.inspect_message = row[1]; + entry.inspect_message = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: CharacterInspectMessages entry{}; entry.id = atoi(row[0]); - entry.inspect_message = row[1]; + entry.inspect_message = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/character_pet_buffs_repository.h b/common/repositories/character_pet_buffs_repository.h index b5de59be9..a34c9dccf 100644 --- a/common/repositories/character_pet_buffs_repository.h +++ b/common/repositories/character_pet_buffs_repository.h @@ -159,7 +159,7 @@ public: entry.slot = atoi(row[2]); entry.spell_id = atoi(row[3]); entry.caster_level = atoi(row[4]); - entry.castername = row[5]; + entry.castername = row[5] ? row[5] : ""; entry.ticsremaining = atoi(row[6]); entry.counters = atoi(row[7]); entry.numhits = atoi(row[8]); @@ -306,7 +306,7 @@ public: entry.slot = atoi(row[2]); entry.spell_id = atoi(row[3]); entry.caster_level = atoi(row[4]); - entry.castername = row[5]; + entry.castername = row[5] ? row[5] : ""; entry.ticsremaining = atoi(row[6]); entry.counters = atoi(row[7]); entry.numhits = atoi(row[8]); @@ -341,7 +341,7 @@ public: entry.slot = atoi(row[2]); entry.spell_id = atoi(row[3]); entry.caster_level = atoi(row[4]); - entry.castername = row[5]; + entry.castername = row[5] ? row[5] : ""; entry.ticsremaining = atoi(row[6]); entry.counters = atoi(row[7]); entry.numhits = atoi(row[8]); diff --git a/common/repositories/character_pet_info_repository.h b/common/repositories/character_pet_info_repository.h index 9adb9b628..7f72eeed2 100644 --- a/common/repositories/character_pet_info_repository.h +++ b/common/repositories/character_pet_info_repository.h @@ -147,7 +147,7 @@ public: entry.char_id = atoi(row[0]); entry.pet = atoi(row[1]); - entry.petname = row[2]; + entry.petname = row[2] ? row[2] : ""; entry.petpower = atoi(row[3]); entry.spell_id = atoi(row[4]); entry.hp = atoi(row[5]); @@ -285,7 +285,7 @@ public: entry.char_id = atoi(row[0]); entry.pet = atoi(row[1]); - entry.petname = row[2]; + entry.petname = row[2] ? row[2] : ""; entry.petpower = atoi(row[3]); entry.spell_id = atoi(row[4]); entry.hp = atoi(row[5]); @@ -317,7 +317,7 @@ public: entry.char_id = atoi(row[0]); entry.pet = atoi(row[1]); - entry.petname = row[2]; + entry.petname = row[2] ? row[2] : ""; entry.petpower = atoi(row[3]); entry.spell_id = atoi(row[4]); entry.hp = atoi(row[5]); diff --git a/common/repositories/chatchannels_repository.h b/common/repositories/chatchannels_repository.h index 302526ecd..06f8511c6 100644 --- a/common/repositories/chatchannels_repository.h +++ b/common/repositories/chatchannels_repository.h @@ -133,9 +133,9 @@ public: if (results.RowCount() == 1) { Chatchannels entry{}; - entry.name = row[0]; - entry.owner = row[1]; - entry.password = row[2]; + entry.name = row[0] ? row[0] : ""; + entry.owner = row[1] ? row[1] : ""; + entry.password = row[2] ? row[2] : ""; entry.minstatus = atoi(row[3]); return entry; @@ -258,9 +258,9 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Chatchannels entry{}; - entry.name = row[0]; - entry.owner = row[1]; - entry.password = row[2]; + entry.name = row[0] ? row[0] : ""; + entry.owner = row[1] ? row[1] : ""; + entry.password = row[2] ? row[2] : ""; entry.minstatus = atoi(row[3]); all_entries.push_back(entry); @@ -286,9 +286,9 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Chatchannels entry{}; - entry.name = row[0]; - entry.owner = row[1]; - entry.password = row[2]; + entry.name = row[0] ? row[0] : ""; + entry.owner = row[1] ? row[1] : ""; + entry.password = row[2] ? row[2] : ""; entry.minstatus = atoi(row[3]); all_entries.push_back(entry); diff --git a/common/repositories/command_settings_repository.h b/common/repositories/command_settings_repository.h index 2b9fb3d50..a5622e537 100644 --- a/common/repositories/command_settings_repository.h +++ b/common/repositories/command_settings_repository.h @@ -130,9 +130,9 @@ public: if (results.RowCount() == 1) { CommandSettings entry{}; - entry.command = row[0]; + entry.command = row[0] ? row[0] : ""; entry.access = atoi(row[1]); - entry.aliases = row[2]; + entry.aliases = row[2] ? row[2] : ""; return entry; } @@ -251,9 +251,9 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { CommandSettings entry{}; - entry.command = row[0]; + entry.command = row[0] ? row[0] : ""; entry.access = atoi(row[1]); - entry.aliases = row[2]; + entry.aliases = row[2] ? row[2] : ""; all_entries.push_back(entry); } @@ -278,9 +278,9 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { CommandSettings entry{}; - entry.command = row[0]; + entry.command = row[0] ? row[0] : ""; entry.access = atoi(row[1]); - entry.aliases = row[2]; + entry.aliases = row[2] ? row[2] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/data_buckets_repository.h b/common/repositories/data_buckets_repository.h index 950111133..4c8e6ccf5 100644 --- a/common/repositories/data_buckets_repository.h +++ b/common/repositories/data_buckets_repository.h @@ -134,8 +134,8 @@ public: DataBuckets entry{}; entry.id = atoi(row[0]); - entry.key = row[1]; - entry.value = row[2]; + entry.key = row[1] ? row[1] : ""; + entry.value = row[2] ? row[2] : ""; entry.expires = atoi(row[3]); return entry; @@ -259,8 +259,8 @@ public: DataBuckets entry{}; entry.id = atoi(row[0]); - entry.key = row[1]; - entry.value = row[2]; + entry.key = row[1] ? row[1] : ""; + entry.value = row[2] ? row[2] : ""; entry.expires = atoi(row[3]); all_entries.push_back(entry); @@ -287,8 +287,8 @@ public: DataBuckets entry{}; entry.id = atoi(row[0]); - entry.key = row[1]; - entry.value = row[2]; + entry.key = row[1] ? row[1] : ""; + entry.value = row[2] ? row[2] : ""; entry.expires = atoi(row[3]); all_entries.push_back(entry); diff --git a/common/repositories/db_str_repository.h b/common/repositories/db_str_repository.h index fd7d3b8c1..4fe546ea0 100644 --- a/common/repositories/db_str_repository.h +++ b/common/repositories/db_str_repository.h @@ -132,7 +132,7 @@ public: entry.id = atoi(row[0]); entry.type = atoi(row[1]); - entry.value = row[2]; + entry.value = row[2] ? row[2] : ""; return entry; } @@ -250,7 +250,7 @@ public: entry.id = atoi(row[0]); entry.type = atoi(row[1]); - entry.value = row[2]; + entry.value = row[2] ? row[2] : ""; all_entries.push_back(entry); } @@ -277,7 +277,7 @@ public: entry.id = atoi(row[0]); entry.type = atoi(row[1]); - entry.value = row[2]; + entry.value = row[2] ? row[2] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/discovered_items_repository.h b/common/repositories/discovered_items_repository.h index a424c02cd..293b6146d 100644 --- a/common/repositories/discovered_items_repository.h +++ b/common/repositories/discovered_items_repository.h @@ -134,7 +134,7 @@ public: DiscoveredItems entry{}; entry.item_id = atoi(row[0]); - entry.char_name = row[1]; + entry.char_name = row[1] ? row[1] : ""; entry.discovered_date = atoi(row[2]); entry.account_status = atoi(row[3]); @@ -259,7 +259,7 @@ public: DiscoveredItems entry{}; entry.item_id = atoi(row[0]); - entry.char_name = row[1]; + entry.char_name = row[1] ? row[1] : ""; entry.discovered_date = atoi(row[2]); entry.account_status = atoi(row[3]); @@ -287,7 +287,7 @@ public: DiscoveredItems entry{}; entry.item_id = atoi(row[0]); - entry.char_name = row[1]; + entry.char_name = row[1] ? row[1] : ""; entry.discovered_date = atoi(row[2]); entry.account_status = atoi(row[3]); diff --git a/common/repositories/doors_repository.h b/common/repositories/doors_repository.h index 34857f08a..dda6efa9d 100644 --- a/common/repositories/doors_repository.h +++ b/common/repositories/doors_repository.h @@ -216,9 +216,9 @@ public: entry.id = atoi(row[0]); entry.doorid = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.version = atoi(row[3]); - entry.name = row[4]; + entry.name = row[4] ? row[4] : ""; entry.pos_y = atof(row[5]); entry.pos_x = atof(row[6]); entry.pos_z = atof(row[7]); @@ -233,7 +233,7 @@ public: entry.disable_timer = atoi(row[16]); entry.doorisopen = atoi(row[17]); entry.door_param = atoi(row[18]); - entry.dest_zone = row[19]; + entry.dest_zone = row[19] ? row[19] : ""; entry.dest_instance = atoi(row[20]); entry.dest_x = atof(row[21]); entry.dest_y = atof(row[22]); @@ -449,9 +449,9 @@ public: entry.id = atoi(row[0]); entry.doorid = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.version = atoi(row[3]); - entry.name = row[4]; + entry.name = row[4] ? row[4] : ""; entry.pos_y = atof(row[5]); entry.pos_x = atof(row[6]); entry.pos_z = atof(row[7]); @@ -466,7 +466,7 @@ public: entry.disable_timer = atoi(row[16]); entry.doorisopen = atoi(row[17]); entry.door_param = atoi(row[18]); - entry.dest_zone = row[19]; + entry.dest_zone = row[19] ? row[19] : ""; entry.dest_instance = atoi(row[20]); entry.dest_x = atof(row[21]); entry.dest_y = atof(row[22]); @@ -504,9 +504,9 @@ public: entry.id = atoi(row[0]); entry.doorid = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.version = atoi(row[3]); - entry.name = row[4]; + entry.name = row[4] ? row[4] : ""; entry.pos_y = atof(row[5]); entry.pos_x = atof(row[6]); entry.pos_z = atof(row[7]); @@ -521,7 +521,7 @@ public: entry.disable_timer = atoi(row[16]); entry.doorisopen = atoi(row[17]); entry.door_param = atoi(row[18]); - entry.dest_zone = row[19]; + entry.dest_zone = row[19] ? row[19] : ""; entry.dest_instance = atoi(row[20]); entry.dest_x = atof(row[21]); entry.dest_y = atof(row[22]); diff --git a/common/repositories/eventlog_repository.h b/common/repositories/eventlog_repository.h index 5f95682ef..af5eabba0 100644 --- a/common/repositories/eventlog_repository.h +++ b/common/repositories/eventlog_repository.h @@ -152,14 +152,14 @@ public: Eventlog entry{}; entry.id = atoi(row[0]); - entry.accountname = row[1]; + entry.accountname = row[1] ? row[1] : ""; entry.accountid = atoi(row[2]); entry.status = atoi(row[3]); - entry.charname = row[4]; - entry.target = row[5]; - entry.time = row[6]; - entry.descriptiontype = row[7]; - entry.description = row[8]; + entry.charname = row[4] ? row[4] : ""; + entry.target = row[5] ? row[5] : ""; + entry.time = row[6] ? row[6] : ""; + entry.descriptiontype = row[7] ? row[7] : ""; + entry.description = row[8] ? row[8] : ""; entry.event_nid = atoi(row[9]); return entry; @@ -301,14 +301,14 @@ public: Eventlog entry{}; entry.id = atoi(row[0]); - entry.accountname = row[1]; + entry.accountname = row[1] ? row[1] : ""; entry.accountid = atoi(row[2]); entry.status = atoi(row[3]); - entry.charname = row[4]; - entry.target = row[5]; - entry.time = row[6]; - entry.descriptiontype = row[7]; - entry.description = row[8]; + entry.charname = row[4] ? row[4] : ""; + entry.target = row[5] ? row[5] : ""; + entry.time = row[6] ? row[6] : ""; + entry.descriptiontype = row[7] ? row[7] : ""; + entry.description = row[8] ? row[8] : ""; entry.event_nid = atoi(row[9]); all_entries.push_back(entry); @@ -335,14 +335,14 @@ public: Eventlog entry{}; entry.id = atoi(row[0]); - entry.accountname = row[1]; + entry.accountname = row[1] ? row[1] : ""; entry.accountid = atoi(row[2]); entry.status = atoi(row[3]); - entry.charname = row[4]; - entry.target = row[5]; - entry.time = row[6]; - entry.descriptiontype = row[7]; - entry.description = row[8]; + entry.charname = row[4] ? row[4] : ""; + entry.target = row[5] ? row[5] : ""; + entry.time = row[6] ? row[6] : ""; + entry.descriptiontype = row[7] ? row[7] : ""; + entry.description = row[8] ? row[8] : ""; entry.event_nid = atoi(row[9]); all_entries.push_back(entry); diff --git a/common/repositories/faction_list_mod_repository.h b/common/repositories/faction_list_mod_repository.h index 8e1374ce1..5c5853d29 100644 --- a/common/repositories/faction_list_mod_repository.h +++ b/common/repositories/faction_list_mod_repository.h @@ -136,7 +136,7 @@ public: entry.id = atoi(row[0]); entry.faction_id = atoi(row[1]); entry.mod = atoi(row[2]); - entry.mod_name = row[3]; + entry.mod_name = row[3] ? row[3] : ""; return entry; } @@ -261,7 +261,7 @@ public: entry.id = atoi(row[0]); entry.faction_id = atoi(row[1]); entry.mod = atoi(row[2]); - entry.mod_name = row[3]; + entry.mod_name = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -289,7 +289,7 @@ public: entry.id = atoi(row[0]); entry.faction_id = atoi(row[1]); entry.mod = atoi(row[2]); - entry.mod_name = row[3]; + entry.mod_name = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/faction_list_repository.h b/common/repositories/faction_list_repository.h index 50c141456..8d3f1b085 100644 --- a/common/repositories/faction_list_repository.h +++ b/common/repositories/faction_list_repository.h @@ -131,7 +131,7 @@ public: FactionList entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.base = atoi(row[2]); return entry; @@ -252,7 +252,7 @@ public: FactionList entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.base = atoi(row[2]); all_entries.push_back(entry); @@ -279,7 +279,7 @@ public: FactionList entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.base = atoi(row[2]); all_entries.push_back(entry); diff --git a/common/repositories/friends_repository.h b/common/repositories/friends_repository.h index 55746a3f2..51e33f5c3 100644 --- a/common/repositories/friends_repository.h +++ b/common/repositories/friends_repository.h @@ -132,7 +132,7 @@ public: entry.charid = atoi(row[0]); entry.type = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; return entry; } @@ -250,7 +250,7 @@ public: entry.charid = atoi(row[0]); entry.type = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; all_entries.push_back(entry); } @@ -277,7 +277,7 @@ public: entry.charid = atoi(row[0]); entry.type = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/global_loot_repository.h b/common/repositories/global_loot_repository.h index ad566baf7..1b53d432d 100644 --- a/common/repositories/global_loot_repository.h +++ b/common/repositories/global_loot_repository.h @@ -161,17 +161,17 @@ public: GlobalLoot entry{}; entry.id = atoi(row[0]); - entry.description = row[1]; + entry.description = row[1] ? row[1] : ""; entry.loottable_id = atoi(row[2]); entry.enabled = atoi(row[3]); entry.min_level = atoi(row[4]); entry.max_level = atoi(row[5]); entry.rare = atoi(row[6]); entry.raid = atoi(row[7]); - entry.race = row[8]; - entry.class = row[9]; - entry.bodytype = row[10]; - entry.zone = row[11]; + entry.race = row[8] ? row[8] : ""; + entry.class = row[9] ? row[9] : ""; + entry.bodytype = row[10] ? row[10] : ""; + entry.zone = row[11] ? row[11] : ""; entry.hot_zone = atoi(row[12]); return entry; @@ -322,17 +322,17 @@ public: GlobalLoot entry{}; entry.id = atoi(row[0]); - entry.description = row[1]; + entry.description = row[1] ? row[1] : ""; entry.loottable_id = atoi(row[2]); entry.enabled = atoi(row[3]); entry.min_level = atoi(row[4]); entry.max_level = atoi(row[5]); entry.rare = atoi(row[6]); entry.raid = atoi(row[7]); - entry.race = row[8]; - entry.class = row[9]; - entry.bodytype = row[10]; - entry.zone = row[11]; + entry.race = row[8] ? row[8] : ""; + entry.class = row[9] ? row[9] : ""; + entry.bodytype = row[10] ? row[10] : ""; + entry.zone = row[11] ? row[11] : ""; entry.hot_zone = atoi(row[12]); all_entries.push_back(entry); @@ -359,17 +359,17 @@ public: GlobalLoot entry{}; entry.id = atoi(row[0]); - entry.description = row[1]; + entry.description = row[1] ? row[1] : ""; entry.loottable_id = atoi(row[2]); entry.enabled = atoi(row[3]); entry.min_level = atoi(row[4]); entry.max_level = atoi(row[5]); entry.rare = atoi(row[6]); entry.raid = atoi(row[7]); - entry.race = row[8]; - entry.class = row[9]; - entry.bodytype = row[10]; - entry.zone = row[11]; + entry.race = row[8] ? row[8] : ""; + entry.class = row[9] ? row[9] : ""; + entry.bodytype = row[10] ? row[10] : ""; + entry.zone = row[11] ? row[11] : ""; entry.hot_zone = atoi(row[12]); all_entries.push_back(entry); diff --git a/common/repositories/gm_ips_repository.h b/common/repositories/gm_ips_repository.h index 6c371f26d..5ea9f1a42 100644 --- a/common/repositories/gm_ips_repository.h +++ b/common/repositories/gm_ips_repository.h @@ -130,9 +130,9 @@ public: if (results.RowCount() == 1) { GmIps entry{}; - entry.name = row[0]; + entry.name = row[0] ? row[0] : ""; entry.account_id = atoi(row[1]); - entry.ip_address = row[2]; + entry.ip_address = row[2] ? row[2] : ""; return entry; } @@ -248,9 +248,9 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { GmIps entry{}; - entry.name = row[0]; + entry.name = row[0] ? row[0] : ""; entry.account_id = atoi(row[1]); - entry.ip_address = row[2]; + entry.ip_address = row[2] ? row[2] : ""; all_entries.push_back(entry); } @@ -275,9 +275,9 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { GmIps entry{}; - entry.name = row[0]; + entry.name = row[0] ? row[0] : ""; entry.account_id = atoi(row[1]); - entry.ip_address = row[2]; + entry.ip_address = row[2] ? row[2] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/ground_spawns_repository.h b/common/repositories/ground_spawns_repository.h index 3b2e57674..652d7554b 100644 --- a/common/repositories/ground_spawns_repository.h +++ b/common/repositories/ground_spawns_repository.h @@ -172,10 +172,10 @@ public: entry.min_x = atof(row[6]); entry.min_y = atof(row[7]); entry.heading = atof(row[8]); - entry.name = row[9]; + entry.name = row[9] ? row[9] : ""; entry.item = atoi(row[10]); entry.max_allowed = atoi(row[11]); - entry.comment = row[12]; + entry.comment = row[12] ? row[12] : ""; entry.respawn_timer = atoi(row[13]); return entry; @@ -337,10 +337,10 @@ public: entry.min_x = atof(row[6]); entry.min_y = atof(row[7]); entry.heading = atof(row[8]); - entry.name = row[9]; + entry.name = row[9] ? row[9] : ""; entry.item = atoi(row[10]); entry.max_allowed = atoi(row[11]); - entry.comment = row[12]; + entry.comment = row[12] ? row[12] : ""; entry.respawn_timer = atoi(row[13]); all_entries.push_back(entry); @@ -375,10 +375,10 @@ public: entry.min_x = atof(row[6]); entry.min_y = atof(row[7]); entry.heading = atof(row[8]); - entry.name = row[9]; + entry.name = row[9] ? row[9] : ""; entry.item = atoi(row[10]); entry.max_allowed = atoi(row[11]); - entry.comment = row[12]; + entry.comment = row[12] ? row[12] : ""; entry.respawn_timer = atoi(row[13]); all_entries.push_back(entry); diff --git a/common/repositories/group_id_repository.h b/common/repositories/group_id_repository.h index 93f50d837..71e1be81c 100644 --- a/common/repositories/group_id_repository.h +++ b/common/repositories/group_id_repository.h @@ -135,7 +135,7 @@ public: entry.groupid = atoi(row[0]); entry.charid = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; entry.ismerc = atoi(row[3]); return entry; @@ -254,7 +254,7 @@ public: entry.groupid = atoi(row[0]); entry.charid = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; entry.ismerc = atoi(row[3]); all_entries.push_back(entry); @@ -282,7 +282,7 @@ public: entry.groupid = atoi(row[0]); entry.charid = atoi(row[1]); - entry.name = row[2]; + entry.name = row[2] ? row[2] : ""; entry.ismerc = atoi(row[3]); all_entries.push_back(entry); diff --git a/common/repositories/group_leaders_repository.h b/common/repositories/group_leaders_repository.h index 55ba5da93..f3c0eb5d7 100644 --- a/common/repositories/group_leaders_repository.h +++ b/common/repositories/group_leaders_repository.h @@ -149,13 +149,13 @@ public: GroupLeaders entry{}; entry.gid = atoi(row[0]); - entry.leadername = row[1]; - entry.marknpc = row[2]; - entry.leadershipaa = row[3]; - entry.maintank = row[4]; - entry.assist = row[5]; - entry.puller = row[6]; - entry.mentoree = row[7]; + entry.leadername = row[1] ? row[1] : ""; + entry.marknpc = row[2] ? row[2] : ""; + entry.leadershipaa = row[3] ? row[3] : ""; + entry.maintank = row[4] ? row[4] : ""; + entry.assist = row[5] ? row[5] : ""; + entry.puller = row[6] ? row[6] : ""; + entry.mentoree = row[7] ? row[7] : ""; entry.mentor_percent = atoi(row[8]); return entry; @@ -294,13 +294,13 @@ public: GroupLeaders entry{}; entry.gid = atoi(row[0]); - entry.leadername = row[1]; - entry.marknpc = row[2]; - entry.leadershipaa = row[3]; - entry.maintank = row[4]; - entry.assist = row[5]; - entry.puller = row[6]; - entry.mentoree = row[7]; + entry.leadername = row[1] ? row[1] : ""; + entry.marknpc = row[2] ? row[2] : ""; + entry.leadershipaa = row[3] ? row[3] : ""; + entry.maintank = row[4] ? row[4] : ""; + entry.assist = row[5] ? row[5] : ""; + entry.puller = row[6] ? row[6] : ""; + entry.mentoree = row[7] ? row[7] : ""; entry.mentor_percent = atoi(row[8]); all_entries.push_back(entry); @@ -327,13 +327,13 @@ public: GroupLeaders entry{}; entry.gid = atoi(row[0]); - entry.leadername = row[1]; - entry.marknpc = row[2]; - entry.leadershipaa = row[3]; - entry.maintank = row[4]; - entry.assist = row[5]; - entry.puller = row[6]; - entry.mentoree = row[7]; + entry.leadername = row[1] ? row[1] : ""; + entry.marknpc = row[2] ? row[2] : ""; + entry.leadershipaa = row[3] ? row[3] : ""; + entry.maintank = row[4] ? row[4] : ""; + entry.assist = row[5] ? row[5] : ""; + entry.puller = row[6] ? row[6] : ""; + entry.mentoree = row[7] ? row[7] : ""; entry.mentor_percent = atoi(row[8]); all_entries.push_back(entry); diff --git a/common/repositories/guild_members_repository.h b/common/repositories/guild_members_repository.h index 8ee1f3c9f..5bfa64dbd 100644 --- a/common/repositories/guild_members_repository.h +++ b/common/repositories/guild_members_repository.h @@ -155,7 +155,7 @@ public: entry.total_tribute = atoi(row[4]); entry.last_tribute = atoi(row[5]); entry.banker = atoi(row[6]); - entry.public_note = row[7]; + entry.public_note = row[7] ? row[7] : ""; entry.alt = atoi(row[8]); return entry; @@ -300,7 +300,7 @@ public: entry.total_tribute = atoi(row[4]); entry.last_tribute = atoi(row[5]); entry.banker = atoi(row[6]); - entry.public_note = row[7]; + entry.public_note = row[7] ? row[7] : ""; entry.alt = atoi(row[8]); all_entries.push_back(entry); @@ -333,7 +333,7 @@ public: entry.total_tribute = atoi(row[4]); entry.last_tribute = atoi(row[5]); entry.banker = atoi(row[6]); - entry.public_note = row[7]; + entry.public_note = row[7] ? row[7] : ""; entry.alt = atoi(row[8]); all_entries.push_back(entry); diff --git a/common/repositories/guild_ranks_repository.h b/common/repositories/guild_ranks_repository.h index 53c1f4f55..2ccb1b5e4 100644 --- a/common/repositories/guild_ranks_repository.h +++ b/common/repositories/guild_ranks_repository.h @@ -156,7 +156,7 @@ public: entry.guild_id = atoi(row[0]); entry.rank = atoi(row[1]); - entry.title = row[2]; + entry.title = row[2] ? row[2] : ""; entry.can_hear = atoi(row[3]); entry.can_speak = atoi(row[4]); entry.can_invite = atoi(row[5]); @@ -306,7 +306,7 @@ public: entry.guild_id = atoi(row[0]); entry.rank = atoi(row[1]); - entry.title = row[2]; + entry.title = row[2] ? row[2] : ""; entry.can_hear = atoi(row[3]); entry.can_speak = atoi(row[4]); entry.can_invite = atoi(row[5]); @@ -341,7 +341,7 @@ public: entry.guild_id = atoi(row[0]); entry.rank = atoi(row[1]); - entry.title = row[2]; + entry.title = row[2] ? row[2] : ""; entry.can_hear = atoi(row[3]); entry.can_speak = atoi(row[4]); entry.can_invite = atoi(row[5]); diff --git a/common/repositories/guilds_repository.h b/common/repositories/guilds_repository.h index e6e2c92f0..74eb23c94 100644 --- a/common/repositories/guilds_repository.h +++ b/common/repositories/guilds_repository.h @@ -149,14 +149,14 @@ public: Guilds entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.leader = atoi(row[2]); entry.minstatus = atoi(row[3]); - entry.motd = row[4]; + entry.motd = row[4] ? row[4] : ""; entry.tribute = atoi(row[5]); - entry.motd_setter = row[6]; - entry.channel = row[7]; - entry.url = row[8]; + entry.motd_setter = row[6] ? row[6] : ""; + entry.channel = row[7] ? row[7] : ""; + entry.url = row[8] ? row[8] : ""; return entry; } @@ -294,14 +294,14 @@ public: Guilds entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.leader = atoi(row[2]); entry.minstatus = atoi(row[3]); - entry.motd = row[4]; + entry.motd = row[4] ? row[4] : ""; entry.tribute = atoi(row[5]); - entry.motd_setter = row[6]; - entry.channel = row[7]; - entry.url = row[8]; + entry.motd_setter = row[6] ? row[6] : ""; + entry.channel = row[7] ? row[7] : ""; + entry.url = row[8] ? row[8] : ""; all_entries.push_back(entry); } @@ -327,14 +327,14 @@ public: Guilds entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.leader = atoi(row[2]); entry.minstatus = atoi(row[3]); - entry.motd = row[4]; + entry.motd = row[4] ? row[4] : ""; entry.tribute = atoi(row[5]); - entry.motd_setter = row[6]; - entry.channel = row[7]; - entry.url = row[8]; + entry.motd_setter = row[6] ? row[6] : ""; + entry.channel = row[7] ? row[7] : ""; + entry.url = row[8] ? row[8] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/hackers_repository.h b/common/repositories/hackers_repository.h index a12fcb980..ca1d9c928 100644 --- a/common/repositories/hackers_repository.h +++ b/common/repositories/hackers_repository.h @@ -140,11 +140,11 @@ public: Hackers entry{}; entry.id = atoi(row[0]); - entry.account = row[1]; - entry.name = row[2]; - entry.hacked = row[3]; - entry.zone = row[4]; - entry.date = row[5]; + entry.account = row[1] ? row[1] : ""; + entry.name = row[2] ? row[2] : ""; + entry.hacked = row[3] ? row[3] : ""; + entry.zone = row[4] ? row[4] : ""; + entry.date = row[5] ? row[5] : ""; return entry; } @@ -273,11 +273,11 @@ public: Hackers entry{}; entry.id = atoi(row[0]); - entry.account = row[1]; - entry.name = row[2]; - entry.hacked = row[3]; - entry.zone = row[4]; - entry.date = row[5]; + entry.account = row[1] ? row[1] : ""; + entry.name = row[2] ? row[2] : ""; + entry.hacked = row[3] ? row[3] : ""; + entry.zone = row[4] ? row[4] : ""; + entry.date = row[5] ? row[5] : ""; all_entries.push_back(entry); } @@ -303,11 +303,11 @@ public: Hackers entry{}; entry.id = atoi(row[0]); - entry.account = row[1]; - entry.name = row[2]; - entry.hacked = row[3]; - entry.zone = row[4]; - entry.date = row[5]; + entry.account = row[1] ? row[1] : ""; + entry.name = row[2] ? row[2] : ""; + entry.hacked = row[3] ? row[3] : ""; + entry.zone = row[4] ? row[4] : ""; + entry.date = row[5] ? row[5] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/horses_repository.h b/common/repositories/horses_repository.h index 93614a880..56d7814dc 100644 --- a/common/repositories/horses_repository.h +++ b/common/repositories/horses_repository.h @@ -139,12 +139,12 @@ public: if (results.RowCount() == 1) { Horses entry{}; - entry.filename = row[0]; + entry.filename = row[0] ? row[0] : ""; entry.race = atoi(row[1]); entry.gender = atoi(row[2]); entry.texture = atoi(row[3]); entry.mountspeed = atof(row[4]); - entry.notes = row[5]; + entry.notes = row[5] ? row[5] : ""; return entry; } @@ -272,12 +272,12 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Horses entry{}; - entry.filename = row[0]; + entry.filename = row[0] ? row[0] : ""; entry.race = atoi(row[1]); entry.gender = atoi(row[2]); entry.texture = atoi(row[3]); entry.mountspeed = atof(row[4]); - entry.notes = row[5]; + entry.notes = row[5] ? row[5] : ""; all_entries.push_back(entry); } @@ -302,12 +302,12 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Horses entry{}; - entry.filename = row[0]; + entry.filename = row[0] ? row[0] : ""; entry.race = atoi(row[1]); entry.gender = atoi(row[2]); entry.texture = atoi(row[3]); entry.mountspeed = atof(row[4]); - entry.notes = row[5]; + entry.notes = row[5] ? row[5] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/inventory_repository.h b/common/repositories/inventory_repository.h index 18964010a..7f83adcc8 100644 --- a/common/repositories/inventory_repository.h +++ b/common/repositories/inventory_repository.h @@ -181,7 +181,7 @@ public: entry.augslot5 = atoi(row[9]); entry.augslot6 = atoi(row[10]); entry.instnodrop = atoi(row[11]); - entry.custom_data = row[12]; + entry.custom_data = row[12] ? row[12] : ""; entry.ornamenticon = atoi(row[13]); entry.ornamentidfile = atoi(row[14]); entry.ornament_hero_model = atoi(row[15]); @@ -351,7 +351,7 @@ public: entry.augslot5 = atoi(row[9]); entry.augslot6 = atoi(row[10]); entry.instnodrop = atoi(row[11]); - entry.custom_data = row[12]; + entry.custom_data = row[12] ? row[12] : ""; entry.ornamenticon = atoi(row[13]); entry.ornamentidfile = atoi(row[14]); entry.ornament_hero_model = atoi(row[15]); @@ -391,7 +391,7 @@ public: entry.augslot5 = atoi(row[9]); entry.augslot6 = atoi(row[10]); entry.instnodrop = atoi(row[11]); - entry.custom_data = row[12]; + entry.custom_data = row[12] ? row[12] : ""; entry.ornamenticon = atoi(row[13]); entry.ornamentidfile = atoi(row[14]); entry.ornament_hero_model = atoi(row[15]); diff --git a/common/repositories/inventory_snapshots_repository.h b/common/repositories/inventory_snapshots_repository.h index 670576616..ee28dfc56 100644 --- a/common/repositories/inventory_snapshots_repository.h +++ b/common/repositories/inventory_snapshots_repository.h @@ -185,7 +185,7 @@ public: entry.augslot5 = atoi(row[10]); entry.augslot6 = atoi(row[11]); entry.instnodrop = atoi(row[12]); - entry.custom_data = row[13]; + entry.custom_data = row[13] ? row[13] : ""; entry.ornamenticon = atoi(row[14]); entry.ornamentidfile = atoi(row[15]); entry.ornament_hero_model = atoi(row[16]); @@ -356,7 +356,7 @@ public: entry.augslot5 = atoi(row[10]); entry.augslot6 = atoi(row[11]); entry.instnodrop = atoi(row[12]); - entry.custom_data = row[13]; + entry.custom_data = row[13] ? row[13] : ""; entry.ornamenticon = atoi(row[14]); entry.ornamentidfile = atoi(row[15]); entry.ornament_hero_model = atoi(row[16]); @@ -397,7 +397,7 @@ public: entry.augslot5 = atoi(row[10]); entry.augslot6 = atoi(row[11]); entry.instnodrop = atoi(row[12]); - entry.custom_data = row[13]; + entry.custom_data = row[13] ? row[13] : ""; entry.ornamenticon = atoi(row[14]); entry.ornamentidfile = atoi(row[15]); entry.ornament_hero_model = atoi(row[16]); diff --git a/common/repositories/ip_exemptions_repository.h b/common/repositories/ip_exemptions_repository.h index 544cb958b..ad0d0030d 100644 --- a/common/repositories/ip_exemptions_repository.h +++ b/common/repositories/ip_exemptions_repository.h @@ -131,7 +131,7 @@ public: IpExemptions entry{}; entry.exemption_id = atoi(row[0]); - entry.exemption_ip = row[1]; + entry.exemption_ip = row[1] ? row[1] : ""; entry.exemption_amount = atoi(row[2]); return entry; @@ -252,7 +252,7 @@ public: IpExemptions entry{}; entry.exemption_id = atoi(row[0]); - entry.exemption_ip = row[1]; + entry.exemption_ip = row[1] ? row[1] : ""; entry.exemption_amount = atoi(row[2]); all_entries.push_back(entry); @@ -279,7 +279,7 @@ public: IpExemptions entry{}; entry.exemption_id = atoi(row[0]); - entry.exemption_ip = row[1]; + entry.exemption_ip = row[1] ? row[1] : ""; entry.exemption_amount = atoi(row[2]); all_entries.push_back(entry); diff --git a/common/repositories/item_tick_repository.h b/common/repositories/item_tick_repository.h index f16427c95..4fb244d0d 100644 --- a/common/repositories/item_tick_repository.h +++ b/common/repositories/item_tick_repository.h @@ -143,7 +143,7 @@ public: entry.it_chance = atoi(row[1]); entry.it_level = atoi(row[2]); entry.it_id = atoi(row[3]); - entry.it_qglobal = row[4]; + entry.it_qglobal = row[4] ? row[4] : ""; entry.it_bagslot = atoi(row[5]); return entry; @@ -276,7 +276,7 @@ public: entry.it_chance = atoi(row[1]); entry.it_level = atoi(row[2]); entry.it_id = atoi(row[3]); - entry.it_qglobal = row[4]; + entry.it_qglobal = row[4] ? row[4] : ""; entry.it_bagslot = atoi(row[5]); all_entries.push_back(entry); @@ -306,7 +306,7 @@ public: entry.it_chance = atoi(row[1]); entry.it_level = atoi(row[2]); entry.it_id = atoi(row[3]); - entry.it_qglobal = row[4]; + entry.it_qglobal = row[4] ? row[4] : ""; entry.it_bagslot = atoi(row[5]); all_entries.push_back(entry); diff --git a/common/repositories/items_repository.h b/common/repositories/items_repository.h index 395fc3a4d..1ff2c3206 100644 --- a/common/repositories/items_repository.h +++ b/common/repositories/items_repository.h @@ -978,7 +978,7 @@ public: entry.id = atoi(row[0]); entry.minstatus = atoi(row[1]); - entry.Name = row[2]; + entry.Name = row[2] ? row[2] : ""; entry.aagi = atoi(row[3]); entry.ac = atoi(row[4]); entry.accuracy = atoi(row[5]); @@ -1018,11 +1018,11 @@ public: entry.book = atoi(row[39]); entry.casttime = atoi(row[40]); entry.casttime_ = atoi(row[41]); - entry.charmfile = row[42]; - entry.charmfileid = row[43]; + entry.charmfile = row[42] ? row[42] : ""; + entry.charmfileid = row[43] ? row[43] : ""; entry.classes = atoi(row[44]); entry.color = atoi(row[45]); - entry.combateffects = row[46]; + entry.combateffects = row[46] ? row[46] : ""; entry.extradmgskill = atoi(row[47]); entry.extradmgamt = atoi(row[48]); entry.price = atoi(row[49]); @@ -1047,7 +1047,7 @@ public: entry.factionmod2 = atoi(row[68]); entry.factionmod3 = atoi(row[69]); entry.factionmod4 = atoi(row[70]); - entry.filename = row[71]; + entry.filename = row[71] ? row[71] : ""; entry.focuseffect = atoi(row[72]); entry.fr = atoi(row[73]); entry.fvnodrop = atoi(row[74]); @@ -1056,14 +1056,14 @@ public: entry.hp = atoi(row[77]); entry.regen = atoi(row[78]); entry.icon = atoi(row[79]); - entry.idfile = row[80]; + entry.idfile = row[80] ? row[80] : ""; entry.itemclass = atoi(row[81]); entry.itemtype = atoi(row[82]); entry.ldonprice = atoi(row[83]); entry.ldontheme = atoi(row[84]); entry.ldonsold = atoi(row[85]); entry.light = atoi(row[86]); - entry.lore = row[87]; + entry.lore = row[87] ? row[87] : ""; entry.loregroup = atoi(row[88]); entry.magic = atoi(row[89]); entry.mana = atoi(row[90]); @@ -1110,8 +1110,8 @@ public: entry.UNK124 = atoi(row[131]); entry.attuneable = atoi(row[132]); entry.nopet = atoi(row[133]); - entry.updated = row[134]; - entry.comment = row[135]; + entry.updated = row[134] ? row[134] : ""; + entry.comment = row[135] ? row[135] : ""; entry.UNK127 = atoi(row[136]); entry.pointtype = atoi(row[137]); entry.potionbelt = atoi(row[138]); @@ -1119,7 +1119,7 @@ public: entry.stacksize = atoi(row[140]); entry.notransfer = atoi(row[141]); entry.stackable = atoi(row[142]); - entry.UNK134 = row[143]; + entry.UNK134 = row[143] ? row[143] : ""; entry.UNK137 = atoi(row[144]); entry.proceffect = atoi(row[145]); entry.proctype = atoi(row[146]); @@ -1140,12 +1140,12 @@ public: entry.scrolllevel2 = atoi(row[161]); entry.scrolllevel = atoi(row[162]); entry.UNK157 = atoi(row[163]); - entry.serialized = row[164]; - entry.verified = row[165]; - entry.serialization = row[166]; - entry.source = row[167]; + entry.serialized = row[164] ? row[164] : ""; + entry.verified = row[165] ? row[165] : ""; + entry.serialization = row[166] ? row[166] : ""; + entry.source = row[167] ? row[167] : ""; entry.UNK033 = atoi(row[168]); - entry.lorefile = row[169]; + entry.lorefile = row[169] ? row[169] : ""; entry.UNK014 = atoi(row[170]); entry.svcorruption = atoi(row[171]); entry.skillmodmax = atoi(row[172]); @@ -1159,36 +1159,36 @@ public: entry.UNK120 = atoi(row[180]); entry.UNK121 = atoi(row[181]); entry.questitemflag = atoi(row[182]); - entry.UNK132 = row[183]; + entry.UNK132 = row[183] ? row[183] : ""; entry.clickunk5 = atoi(row[184]); - entry.clickunk6 = row[185]; + entry.clickunk6 = row[185] ? row[185] : ""; entry.clickunk7 = atoi(row[186]); entry.procunk1 = atoi(row[187]); entry.procunk2 = atoi(row[188]); entry.procunk3 = atoi(row[189]); entry.procunk4 = atoi(row[190]); - entry.procunk6 = row[191]; + entry.procunk6 = row[191] ? row[191] : ""; entry.procunk7 = atoi(row[192]); entry.wornunk1 = atoi(row[193]); entry.wornunk2 = atoi(row[194]); entry.wornunk3 = atoi(row[195]); entry.wornunk4 = atoi(row[196]); entry.wornunk5 = atoi(row[197]); - entry.wornunk6 = row[198]; + entry.wornunk6 = row[198] ? row[198] : ""; entry.wornunk7 = atoi(row[199]); entry.focusunk1 = atoi(row[200]); entry.focusunk2 = atoi(row[201]); entry.focusunk3 = atoi(row[202]); entry.focusunk4 = atoi(row[203]); entry.focusunk5 = atoi(row[204]); - entry.focusunk6 = row[205]; + entry.focusunk6 = row[205] ? row[205] : ""; entry.focusunk7 = atoi(row[206]); entry.scrollunk1 = atoi(row[207]); entry.scrollunk2 = atoi(row[208]); entry.scrollunk3 = atoi(row[209]); entry.scrollunk4 = atoi(row[210]); entry.scrollunk5 = atoi(row[211]); - entry.scrollunk6 = row[212]; + entry.scrollunk6 = row[212] ? row[212] : ""; entry.scrollunk7 = atoi(row[213]); entry.UNK193 = atoi(row[214]); entry.purity = atoi(row[215]); @@ -1196,11 +1196,11 @@ public: entry.evoid = atoi(row[217]); entry.evolvinglevel = atoi(row[218]); entry.evomax = atoi(row[219]); - entry.clickname = row[220]; - entry.procname = row[221]; - entry.wornname = row[222]; - entry.focusname = row[223]; - entry.scrollname = row[224]; + entry.clickname = row[220] ? row[220] : ""; + entry.procname = row[221] ? row[221] : ""; + entry.wornname = row[222] ? row[222] : ""; + entry.focusname = row[223] ? row[223] : ""; + entry.scrollname = row[224] ? row[224] : ""; entry.dsmitigation = atoi(row[225]); entry.heroic_str = atoi(row[226]); entry.heroic_int = atoi(row[227]); @@ -1219,7 +1219,7 @@ public: entry.spelldmg = atoi(row[240]); entry.clairvoyance = atoi(row[241]); entry.backstabdmg = atoi(row[242]); - entry.created = row[243]; + entry.created = row[243] ? row[243] : ""; entry.elitematerial = atoi(row[244]); entry.ldonsellbackrate = atoi(row[245]); entry.scriptfileid = atoi(row[246]); @@ -1234,7 +1234,7 @@ public: entry.bardunk3 = atoi(row[255]); entry.bardunk4 = atoi(row[256]); entry.bardunk5 = atoi(row[257]); - entry.bardname = row[258]; + entry.bardname = row[258] ? row[258] : ""; entry.bardunk7 = atoi(row[259]); entry.UNK214 = atoi(row[260]); entry.UNK219 = atoi(row[261]); @@ -2227,7 +2227,7 @@ public: entry.id = atoi(row[0]); entry.minstatus = atoi(row[1]); - entry.Name = row[2]; + entry.Name = row[2] ? row[2] : ""; entry.aagi = atoi(row[3]); entry.ac = atoi(row[4]); entry.accuracy = atoi(row[5]); @@ -2267,11 +2267,11 @@ public: entry.book = atoi(row[39]); entry.casttime = atoi(row[40]); entry.casttime_ = atoi(row[41]); - entry.charmfile = row[42]; - entry.charmfileid = row[43]; + entry.charmfile = row[42] ? row[42] : ""; + entry.charmfileid = row[43] ? row[43] : ""; entry.classes = atoi(row[44]); entry.color = atoi(row[45]); - entry.combateffects = row[46]; + entry.combateffects = row[46] ? row[46] : ""; entry.extradmgskill = atoi(row[47]); entry.extradmgamt = atoi(row[48]); entry.price = atoi(row[49]); @@ -2296,7 +2296,7 @@ public: entry.factionmod2 = atoi(row[68]); entry.factionmod3 = atoi(row[69]); entry.factionmod4 = atoi(row[70]); - entry.filename = row[71]; + entry.filename = row[71] ? row[71] : ""; entry.focuseffect = atoi(row[72]); entry.fr = atoi(row[73]); entry.fvnodrop = atoi(row[74]); @@ -2305,14 +2305,14 @@ public: entry.hp = atoi(row[77]); entry.regen = atoi(row[78]); entry.icon = atoi(row[79]); - entry.idfile = row[80]; + entry.idfile = row[80] ? row[80] : ""; entry.itemclass = atoi(row[81]); entry.itemtype = atoi(row[82]); entry.ldonprice = atoi(row[83]); entry.ldontheme = atoi(row[84]); entry.ldonsold = atoi(row[85]); entry.light = atoi(row[86]); - entry.lore = row[87]; + entry.lore = row[87] ? row[87] : ""; entry.loregroup = atoi(row[88]); entry.magic = atoi(row[89]); entry.mana = atoi(row[90]); @@ -2359,8 +2359,8 @@ public: entry.UNK124 = atoi(row[131]); entry.attuneable = atoi(row[132]); entry.nopet = atoi(row[133]); - entry.updated = row[134]; - entry.comment = row[135]; + entry.updated = row[134] ? row[134] : ""; + entry.comment = row[135] ? row[135] : ""; entry.UNK127 = atoi(row[136]); entry.pointtype = atoi(row[137]); entry.potionbelt = atoi(row[138]); @@ -2368,7 +2368,7 @@ public: entry.stacksize = atoi(row[140]); entry.notransfer = atoi(row[141]); entry.stackable = atoi(row[142]); - entry.UNK134 = row[143]; + entry.UNK134 = row[143] ? row[143] : ""; entry.UNK137 = atoi(row[144]); entry.proceffect = atoi(row[145]); entry.proctype = atoi(row[146]); @@ -2389,12 +2389,12 @@ public: entry.scrolllevel2 = atoi(row[161]); entry.scrolllevel = atoi(row[162]); entry.UNK157 = atoi(row[163]); - entry.serialized = row[164]; - entry.verified = row[165]; - entry.serialization = row[166]; - entry.source = row[167]; + entry.serialized = row[164] ? row[164] : ""; + entry.verified = row[165] ? row[165] : ""; + entry.serialization = row[166] ? row[166] : ""; + entry.source = row[167] ? row[167] : ""; entry.UNK033 = atoi(row[168]); - entry.lorefile = row[169]; + entry.lorefile = row[169] ? row[169] : ""; entry.UNK014 = atoi(row[170]); entry.svcorruption = atoi(row[171]); entry.skillmodmax = atoi(row[172]); @@ -2408,36 +2408,36 @@ public: entry.UNK120 = atoi(row[180]); entry.UNK121 = atoi(row[181]); entry.questitemflag = atoi(row[182]); - entry.UNK132 = row[183]; + entry.UNK132 = row[183] ? row[183] : ""; entry.clickunk5 = atoi(row[184]); - entry.clickunk6 = row[185]; + entry.clickunk6 = row[185] ? row[185] : ""; entry.clickunk7 = atoi(row[186]); entry.procunk1 = atoi(row[187]); entry.procunk2 = atoi(row[188]); entry.procunk3 = atoi(row[189]); entry.procunk4 = atoi(row[190]); - entry.procunk6 = row[191]; + entry.procunk6 = row[191] ? row[191] : ""; entry.procunk7 = atoi(row[192]); entry.wornunk1 = atoi(row[193]); entry.wornunk2 = atoi(row[194]); entry.wornunk3 = atoi(row[195]); entry.wornunk4 = atoi(row[196]); entry.wornunk5 = atoi(row[197]); - entry.wornunk6 = row[198]; + entry.wornunk6 = row[198] ? row[198] : ""; entry.wornunk7 = atoi(row[199]); entry.focusunk1 = atoi(row[200]); entry.focusunk2 = atoi(row[201]); entry.focusunk3 = atoi(row[202]); entry.focusunk4 = atoi(row[203]); entry.focusunk5 = atoi(row[204]); - entry.focusunk6 = row[205]; + entry.focusunk6 = row[205] ? row[205] : ""; entry.focusunk7 = atoi(row[206]); entry.scrollunk1 = atoi(row[207]); entry.scrollunk2 = atoi(row[208]); entry.scrollunk3 = atoi(row[209]); entry.scrollunk4 = atoi(row[210]); entry.scrollunk5 = atoi(row[211]); - entry.scrollunk6 = row[212]; + entry.scrollunk6 = row[212] ? row[212] : ""; entry.scrollunk7 = atoi(row[213]); entry.UNK193 = atoi(row[214]); entry.purity = atoi(row[215]); @@ -2445,11 +2445,11 @@ public: entry.evoid = atoi(row[217]); entry.evolvinglevel = atoi(row[218]); entry.evomax = atoi(row[219]); - entry.clickname = row[220]; - entry.procname = row[221]; - entry.wornname = row[222]; - entry.focusname = row[223]; - entry.scrollname = row[224]; + entry.clickname = row[220] ? row[220] : ""; + entry.procname = row[221] ? row[221] : ""; + entry.wornname = row[222] ? row[222] : ""; + entry.focusname = row[223] ? row[223] : ""; + entry.scrollname = row[224] ? row[224] : ""; entry.dsmitigation = atoi(row[225]); entry.heroic_str = atoi(row[226]); entry.heroic_int = atoi(row[227]); @@ -2468,7 +2468,7 @@ public: entry.spelldmg = atoi(row[240]); entry.clairvoyance = atoi(row[241]); entry.backstabdmg = atoi(row[242]); - entry.created = row[243]; + entry.created = row[243] ? row[243] : ""; entry.elitematerial = atoi(row[244]); entry.ldonsellbackrate = atoi(row[245]); entry.scriptfileid = atoi(row[246]); @@ -2483,7 +2483,7 @@ public: entry.bardunk3 = atoi(row[255]); entry.bardunk4 = atoi(row[256]); entry.bardunk5 = atoi(row[257]); - entry.bardname = row[258]; + entry.bardname = row[258] ? row[258] : ""; entry.bardunk7 = atoi(row[259]); entry.UNK214 = atoi(row[260]); entry.UNK219 = atoi(row[261]); @@ -2536,7 +2536,7 @@ public: entry.id = atoi(row[0]); entry.minstatus = atoi(row[1]); - entry.Name = row[2]; + entry.Name = row[2] ? row[2] : ""; entry.aagi = atoi(row[3]); entry.ac = atoi(row[4]); entry.accuracy = atoi(row[5]); @@ -2576,11 +2576,11 @@ public: entry.book = atoi(row[39]); entry.casttime = atoi(row[40]); entry.casttime_ = atoi(row[41]); - entry.charmfile = row[42]; - entry.charmfileid = row[43]; + entry.charmfile = row[42] ? row[42] : ""; + entry.charmfileid = row[43] ? row[43] : ""; entry.classes = atoi(row[44]); entry.color = atoi(row[45]); - entry.combateffects = row[46]; + entry.combateffects = row[46] ? row[46] : ""; entry.extradmgskill = atoi(row[47]); entry.extradmgamt = atoi(row[48]); entry.price = atoi(row[49]); @@ -2605,7 +2605,7 @@ public: entry.factionmod2 = atoi(row[68]); entry.factionmod3 = atoi(row[69]); entry.factionmod4 = atoi(row[70]); - entry.filename = row[71]; + entry.filename = row[71] ? row[71] : ""; entry.focuseffect = atoi(row[72]); entry.fr = atoi(row[73]); entry.fvnodrop = atoi(row[74]); @@ -2614,14 +2614,14 @@ public: entry.hp = atoi(row[77]); entry.regen = atoi(row[78]); entry.icon = atoi(row[79]); - entry.idfile = row[80]; + entry.idfile = row[80] ? row[80] : ""; entry.itemclass = atoi(row[81]); entry.itemtype = atoi(row[82]); entry.ldonprice = atoi(row[83]); entry.ldontheme = atoi(row[84]); entry.ldonsold = atoi(row[85]); entry.light = atoi(row[86]); - entry.lore = row[87]; + entry.lore = row[87] ? row[87] : ""; entry.loregroup = atoi(row[88]); entry.magic = atoi(row[89]); entry.mana = atoi(row[90]); @@ -2668,8 +2668,8 @@ public: entry.UNK124 = atoi(row[131]); entry.attuneable = atoi(row[132]); entry.nopet = atoi(row[133]); - entry.updated = row[134]; - entry.comment = row[135]; + entry.updated = row[134] ? row[134] : ""; + entry.comment = row[135] ? row[135] : ""; entry.UNK127 = atoi(row[136]); entry.pointtype = atoi(row[137]); entry.potionbelt = atoi(row[138]); @@ -2677,7 +2677,7 @@ public: entry.stacksize = atoi(row[140]); entry.notransfer = atoi(row[141]); entry.stackable = atoi(row[142]); - entry.UNK134 = row[143]; + entry.UNK134 = row[143] ? row[143] : ""; entry.UNK137 = atoi(row[144]); entry.proceffect = atoi(row[145]); entry.proctype = atoi(row[146]); @@ -2698,12 +2698,12 @@ public: entry.scrolllevel2 = atoi(row[161]); entry.scrolllevel = atoi(row[162]); entry.UNK157 = atoi(row[163]); - entry.serialized = row[164]; - entry.verified = row[165]; - entry.serialization = row[166]; - entry.source = row[167]; + entry.serialized = row[164] ? row[164] : ""; + entry.verified = row[165] ? row[165] : ""; + entry.serialization = row[166] ? row[166] : ""; + entry.source = row[167] ? row[167] : ""; entry.UNK033 = atoi(row[168]); - entry.lorefile = row[169]; + entry.lorefile = row[169] ? row[169] : ""; entry.UNK014 = atoi(row[170]); entry.svcorruption = atoi(row[171]); entry.skillmodmax = atoi(row[172]); @@ -2717,36 +2717,36 @@ public: entry.UNK120 = atoi(row[180]); entry.UNK121 = atoi(row[181]); entry.questitemflag = atoi(row[182]); - entry.UNK132 = row[183]; + entry.UNK132 = row[183] ? row[183] : ""; entry.clickunk5 = atoi(row[184]); - entry.clickunk6 = row[185]; + entry.clickunk6 = row[185] ? row[185] : ""; entry.clickunk7 = atoi(row[186]); entry.procunk1 = atoi(row[187]); entry.procunk2 = atoi(row[188]); entry.procunk3 = atoi(row[189]); entry.procunk4 = atoi(row[190]); - entry.procunk6 = row[191]; + entry.procunk6 = row[191] ? row[191] : ""; entry.procunk7 = atoi(row[192]); entry.wornunk1 = atoi(row[193]); entry.wornunk2 = atoi(row[194]); entry.wornunk3 = atoi(row[195]); entry.wornunk4 = atoi(row[196]); entry.wornunk5 = atoi(row[197]); - entry.wornunk6 = row[198]; + entry.wornunk6 = row[198] ? row[198] : ""; entry.wornunk7 = atoi(row[199]); entry.focusunk1 = atoi(row[200]); entry.focusunk2 = atoi(row[201]); entry.focusunk3 = atoi(row[202]); entry.focusunk4 = atoi(row[203]); entry.focusunk5 = atoi(row[204]); - entry.focusunk6 = row[205]; + entry.focusunk6 = row[205] ? row[205] : ""; entry.focusunk7 = atoi(row[206]); entry.scrollunk1 = atoi(row[207]); entry.scrollunk2 = atoi(row[208]); entry.scrollunk3 = atoi(row[209]); entry.scrollunk4 = atoi(row[210]); entry.scrollunk5 = atoi(row[211]); - entry.scrollunk6 = row[212]; + entry.scrollunk6 = row[212] ? row[212] : ""; entry.scrollunk7 = atoi(row[213]); entry.UNK193 = atoi(row[214]); entry.purity = atoi(row[215]); @@ -2754,11 +2754,11 @@ public: entry.evoid = atoi(row[217]); entry.evolvinglevel = atoi(row[218]); entry.evomax = atoi(row[219]); - entry.clickname = row[220]; - entry.procname = row[221]; - entry.wornname = row[222]; - entry.focusname = row[223]; - entry.scrollname = row[224]; + entry.clickname = row[220] ? row[220] : ""; + entry.procname = row[221] ? row[221] : ""; + entry.wornname = row[222] ? row[222] : ""; + entry.focusname = row[223] ? row[223] : ""; + entry.scrollname = row[224] ? row[224] : ""; entry.dsmitigation = atoi(row[225]); entry.heroic_str = atoi(row[226]); entry.heroic_int = atoi(row[227]); @@ -2777,7 +2777,7 @@ public: entry.spelldmg = atoi(row[240]); entry.clairvoyance = atoi(row[241]); entry.backstabdmg = atoi(row[242]); - entry.created = row[243]; + entry.created = row[243] ? row[243] : ""; entry.elitematerial = atoi(row[244]); entry.ldonsellbackrate = atoi(row[245]); entry.scriptfileid = atoi(row[246]); @@ -2792,7 +2792,7 @@ public: entry.bardunk3 = atoi(row[255]); entry.bardunk4 = atoi(row[256]); entry.bardunk5 = atoi(row[257]); - entry.bardname = row[258]; + entry.bardname = row[258] ? row[258] : ""; entry.bardunk7 = atoi(row[259]); entry.UNK214 = atoi(row[260]); entry.UNK219 = atoi(row[261]); diff --git a/common/repositories/launcher_repository.h b/common/repositories/launcher_repository.h index 2471bd061..3f0ad71cf 100644 --- a/common/repositories/launcher_repository.h +++ b/common/repositories/launcher_repository.h @@ -127,7 +127,7 @@ public: if (results.RowCount() == 1) { Launcher entry{}; - entry.name = row[0]; + entry.name = row[0] ? row[0] : ""; entry.dynamics = atoi(row[1]); return entry; @@ -244,7 +244,7 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Launcher entry{}; - entry.name = row[0]; + entry.name = row[0] ? row[0] : ""; entry.dynamics = atoi(row[1]); all_entries.push_back(entry); @@ -270,7 +270,7 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Launcher entry{}; - entry.name = row[0]; + entry.name = row[0] ? row[0] : ""; entry.dynamics = atoi(row[1]); all_entries.push_back(entry); diff --git a/common/repositories/launcher_zones_repository.h b/common/repositories/launcher_zones_repository.h index 225a12226..010659f82 100644 --- a/common/repositories/launcher_zones_repository.h +++ b/common/repositories/launcher_zones_repository.h @@ -130,8 +130,8 @@ public: if (results.RowCount() == 1) { LauncherZones entry{}; - entry.launcher = row[0]; - entry.zone = row[1]; + entry.launcher = row[0] ? row[0] : ""; + entry.zone = row[1] ? row[1] : ""; entry.port = atoi(row[2]); return entry; @@ -248,8 +248,8 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { LauncherZones entry{}; - entry.launcher = row[0]; - entry.zone = row[1]; + entry.launcher = row[0] ? row[0] : ""; + entry.zone = row[1] ? row[1] : ""; entry.port = atoi(row[2]); all_entries.push_back(entry); @@ -275,8 +275,8 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { LauncherZones entry{}; - entry.launcher = row[0]; - entry.zone = row[1]; + entry.launcher = row[0] ? row[0] : ""; + entry.zone = row[1] ? row[1] : ""; entry.port = atoi(row[2]); all_entries.push_back(entry); diff --git a/common/repositories/lfguild_repository.h b/common/repositories/lfguild_repository.h index ffc987c50..7a6d5012b 100644 --- a/common/repositories/lfguild_repository.h +++ b/common/repositories/lfguild_repository.h @@ -149,8 +149,8 @@ public: Lfguild entry{}; entry.type = atoi(row[0]); - entry.name = row[1]; - entry.comment = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.comment = row[2] ? row[2] : ""; entry.fromlevel = atoi(row[3]); entry.tolevel = atoi(row[4]); entry.classes = atoi(row[5]); @@ -291,8 +291,8 @@ public: Lfguild entry{}; entry.type = atoi(row[0]); - entry.name = row[1]; - entry.comment = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.comment = row[2] ? row[2] : ""; entry.fromlevel = atoi(row[3]); entry.tolevel = atoi(row[4]); entry.classes = atoi(row[5]); @@ -324,8 +324,8 @@ public: Lfguild entry{}; entry.type = atoi(row[0]); - entry.name = row[1]; - entry.comment = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.comment = row[2] ? row[2] : ""; entry.fromlevel = atoi(row[3]); entry.tolevel = atoi(row[4]); entry.classes = atoi(row[5]); diff --git a/common/repositories/login_accounts_repository.h b/common/repositories/login_accounts_repository.h index 3f35a9add..a9d360668 100644 --- a/common/repositories/login_accounts_repository.h +++ b/common/repositories/login_accounts_repository.h @@ -149,14 +149,14 @@ public: LoginAccounts entry{}; entry.id = atoi(row[0]); - entry.account_name = row[1]; - entry.account_password = row[2]; - entry.account_email = row[3]; - entry.source_loginserver = row[4]; - entry.last_ip_address = row[5]; - entry.last_login_date = row[6]; - entry.created_at = row[7]; - entry.updated_at = row[8]; + entry.account_name = row[1] ? row[1] : ""; + entry.account_password = row[2] ? row[2] : ""; + entry.account_email = row[3] ? row[3] : ""; + entry.source_loginserver = row[4] ? row[4] : ""; + entry.last_ip_address = row[5] ? row[5] : ""; + entry.last_login_date = row[6] ? row[6] : ""; + entry.created_at = row[7] ? row[7] : ""; + entry.updated_at = row[8] ? row[8] : ""; return entry; } @@ -294,14 +294,14 @@ public: LoginAccounts entry{}; entry.id = atoi(row[0]); - entry.account_name = row[1]; - entry.account_password = row[2]; - entry.account_email = row[3]; - entry.source_loginserver = row[4]; - entry.last_ip_address = row[5]; - entry.last_login_date = row[6]; - entry.created_at = row[7]; - entry.updated_at = row[8]; + entry.account_name = row[1] ? row[1] : ""; + entry.account_password = row[2] ? row[2] : ""; + entry.account_email = row[3] ? row[3] : ""; + entry.source_loginserver = row[4] ? row[4] : ""; + entry.last_ip_address = row[5] ? row[5] : ""; + entry.last_login_date = row[6] ? row[6] : ""; + entry.created_at = row[7] ? row[7] : ""; + entry.updated_at = row[8] ? row[8] : ""; all_entries.push_back(entry); } @@ -327,14 +327,14 @@ public: LoginAccounts entry{}; entry.id = atoi(row[0]); - entry.account_name = row[1]; - entry.account_password = row[2]; - entry.account_email = row[3]; - entry.source_loginserver = row[4]; - entry.last_ip_address = row[5]; - entry.last_login_date = row[6]; - entry.created_at = row[7]; - entry.updated_at = row[8]; + entry.account_name = row[1] ? row[1] : ""; + entry.account_password = row[2] ? row[2] : ""; + entry.account_email = row[3] ? row[3] : ""; + entry.source_loginserver = row[4] ? row[4] : ""; + entry.last_ip_address = row[5] ? row[5] : ""; + entry.last_login_date = row[6] ? row[6] : ""; + entry.created_at = row[7] ? row[7] : ""; + entry.updated_at = row[8] ? row[8] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/login_api_tokens_repository.h b/common/repositories/login_api_tokens_repository.h index 8c64eb69d..766b0542d 100644 --- a/common/repositories/login_api_tokens_repository.h +++ b/common/repositories/login_api_tokens_repository.h @@ -140,11 +140,11 @@ public: LoginApiTokens entry{}; entry.id = atoi(row[0]); - entry.token = row[1]; + entry.token = row[1] ? row[1] : ""; entry.can_write = atoi(row[2]); entry.can_read = atoi(row[3]); - entry.created_at = row[4]; - entry.updated_at = row[5]; + entry.created_at = row[4] ? row[4] : ""; + entry.updated_at = row[5] ? row[5] : ""; return entry; } @@ -273,11 +273,11 @@ public: LoginApiTokens entry{}; entry.id = atoi(row[0]); - entry.token = row[1]; + entry.token = row[1] ? row[1] : ""; entry.can_write = atoi(row[2]); entry.can_read = atoi(row[3]); - entry.created_at = row[4]; - entry.updated_at = row[5]; + entry.created_at = row[4] ? row[4] : ""; + entry.updated_at = row[5] ? row[5] : ""; all_entries.push_back(entry); } @@ -303,11 +303,11 @@ public: LoginApiTokens entry{}; entry.id = atoi(row[0]); - entry.token = row[1]; + entry.token = row[1] ? row[1] : ""; entry.can_write = atoi(row[2]); entry.can_read = atoi(row[3]); - entry.created_at = row[4]; - entry.updated_at = row[5]; + entry.created_at = row[4] ? row[4] : ""; + entry.updated_at = row[5] ? row[5] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/login_server_admins_repository.h b/common/repositories/login_server_admins_repository.h index 92eccc7cb..680e76d36 100644 --- a/common/repositories/login_server_admins_repository.h +++ b/common/repositories/login_server_admins_repository.h @@ -146,13 +146,13 @@ public: LoginServerAdmins entry{}; entry.id = atoi(row[0]); - entry.account_name = row[1]; - entry.account_password = row[2]; - entry.first_name = row[3]; - entry.last_name = row[4]; - entry.email = row[5]; - entry.registration_date = row[6]; - entry.registration_ip_address = row[7]; + entry.account_name = row[1] ? row[1] : ""; + entry.account_password = row[2] ? row[2] : ""; + entry.first_name = row[3] ? row[3] : ""; + entry.last_name = row[4] ? row[4] : ""; + entry.email = row[5] ? row[5] : ""; + entry.registration_date = row[6] ? row[6] : ""; + entry.registration_ip_address = row[7] ? row[7] : ""; return entry; } @@ -287,13 +287,13 @@ public: LoginServerAdmins entry{}; entry.id = atoi(row[0]); - entry.account_name = row[1]; - entry.account_password = row[2]; - entry.first_name = row[3]; - entry.last_name = row[4]; - entry.email = row[5]; - entry.registration_date = row[6]; - entry.registration_ip_address = row[7]; + entry.account_name = row[1] ? row[1] : ""; + entry.account_password = row[2] ? row[2] : ""; + entry.first_name = row[3] ? row[3] : ""; + entry.last_name = row[4] ? row[4] : ""; + entry.email = row[5] ? row[5] : ""; + entry.registration_date = row[6] ? row[6] : ""; + entry.registration_ip_address = row[7] ? row[7] : ""; all_entries.push_back(entry); } @@ -319,13 +319,13 @@ public: LoginServerAdmins entry{}; entry.id = atoi(row[0]); - entry.account_name = row[1]; - entry.account_password = row[2]; - entry.first_name = row[3]; - entry.last_name = row[4]; - entry.email = row[5]; - entry.registration_date = row[6]; - entry.registration_ip_address = row[7]; + entry.account_name = row[1] ? row[1] : ""; + entry.account_password = row[2] ? row[2] : ""; + entry.first_name = row[3] ? row[3] : ""; + entry.last_name = row[4] ? row[4] : ""; + entry.email = row[5] ? row[5] : ""; + entry.registration_date = row[6] ? row[6] : ""; + entry.registration_ip_address = row[7] ? row[7] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/login_server_list_types_repository.h b/common/repositories/login_server_list_types_repository.h index f844ce5ec..8d5dd1541 100644 --- a/common/repositories/login_server_list_types_repository.h +++ b/common/repositories/login_server_list_types_repository.h @@ -128,7 +128,7 @@ public: LoginServerListTypes entry{}; entry.id = atoi(row[0]); - entry.description = row[1]; + entry.description = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: LoginServerListTypes entry{}; entry.id = atoi(row[0]); - entry.description = row[1]; + entry.description = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: LoginServerListTypes entry{}; entry.id = atoi(row[0]); - entry.description = row[1]; + entry.description = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/login_world_servers_repository.h b/common/repositories/login_world_servers_repository.h index 1aa2e40ef..f5101503d 100644 --- a/common/repositories/login_world_servers_repository.h +++ b/common/repositories/login_world_servers_repository.h @@ -152,15 +152,15 @@ public: LoginWorldServers entry{}; entry.id = atoi(row[0]); - entry.long_name = row[1]; - entry.short_name = row[2]; - entry.tag_description = row[3]; + entry.long_name = row[1] ? row[1] : ""; + entry.short_name = row[2] ? row[2] : ""; + entry.tag_description = row[3] ? row[3] : ""; entry.login_server_list_type_id = atoi(row[4]); - entry.last_login_date = row[5]; - entry.last_ip_address = row[6]; + entry.last_login_date = row[5] ? row[5] : ""; + entry.last_ip_address = row[6] ? row[6] : ""; entry.login_server_admin_id = atoi(row[7]); entry.is_server_trusted = atoi(row[8]); - entry.note = row[9]; + entry.note = row[9] ? row[9] : ""; return entry; } @@ -301,15 +301,15 @@ public: LoginWorldServers entry{}; entry.id = atoi(row[0]); - entry.long_name = row[1]; - entry.short_name = row[2]; - entry.tag_description = row[3]; + entry.long_name = row[1] ? row[1] : ""; + entry.short_name = row[2] ? row[2] : ""; + entry.tag_description = row[3] ? row[3] : ""; entry.login_server_list_type_id = atoi(row[4]); - entry.last_login_date = row[5]; - entry.last_ip_address = row[6]; + entry.last_login_date = row[5] ? row[5] : ""; + entry.last_ip_address = row[6] ? row[6] : ""; entry.login_server_admin_id = atoi(row[7]); entry.is_server_trusted = atoi(row[8]); - entry.note = row[9]; + entry.note = row[9] ? row[9] : ""; all_entries.push_back(entry); } @@ -335,15 +335,15 @@ public: LoginWorldServers entry{}; entry.id = atoi(row[0]); - entry.long_name = row[1]; - entry.short_name = row[2]; - entry.tag_description = row[3]; + entry.long_name = row[1] ? row[1] : ""; + entry.short_name = row[2] ? row[2] : ""; + entry.tag_description = row[3] ? row[3] : ""; entry.login_server_list_type_id = atoi(row[4]); - entry.last_login_date = row[5]; - entry.last_ip_address = row[6]; + entry.last_login_date = row[5] ? row[5] : ""; + entry.last_ip_address = row[6] ? row[6] : ""; entry.login_server_admin_id = atoi(row[7]); entry.is_server_trusted = atoi(row[8]); - entry.note = row[9]; + entry.note = row[9] ? row[9] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/logsys_categories_repository.h b/common/repositories/logsys_categories_repository.h index 2f7c5d089..fb7bdc1ad 100644 --- a/common/repositories/logsys_categories_repository.h +++ b/common/repositories/logsys_categories_repository.h @@ -137,7 +137,7 @@ public: LogsysCategories entry{}; entry.log_category_id = atoi(row[0]); - entry.log_category_description = row[1]; + entry.log_category_description = row[1] ? row[1] : ""; entry.log_to_console = atoi(row[2]); entry.log_to_file = atoi(row[3]); entry.log_to_gmsay = atoi(row[4]); @@ -266,7 +266,7 @@ public: LogsysCategories entry{}; entry.log_category_id = atoi(row[0]); - entry.log_category_description = row[1]; + entry.log_category_description = row[1] ? row[1] : ""; entry.log_to_console = atoi(row[2]); entry.log_to_file = atoi(row[3]); entry.log_to_gmsay = atoi(row[4]); @@ -295,7 +295,7 @@ public: LogsysCategories entry{}; entry.log_category_id = atoi(row[0]); - entry.log_category_description = row[1]; + entry.log_category_description = row[1] ? row[1] : ""; entry.log_to_console = atoi(row[2]); entry.log_to_file = atoi(row[3]); entry.log_to_gmsay = atoi(row[4]); diff --git a/common/repositories/lootdrop_repository.h b/common/repositories/lootdrop_repository.h index 45069fa56..45eecb753 100644 --- a/common/repositories/lootdrop_repository.h +++ b/common/repositories/lootdrop_repository.h @@ -128,7 +128,7 @@ public: Lootdrop entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: Lootdrop entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: Lootdrop entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/loottable_repository.h b/common/repositories/loottable_repository.h index 4f87c30b0..33aa27a42 100644 --- a/common/repositories/loottable_repository.h +++ b/common/repositories/loottable_repository.h @@ -140,7 +140,7 @@ public: Loottable entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.mincash = atoi(row[2]); entry.maxcash = atoi(row[3]); entry.avgcoin = atoi(row[4]); @@ -273,7 +273,7 @@ public: Loottable entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.mincash = atoi(row[2]); entry.maxcash = atoi(row[3]); entry.avgcoin = atoi(row[4]); @@ -303,7 +303,7 @@ public: Loottable entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.mincash = atoi(row[2]); entry.maxcash = atoi(row[3]); entry.avgcoin = atoi(row[4]); diff --git a/common/repositories/mail_repository.h b/common/repositories/mail_repository.h index 090d24900..498f904bb 100644 --- a/common/repositories/mail_repository.h +++ b/common/repositories/mail_repository.h @@ -148,10 +148,10 @@ public: entry.msgid = atoi(row[0]); entry.charid = atoi(row[1]); entry.timestamp = atoi(row[2]); - entry.from = row[3]; - entry.subject = row[4]; - entry.body = row[5]; - entry.to = row[6]; + entry.from = row[3] ? row[3] : ""; + entry.subject = row[4] ? row[4] : ""; + entry.body = row[5] ? row[5] : ""; + entry.to = row[6] ? row[6] : ""; entry.status = atoi(row[7]); return entry; @@ -289,10 +289,10 @@ public: entry.msgid = atoi(row[0]); entry.charid = atoi(row[1]); entry.timestamp = atoi(row[2]); - entry.from = row[3]; - entry.subject = row[4]; - entry.body = row[5]; - entry.to = row[6]; + entry.from = row[3] ? row[3] : ""; + entry.subject = row[4] ? row[4] : ""; + entry.body = row[5] ? row[5] : ""; + entry.to = row[6] ? row[6] : ""; entry.status = atoi(row[7]); all_entries.push_back(entry); @@ -321,10 +321,10 @@ public: entry.msgid = atoi(row[0]); entry.charid = atoi(row[1]); entry.timestamp = atoi(row[2]); - entry.from = row[3]; - entry.subject = row[4]; - entry.body = row[5]; - entry.to = row[6]; + entry.from = row[3] ? row[3] : ""; + entry.subject = row[4] ? row[4] : ""; + entry.body = row[5] ? row[5] : ""; + entry.to = row[6] ? row[6] : ""; entry.status = atoi(row[7]); all_entries.push_back(entry); diff --git a/common/repositories/name_filter_repository.h b/common/repositories/name_filter_repository.h index f1190e398..e9046b321 100644 --- a/common/repositories/name_filter_repository.h +++ b/common/repositories/name_filter_repository.h @@ -128,7 +128,7 @@ public: NameFilter entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: NameFilter entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: NameFilter entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/npc_emotes_repository.h b/common/repositories/npc_emotes_repository.h index 7e0da33dc..55e1b34f5 100644 --- a/common/repositories/npc_emotes_repository.h +++ b/common/repositories/npc_emotes_repository.h @@ -140,7 +140,7 @@ public: entry.emoteid = atoi(row[1]); entry.event_ = atoi(row[2]); entry.type = atoi(row[3]); - entry.text = row[4]; + entry.text = row[4] ? row[4] : ""; return entry; } @@ -269,7 +269,7 @@ public: entry.emoteid = atoi(row[1]); entry.event_ = atoi(row[2]); entry.type = atoi(row[3]); - entry.text = row[4]; + entry.text = row[4] ? row[4] : ""; all_entries.push_back(entry); } @@ -298,7 +298,7 @@ public: entry.emoteid = atoi(row[1]); entry.event_ = atoi(row[2]); entry.type = atoi(row[3]); - entry.text = row[4]; + entry.text = row[4] ? row[4] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/npc_faction_repository.h b/common/repositories/npc_faction_repository.h index fec72a00a..066413ff9 100644 --- a/common/repositories/npc_faction_repository.h +++ b/common/repositories/npc_faction_repository.h @@ -134,7 +134,7 @@ public: NpcFaction entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.primaryfaction = atoi(row[2]); entry.ignore_primary_assist = atoi(row[3]); @@ -259,7 +259,7 @@ public: NpcFaction entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.primaryfaction = atoi(row[2]); entry.ignore_primary_assist = atoi(row[3]); @@ -287,7 +287,7 @@ public: NpcFaction entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.primaryfaction = atoi(row[2]); entry.ignore_primary_assist = atoi(row[3]); diff --git a/common/repositories/npc_scale_global_base_repository.h b/common/repositories/npc_scale_global_base_repository.h index 1d3571589..a7f7f80a4 100644 --- a/common/repositories/npc_scale_global_base_repository.h +++ b/common/repositories/npc_scale_global_base_repository.h @@ -232,7 +232,7 @@ public: entry.attack_delay = atoi(row[24]); entry.spell_scale = atoi(row[25]); entry.heal_scale = atoi(row[26]); - entry.special_abilities = row[27]; + entry.special_abilities = row[27] ? row[27] : ""; return entry; } @@ -450,7 +450,7 @@ public: entry.attack_delay = atoi(row[24]); entry.spell_scale = atoi(row[25]); entry.heal_scale = atoi(row[26]); - entry.special_abilities = row[27]; + entry.special_abilities = row[27] ? row[27] : ""; all_entries.push_back(entry); } @@ -502,7 +502,7 @@ public: entry.attack_delay = atoi(row[24]); entry.spell_scale = atoi(row[25]); entry.heal_scale = atoi(row[26]); - entry.special_abilities = row[27]; + entry.special_abilities = row[27] ? row[27] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/npc_spells_effects_repository.h b/common/repositories/npc_spells_effects_repository.h index 8f4908175..5dc32d2ec 100644 --- a/common/repositories/npc_spells_effects_repository.h +++ b/common/repositories/npc_spells_effects_repository.h @@ -131,7 +131,7 @@ public: NpcSpellsEffects entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.parent_list = atoi(row[2]); return entry; @@ -252,7 +252,7 @@ public: NpcSpellsEffects entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.parent_list = atoi(row[2]); all_entries.push_back(entry); @@ -279,7 +279,7 @@ public: NpcSpellsEffects entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.parent_list = atoi(row[2]); all_entries.push_back(entry); diff --git a/common/repositories/npc_spells_repository.h b/common/repositories/npc_spells_repository.h index ce9e56237..f835098f2 100644 --- a/common/repositories/npc_spells_repository.h +++ b/common/repositories/npc_spells_repository.h @@ -185,7 +185,7 @@ public: NpcSpells entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.parent_list = atoi(row[2]); entry.attack_proc = atoi(row[3]); entry.proc_chance = atoi(row[4]); @@ -378,7 +378,7 @@ public: NpcSpells entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.parent_list = atoi(row[2]); entry.attack_proc = atoi(row[3]); entry.proc_chance = atoi(row[4]); @@ -423,7 +423,7 @@ public: NpcSpells entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.parent_list = atoi(row[2]); entry.attack_proc = atoi(row[3]); entry.proc_chance = atoi(row[4]); diff --git a/common/repositories/npc_types_repository.h b/common/repositories/npc_types_repository.h index b7c2a58ff..433bbb33d 100644 --- a/common/repositories/npc_types_repository.h +++ b/common/repositories/npc_types_repository.h @@ -488,8 +488,8 @@ public: NpcTypes entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.lastname = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.lastname = row[2] ? row[2] : ""; entry.level = atoi(row[3]); entry.race = atoi(row[4]); entry.class = atoi(row[5]); @@ -514,8 +514,8 @@ public: entry.mindmg = atoi(row[24]); entry.maxdmg = atoi(row[25]); entry.attack_count = atoi(row[26]); - entry.npcspecialattks = row[27]; - entry.special_abilities = row[28]; + entry.npcspecialattks = row[27] ? row[27] : ""; + entry.special_abilities = row[28] ? row[28] : ""; entry.aggroradius = atoi(row[29]); entry.assistradius = atoi(row[30]); entry.face = atoi(row[31]); @@ -534,7 +534,7 @@ public: entry.armortint_blue = atoi(row[44]); entry.d_melee_texture1 = atoi(row[45]); entry.d_melee_texture2 = atoi(row[46]); - entry.ammo_idfile = row[47]; + entry.ammo_idfile = row[47] ? row[47] : ""; entry.prim_melee_type = atoi(row[48]); entry.sec_melee_type = atoi(row[49]); entry.ranged_type = atoi(row[50]); @@ -1085,8 +1085,8 @@ public: NpcTypes entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.lastname = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.lastname = row[2] ? row[2] : ""; entry.level = atoi(row[3]); entry.race = atoi(row[4]); entry.class = atoi(row[5]); @@ -1111,8 +1111,8 @@ public: entry.mindmg = atoi(row[24]); entry.maxdmg = atoi(row[25]); entry.attack_count = atoi(row[26]); - entry.npcspecialattks = row[27]; - entry.special_abilities = row[28]; + entry.npcspecialattks = row[27] ? row[27] : ""; + entry.special_abilities = row[28] ? row[28] : ""; entry.aggroradius = atoi(row[29]); entry.assistradius = atoi(row[30]); entry.face = atoi(row[31]); @@ -1131,7 +1131,7 @@ public: entry.armortint_blue = atoi(row[44]); entry.d_melee_texture1 = atoi(row[45]); entry.d_melee_texture2 = atoi(row[46]); - entry.ammo_idfile = row[47]; + entry.ammo_idfile = row[47] ? row[47] : ""; entry.prim_melee_type = atoi(row[48]); entry.sec_melee_type = atoi(row[49]); entry.ranged_type = atoi(row[50]); @@ -1231,8 +1231,8 @@ public: NpcTypes entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.lastname = row[2]; + entry.name = row[1] ? row[1] : ""; + entry.lastname = row[2] ? row[2] : ""; entry.level = atoi(row[3]); entry.race = atoi(row[4]); entry.class = atoi(row[5]); @@ -1257,8 +1257,8 @@ public: entry.mindmg = atoi(row[24]); entry.maxdmg = atoi(row[25]); entry.attack_count = atoi(row[26]); - entry.npcspecialattks = row[27]; - entry.special_abilities = row[28]; + entry.npcspecialattks = row[27] ? row[27] : ""; + entry.special_abilities = row[28] ? row[28] : ""; entry.aggroradius = atoi(row[29]); entry.assistradius = atoi(row[30]); entry.face = atoi(row[31]); @@ -1277,7 +1277,7 @@ public: entry.armortint_blue = atoi(row[44]); entry.d_melee_texture1 = atoi(row[45]); entry.d_melee_texture2 = atoi(row[46]); - entry.ammo_idfile = row[47]; + entry.ammo_idfile = row[47] ? row[47] : ""; entry.prim_melee_type = atoi(row[48]); entry.sec_melee_type = atoi(row[49]); entry.ranged_type = atoi(row[50]); diff --git a/common/repositories/npc_types_tint_repository.h b/common/repositories/npc_types_tint_repository.h index 311586c1d..6850da4b1 100644 --- a/common/repositories/npc_types_tint_repository.h +++ b/common/repositories/npc_types_tint_repository.h @@ -209,7 +209,7 @@ public: NpcTypesTint entry{}; entry.id = atoi(row[0]); - entry.tint_set_name = row[1]; + entry.tint_set_name = row[1] ? row[1] : ""; entry.red1h = atoi(row[2]); entry.grn1h = atoi(row[3]); entry.blu1h = atoi(row[4]); @@ -434,7 +434,7 @@ public: NpcTypesTint entry{}; entry.id = atoi(row[0]); - entry.tint_set_name = row[1]; + entry.tint_set_name = row[1] ? row[1] : ""; entry.red1h = atoi(row[2]); entry.grn1h = atoi(row[3]); entry.blu1h = atoi(row[4]); @@ -487,7 +487,7 @@ public: NpcTypesTint entry{}; entry.id = atoi(row[0]); - entry.tint_set_name = row[1]; + entry.tint_set_name = row[1] ? row[1] : ""; entry.red1h = atoi(row[2]); entry.grn1h = atoi(row[3]); entry.blu1h = atoi(row[4]); diff --git a/common/repositories/object_contents_repository.h b/common/repositories/object_contents_repository.h index 2c26f1b2f..7baa5ec15 100644 --- a/common/repositories/object_contents_repository.h +++ b/common/repositories/object_contents_repository.h @@ -162,7 +162,7 @@ public: entry.bagidx = atoi(row[2]); entry.itemid = atoi(row[3]); entry.charges = atoi(row[4]); - entry.droptime = row[5]; + entry.droptime = row[5] ? row[5] : ""; entry.augslot1 = atoi(row[6]); entry.augslot2 = atoi(row[7]); entry.augslot3 = atoi(row[8]); @@ -316,7 +316,7 @@ public: entry.bagidx = atoi(row[2]); entry.itemid = atoi(row[3]); entry.charges = atoi(row[4]); - entry.droptime = row[5]; + entry.droptime = row[5] ? row[5] : ""; entry.augslot1 = atoi(row[6]); entry.augslot2 = atoi(row[7]); entry.augslot3 = atoi(row[8]); @@ -352,7 +352,7 @@ public: entry.bagidx = atoi(row[2]); entry.itemid = atoi(row[3]); entry.charges = atoi(row[4]); - entry.droptime = row[5]; + entry.droptime = row[5] ? row[5] : ""; entry.augslot1 = atoi(row[6]); entry.augslot2 = atoi(row[7]); entry.augslot3 = atoi(row[8]); diff --git a/common/repositories/object_repository.h b/common/repositories/object_repository.h index 87137dbd5..932769ed6 100644 --- a/common/repositories/object_repository.h +++ b/common/repositories/object_repository.h @@ -208,7 +208,7 @@ public: entry.heading = atof(row[6]); entry.itemid = atoi(row[7]); entry.charges = atoi(row[8]); - entry.objectname = row[9]; + entry.objectname = row[9] ? row[9] : ""; entry.type = atoi(row[10]); entry.icon = atoi(row[11]); entry.unknown08 = atoi(row[12]); @@ -224,7 +224,7 @@ public: entry.size = atof(row[22]); entry.tilt_x = atof(row[23]); entry.tilt_y = atof(row[24]); - entry.display_name = row[25]; + entry.display_name = row[25] ? row[25] : ""; return entry; } @@ -421,7 +421,7 @@ public: entry.heading = atof(row[6]); entry.itemid = atoi(row[7]); entry.charges = atoi(row[8]); - entry.objectname = row[9]; + entry.objectname = row[9] ? row[9] : ""; entry.type = atoi(row[10]); entry.icon = atoi(row[11]); entry.unknown08 = atoi(row[12]); @@ -437,7 +437,7 @@ public: entry.size = atof(row[22]); entry.tilt_x = atof(row[23]); entry.tilt_y = atof(row[24]); - entry.display_name = row[25]; + entry.display_name = row[25] ? row[25] : ""; all_entries.push_back(entry); } @@ -471,7 +471,7 @@ public: entry.heading = atof(row[6]); entry.itemid = atoi(row[7]); entry.charges = atoi(row[8]); - entry.objectname = row[9]; + entry.objectname = row[9] ? row[9] : ""; entry.type = atoi(row[10]); entry.icon = atoi(row[11]); entry.unknown08 = atoi(row[12]); @@ -487,7 +487,7 @@ public: entry.size = atof(row[22]); entry.tilt_x = atof(row[23]); entry.tilt_y = atof(row[24]); - entry.display_name = row[25]; + entry.display_name = row[25] ? row[25] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/perl_event_export_settings_repository.h b/common/repositories/perl_event_export_settings_repository.h index ba13a315a..542bc8716 100644 --- a/common/repositories/perl_event_export_settings_repository.h +++ b/common/repositories/perl_event_export_settings_repository.h @@ -143,7 +143,7 @@ public: PerlEventExportSettings entry{}; entry.event_id = atoi(row[0]); - entry.event_description = row[1]; + entry.event_description = row[1] ? row[1] : ""; entry.export_qglobals = atoi(row[2]); entry.export_mob = atoi(row[3]); entry.export_zone = atoi(row[4]); @@ -280,7 +280,7 @@ public: PerlEventExportSettings entry{}; entry.event_id = atoi(row[0]); - entry.event_description = row[1]; + entry.event_description = row[1] ? row[1] : ""; entry.export_qglobals = atoi(row[2]); entry.export_mob = atoi(row[3]); entry.export_zone = atoi(row[4]); @@ -311,7 +311,7 @@ public: PerlEventExportSettings entry{}; entry.event_id = atoi(row[0]); - entry.event_description = row[1]; + entry.event_description = row[1] ? row[1] : ""; entry.export_qglobals = atoi(row[2]); entry.export_mob = atoi(row[3]); entry.export_zone = atoi(row[4]); diff --git a/common/repositories/petitions_repository.h b/common/repositories/petitions_repository.h index 4bd262644..caf6908c1 100644 --- a/common/repositories/petitions_repository.h +++ b/common/repositories/petitions_repository.h @@ -171,12 +171,12 @@ public: entry.dib = atoi(row[0]); entry.petid = atoi(row[1]); - entry.charname = row[2]; - entry.accountname = row[3]; - entry.lastgm = row[4]; - entry.petitiontext = row[5]; - entry.gmtext = row[6]; - entry.zone = row[7]; + entry.charname = row[2] ? row[2] : ""; + entry.accountname = row[3] ? row[3] : ""; + entry.lastgm = row[4] ? row[4] : ""; + entry.petitiontext = row[5] ? row[5] : ""; + entry.gmtext = row[6] ? row[6] : ""; + entry.zone = row[7] ? row[7] : ""; entry.urgency = atoi(row[8]); entry.charclass = atoi(row[9]); entry.charrace = atoi(row[10]); @@ -344,12 +344,12 @@ public: entry.dib = atoi(row[0]); entry.petid = atoi(row[1]); - entry.charname = row[2]; - entry.accountname = row[3]; - entry.lastgm = row[4]; - entry.petitiontext = row[5]; - entry.gmtext = row[6]; - entry.zone = row[7]; + entry.charname = row[2] ? row[2] : ""; + entry.accountname = row[3] ? row[3] : ""; + entry.lastgm = row[4] ? row[4] : ""; + entry.petitiontext = row[5] ? row[5] : ""; + entry.gmtext = row[6] ? row[6] : ""; + entry.zone = row[7] ? row[7] : ""; entry.urgency = atoi(row[8]); entry.charclass = atoi(row[9]); entry.charrace = atoi(row[10]); @@ -384,12 +384,12 @@ public: entry.dib = atoi(row[0]); entry.petid = atoi(row[1]); - entry.charname = row[2]; - entry.accountname = row[3]; - entry.lastgm = row[4]; - entry.petitiontext = row[5]; - entry.gmtext = row[6]; - entry.zone = row[7]; + entry.charname = row[2] ? row[2] : ""; + entry.accountname = row[3] ? row[3] : ""; + entry.lastgm = row[4] ? row[4] : ""; + entry.petitiontext = row[5] ? row[5] : ""; + entry.gmtext = row[6] ? row[6] : ""; + entry.zone = row[7] ? row[7] : ""; entry.urgency = atoi(row[8]); entry.charclass = atoi(row[9]); entry.charrace = atoi(row[10]); diff --git a/common/repositories/pets_equipmentset_repository.h b/common/repositories/pets_equipmentset_repository.h index 28db32734..da0e18b53 100644 --- a/common/repositories/pets_equipmentset_repository.h +++ b/common/repositories/pets_equipmentset_repository.h @@ -131,7 +131,7 @@ public: PetsEquipmentset entry{}; entry.set_id = atoi(row[0]); - entry.setname = row[1]; + entry.setname = row[1] ? row[1] : ""; entry.nested_set = atoi(row[2]); return entry; @@ -252,7 +252,7 @@ public: PetsEquipmentset entry{}; entry.set_id = atoi(row[0]); - entry.setname = row[1]; + entry.setname = row[1] ? row[1] : ""; entry.nested_set = atoi(row[2]); all_entries.push_back(entry); @@ -279,7 +279,7 @@ public: PetsEquipmentset entry{}; entry.set_id = atoi(row[0]); - entry.setname = row[1]; + entry.setname = row[1] ? row[1] : ""; entry.nested_set = atoi(row[2]); all_entries.push_back(entry); diff --git a/common/repositories/pets_repository.h b/common/repositories/pets_repository.h index 56947b5d1..343003ba5 100644 --- a/common/repositories/pets_repository.h +++ b/common/repositories/pets_repository.h @@ -145,7 +145,7 @@ public: if (results.RowCount() == 1) { Pets entry{}; - entry.type = row[0]; + entry.type = row[0] ? row[0] : ""; entry.petpower = atoi(row[1]); entry.npcID = atoi(row[2]); entry.temp = atoi(row[3]); @@ -283,7 +283,7 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Pets entry{}; - entry.type = row[0]; + entry.type = row[0] ? row[0] : ""; entry.petpower = atoi(row[1]); entry.npcID = atoi(row[2]); entry.temp = atoi(row[3]); @@ -315,7 +315,7 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Pets entry{}; - entry.type = row[0]; + entry.type = row[0] ? row[0] : ""; entry.petpower = atoi(row[1]); entry.npcID = atoi(row[2]); entry.temp = atoi(row[3]); diff --git a/common/repositories/quest_globals_repository.h b/common/repositories/quest_globals_repository.h index 60f968667..48fea575c 100644 --- a/common/repositories/quest_globals_repository.h +++ b/common/repositories/quest_globals_repository.h @@ -142,8 +142,8 @@ public: entry.charid = atoi(row[0]); entry.npcid = atoi(row[1]); entry.zoneid = atoi(row[2]); - entry.name = row[3]; - entry.value = row[4]; + entry.name = row[3] ? row[3] : ""; + entry.value = row[4] ? row[4] : ""; entry.expdate = atoi(row[5]); return entry; @@ -266,8 +266,8 @@ public: entry.charid = atoi(row[0]); entry.npcid = atoi(row[1]); entry.zoneid = atoi(row[2]); - entry.name = row[3]; - entry.value = row[4]; + entry.name = row[3] ? row[3] : ""; + entry.value = row[4] ? row[4] : ""; entry.expdate = atoi(row[5]); all_entries.push_back(entry); @@ -296,8 +296,8 @@ public: entry.charid = atoi(row[0]); entry.npcid = atoi(row[1]); entry.zoneid = atoi(row[2]); - entry.name = row[3]; - entry.value = row[4]; + entry.name = row[3] ? row[3] : ""; + entry.value = row[4] ? row[4] : ""; entry.expdate = atoi(row[5]); all_entries.push_back(entry); diff --git a/common/repositories/raid_details_repository.h b/common/repositories/raid_details_repository.h index e1c78739d..01981dd1e 100644 --- a/common/repositories/raid_details_repository.h +++ b/common/repositories/raid_details_repository.h @@ -136,7 +136,7 @@ public: entry.raidid = atoi(row[0]); entry.loottype = atoi(row[1]); entry.locked = atoi(row[2]); - entry.motd = row[3]; + entry.motd = row[3] ? row[3] : ""; return entry; } @@ -261,7 +261,7 @@ public: entry.raidid = atoi(row[0]); entry.loottype = atoi(row[1]); entry.locked = atoi(row[2]); - entry.motd = row[3]; + entry.motd = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -289,7 +289,7 @@ public: entry.raidid = atoi(row[0]); entry.loottype = atoi(row[1]); entry.locked = atoi(row[2]); - entry.motd = row[3]; + entry.motd = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/raid_members_repository.h b/common/repositories/raid_members_repository.h index 505f309d3..ccc200bb8 100644 --- a/common/repositories/raid_members_repository.h +++ b/common/repositories/raid_members_repository.h @@ -153,7 +153,7 @@ public: entry.groupid = atoi(row[2]); entry._class = atoi(row[3]); entry.level = atoi(row[4]); - entry.name = row[5]; + entry.name = row[5] ? row[5] : ""; entry.isgroupleader = atoi(row[6]); entry.israidleader = atoi(row[7]); entry.islooter = atoi(row[8]); @@ -298,7 +298,7 @@ public: entry.groupid = atoi(row[2]); entry._class = atoi(row[3]); entry.level = atoi(row[4]); - entry.name = row[5]; + entry.name = row[5] ? row[5] : ""; entry.isgroupleader = atoi(row[6]); entry.israidleader = atoi(row[7]); entry.islooter = atoi(row[8]); @@ -331,7 +331,7 @@ public: entry.groupid = atoi(row[2]); entry._class = atoi(row[3]); entry.level = atoi(row[4]); - entry.name = row[5]; + entry.name = row[5] ? row[5] : ""; entry.isgroupleader = atoi(row[6]); entry.israidleader = atoi(row[7]); entry.islooter = atoi(row[8]); diff --git a/common/repositories/reports_repository.h b/common/repositories/reports_repository.h index c336ebda5..8a8419ad9 100644 --- a/common/repositories/reports_repository.h +++ b/common/repositories/reports_repository.h @@ -134,9 +134,9 @@ public: Reports entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.reported = row[2]; - entry.reported_text = row[3]; + entry.name = row[1] ? row[1] : ""; + entry.reported = row[2] ? row[2] : ""; + entry.reported_text = row[3] ? row[3] : ""; return entry; } @@ -259,9 +259,9 @@ public: Reports entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.reported = row[2]; - entry.reported_text = row[3]; + entry.name = row[1] ? row[1] : ""; + entry.reported = row[2] ? row[2] : ""; + entry.reported_text = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -287,9 +287,9 @@ public: Reports entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.reported = row[2]; - entry.reported_text = row[3]; + entry.name = row[1] ? row[1] : ""; + entry.reported = row[2] ? row[2] : ""; + entry.reported_text = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/rule_sets_repository.h b/common/repositories/rule_sets_repository.h index 9aea58335..2d2dc1a80 100644 --- a/common/repositories/rule_sets_repository.h +++ b/common/repositories/rule_sets_repository.h @@ -128,7 +128,7 @@ public: RuleSets entry{}; entry.ruleset_id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: RuleSets entry{}; entry.ruleset_id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: RuleSets entry{}; entry.ruleset_id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/rule_values_repository.h b/common/repositories/rule_values_repository.h index 3e87fc53c..cc18b324c 100644 --- a/common/repositories/rule_values_repository.h +++ b/common/repositories/rule_values_repository.h @@ -134,9 +134,9 @@ public: RuleValues entry{}; entry.ruleset_id = atoi(row[0]); - entry.rule_name = row[1]; - entry.rule_value = row[2]; - entry.notes = row[3]; + entry.rule_name = row[1] ? row[1] : ""; + entry.rule_value = row[2] ? row[2] : ""; + entry.notes = row[3] ? row[3] : ""; return entry; } @@ -256,9 +256,9 @@ public: RuleValues entry{}; entry.ruleset_id = atoi(row[0]); - entry.rule_name = row[1]; - entry.rule_value = row[2]; - entry.notes = row[3]; + entry.rule_name = row[1] ? row[1] : ""; + entry.rule_value = row[2] ? row[2] : ""; + entry.notes = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -284,9 +284,9 @@ public: RuleValues entry{}; entry.ruleset_id = atoi(row[0]); - entry.rule_name = row[1]; - entry.rule_value = row[2]; - entry.notes = row[3]; + entry.rule_name = row[1] ? row[1] : ""; + entry.rule_value = row[2] ? row[2] : ""; + entry.notes = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/saylink_repository.h b/common/repositories/saylink_repository.h index 2e8bb2924..c0b004396 100644 --- a/common/repositories/saylink_repository.h +++ b/common/repositories/saylink_repository.h @@ -128,7 +128,7 @@ public: Saylink entry{}; entry.id = atoi(row[0]); - entry.phrase = row[1]; + entry.phrase = row[1] ? row[1] : ""; return entry; } @@ -245,7 +245,7 @@ public: Saylink entry{}; entry.id = atoi(row[0]); - entry.phrase = row[1]; + entry.phrase = row[1] ? row[1] : ""; all_entries.push_back(entry); } @@ -271,7 +271,7 @@ public: Saylink entry{}; entry.id = atoi(row[0]); - entry.phrase = row[1]; + entry.phrase = row[1] ? row[1] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/spawn2_repository.h b/common/repositories/spawn2_repository.h index 34ba80c28..bea1dc559 100644 --- a/common/repositories/spawn2_repository.h +++ b/common/repositories/spawn2_repository.h @@ -168,7 +168,7 @@ public: entry.id = atoi(row[0]); entry.spawngroupID = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.version = atoi(row[3]); entry.x = atof(row[4]); entry.y = atof(row[5]); @@ -337,7 +337,7 @@ public: entry.id = atoi(row[0]); entry.spawngroupID = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.version = atoi(row[3]); entry.x = atof(row[4]); entry.y = atof(row[5]); @@ -376,7 +376,7 @@ public: entry.id = atoi(row[0]); entry.spawngroupID = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.version = atoi(row[3]); entry.x = atof(row[4]); entry.y = atof(row[5]); diff --git a/common/repositories/spawn_condition_values_repository.h b/common/repositories/spawn_condition_values_repository.h index 0fb3b20ca..ca5cf3ba5 100644 --- a/common/repositories/spawn_condition_values_repository.h +++ b/common/repositories/spawn_condition_values_repository.h @@ -135,7 +135,7 @@ public: entry.id = atoi(row[0]); entry.value = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.instance_id = atoi(row[3]); return entry; @@ -254,7 +254,7 @@ public: entry.id = atoi(row[0]); entry.value = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.instance_id = atoi(row[3]); all_entries.push_back(entry); @@ -282,7 +282,7 @@ public: entry.id = atoi(row[0]); entry.value = atoi(row[1]); - entry.zone = row[2]; + entry.zone = row[2] ? row[2] : ""; entry.instance_id = atoi(row[3]); all_entries.push_back(entry); diff --git a/common/repositories/spawn_conditions_repository.h b/common/repositories/spawn_conditions_repository.h index 46c1e965d..22b68a6d2 100644 --- a/common/repositories/spawn_conditions_repository.h +++ b/common/repositories/spawn_conditions_repository.h @@ -136,11 +136,11 @@ public: if (results.RowCount() == 1) { SpawnConditions entry{}; - entry.zone = row[0]; + entry.zone = row[0] ? row[0] : ""; entry.id = atoi(row[1]); entry.value = atoi(row[2]); entry.onchange = atoi(row[3]); - entry.name = row[4]; + entry.name = row[4] ? row[4] : ""; return entry; } @@ -262,11 +262,11 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { SpawnConditions entry{}; - entry.zone = row[0]; + entry.zone = row[0] ? row[0] : ""; entry.id = atoi(row[1]); entry.value = atoi(row[2]); entry.onchange = atoi(row[3]); - entry.name = row[4]; + entry.name = row[4] ? row[4] : ""; all_entries.push_back(entry); } @@ -291,11 +291,11 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { SpawnConditions entry{}; - entry.zone = row[0]; + entry.zone = row[0] ? row[0] : ""; entry.id = atoi(row[1]); entry.value = atoi(row[2]); entry.onchange = atoi(row[3]); - entry.name = row[4]; + entry.name = row[4] ? row[4] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/spawn_events_repository.h b/common/repositories/spawn_events_repository.h index 760d71f9c..c9fa5d03e 100644 --- a/common/repositories/spawn_events_repository.h +++ b/common/repositories/spawn_events_repository.h @@ -164,9 +164,9 @@ public: SpawnEvents entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.cond_id = atoi(row[2]); - entry.name = row[3]; + entry.name = row[3] ? row[3] : ""; entry.period = atoi(row[4]); entry.next_minute = atoi(row[5]); entry.next_hour = atoi(row[6]); @@ -329,9 +329,9 @@ public: SpawnEvents entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.cond_id = atoi(row[2]); - entry.name = row[3]; + entry.name = row[3] ? row[3] : ""; entry.period = atoi(row[4]); entry.next_minute = atoi(row[5]); entry.next_hour = atoi(row[6]); @@ -367,9 +367,9 @@ public: SpawnEvents entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.cond_id = atoi(row[2]); - entry.name = row[3]; + entry.name = row[3] ? row[3] : ""; entry.period = atoi(row[4]); entry.next_minute = atoi(row[5]); entry.next_hour = atoi(row[6]); diff --git a/common/repositories/spawngroup_repository.h b/common/repositories/spawngroup_repository.h index 74133ccf4..6ebf6122d 100644 --- a/common/repositories/spawngroup_repository.h +++ b/common/repositories/spawngroup_repository.h @@ -161,7 +161,7 @@ public: Spawngroup entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.spawn_limit = atoi(row[2]); entry.dist = atof(row[3]); entry.max_x = atof(row[4]); @@ -322,7 +322,7 @@ public: Spawngroup entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.spawn_limit = atoi(row[2]); entry.dist = atof(row[3]); entry.max_x = atof(row[4]); @@ -359,7 +359,7 @@ public: Spawngroup entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.spawn_limit = atoi(row[2]); entry.dist = atof(row[3]); entry.max_x = atof(row[4]); diff --git a/common/repositories/spell_buckets_repository.h b/common/repositories/spell_buckets_repository.h index 1462f1ea5..05ebdc4e4 100644 --- a/common/repositories/spell_buckets_repository.h +++ b/common/repositories/spell_buckets_repository.h @@ -131,8 +131,8 @@ public: SpellBuckets entry{}; entry.spellid = atoi(row[0]); - entry.key = row[1]; - entry.value = row[2]; + entry.key = row[1] ? row[1] : ""; + entry.value = row[2] ? row[2] : ""; return entry; } @@ -252,8 +252,8 @@ public: SpellBuckets entry{}; entry.spellid = atoi(row[0]); - entry.key = row[1]; - entry.value = row[2]; + entry.key = row[1] ? row[1] : ""; + entry.value = row[2] ? row[2] : ""; all_entries.push_back(entry); } @@ -279,8 +279,8 @@ public: SpellBuckets entry{}; entry.spellid = atoi(row[0]); - entry.key = row[1]; - entry.value = row[2]; + entry.key = row[1] ? row[1] : ""; + entry.value = row[2] ? row[2] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/spell_globals_repository.h b/common/repositories/spell_globals_repository.h index d94cfa052..1f2f7e797 100644 --- a/common/repositories/spell_globals_repository.h +++ b/common/repositories/spell_globals_repository.h @@ -134,9 +134,9 @@ public: SpellGlobals entry{}; entry.spellid = atoi(row[0]); - entry.spell_name = row[1]; - entry.qglobal = row[2]; - entry.value = row[3]; + entry.spell_name = row[1] ? row[1] : ""; + entry.qglobal = row[2] ? row[2] : ""; + entry.value = row[3] ? row[3] : ""; return entry; } @@ -259,9 +259,9 @@ public: SpellGlobals entry{}; entry.spellid = atoi(row[0]); - entry.spell_name = row[1]; - entry.qglobal = row[2]; - entry.value = row[3]; + entry.spell_name = row[1] ? row[1] : ""; + entry.qglobal = row[2] ? row[2] : ""; + entry.value = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -287,9 +287,9 @@ public: SpellGlobals entry{}; entry.spellid = atoi(row[0]); - entry.spell_name = row[1]; - entry.qglobal = row[2]; - entry.value = row[3]; + entry.spell_name = row[1] ? row[1] : ""; + entry.qglobal = row[2] ? row[2] : ""; + entry.value = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/spells_new_repository.h b/common/repositories/spells_new_repository.h index 19f3f51d5..e9f48d3a3 100644 --- a/common/repositories/spells_new_repository.h +++ b/common/repositories/spells_new_repository.h @@ -833,14 +833,14 @@ public: SpellsNew entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.player_1 = row[2]; - entry.teleport_zone = row[3]; - entry.you_cast = row[4]; - entry.other_casts = row[5]; - entry.cast_on_you = row[6]; - entry.cast_on_other = row[7]; - entry.spell_fades = row[8]; + entry.name = row[1] ? row[1] : ""; + entry.player_1 = row[2] ? row[2] : ""; + entry.teleport_zone = row[3] ? row[3] : ""; + entry.you_cast = row[4] ? row[4] : ""; + entry.other_casts = row[5] ? row[5] : ""; + entry.cast_on_you = row[6] ? row[6] : ""; + entry.cast_on_other = row[7] ? row[7] : ""; + entry.spell_fades = row[8] ? row[8] : ""; entry.range = atoi(row[9]); entry.aoerange = atoi(row[10]); entry.pushback = atoi(row[11]); @@ -1890,14 +1890,14 @@ public: SpellsNew entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.player_1 = row[2]; - entry.teleport_zone = row[3]; - entry.you_cast = row[4]; - entry.other_casts = row[5]; - entry.cast_on_you = row[6]; - entry.cast_on_other = row[7]; - entry.spell_fades = row[8]; + entry.name = row[1] ? row[1] : ""; + entry.player_1 = row[2] ? row[2] : ""; + entry.teleport_zone = row[3] ? row[3] : ""; + entry.you_cast = row[4] ? row[4] : ""; + entry.other_casts = row[5] ? row[5] : ""; + entry.cast_on_you = row[6] ? row[6] : ""; + entry.cast_on_other = row[7] ? row[7] : ""; + entry.spell_fades = row[8] ? row[8] : ""; entry.range = atoi(row[9]); entry.aoerange = atoi(row[10]); entry.pushback = atoi(row[11]); @@ -2151,14 +2151,14 @@ public: SpellsNew entry{}; entry.id = atoi(row[0]); - entry.name = row[1]; - entry.player_1 = row[2]; - entry.teleport_zone = row[3]; - entry.you_cast = row[4]; - entry.other_casts = row[5]; - entry.cast_on_you = row[6]; - entry.cast_on_other = row[7]; - entry.spell_fades = row[8]; + entry.name = row[1] ? row[1] : ""; + entry.player_1 = row[2] ? row[2] : ""; + entry.teleport_zone = row[3] ? row[3] : ""; + entry.you_cast = row[4] ? row[4] : ""; + entry.other_casts = row[5] ? row[5] : ""; + entry.cast_on_you = row[6] ? row[6] : ""; + entry.cast_on_other = row[7] ? row[7] : ""; + entry.spell_fades = row[8] ? row[8] : ""; entry.range = atoi(row[9]); entry.aoerange = atoi(row[10]); entry.pushback = atoi(row[11]); diff --git a/common/repositories/task_activities_repository.h b/common/repositories/task_activities_repository.h index b6023162f..20c0580c9 100644 --- a/common/repositories/task_activities_repository.h +++ b/common/repositories/task_activities_repository.h @@ -170,16 +170,16 @@ public: entry.activityid = atoi(row[1]); entry.step = atoi(row[2]); entry.activitytype = atoi(row[3]); - entry.target_name = row[4]; - entry.item_list = row[5]; - entry.skill_list = row[6]; - entry.spell_list = row[7]; - entry.description_override = row[8]; + entry.target_name = row[4] ? row[4] : ""; + entry.item_list = row[5] ? row[5] : ""; + entry.skill_list = row[6] ? row[6] : ""; + entry.spell_list = row[7] ? row[7] : ""; + entry.description_override = row[8] ? row[8] : ""; entry.goalid = atoi(row[9]); entry.goalmethod = atoi(row[10]); entry.goalcount = atoi(row[11]); entry.delivertonpc = atoi(row[12]); - entry.zones = row[13]; + entry.zones = row[13] ? row[13] : ""; entry.optional = atoi(row[14]); return entry; @@ -336,16 +336,16 @@ public: entry.activityid = atoi(row[1]); entry.step = atoi(row[2]); entry.activitytype = atoi(row[3]); - entry.target_name = row[4]; - entry.item_list = row[5]; - entry.skill_list = row[6]; - entry.spell_list = row[7]; - entry.description_override = row[8]; + entry.target_name = row[4] ? row[4] : ""; + entry.item_list = row[5] ? row[5] : ""; + entry.skill_list = row[6] ? row[6] : ""; + entry.spell_list = row[7] ? row[7] : ""; + entry.description_override = row[8] ? row[8] : ""; entry.goalid = atoi(row[9]); entry.goalmethod = atoi(row[10]); entry.goalcount = atoi(row[11]); entry.delivertonpc = atoi(row[12]); - entry.zones = row[13]; + entry.zones = row[13] ? row[13] : ""; entry.optional = atoi(row[14]); all_entries.push_back(entry); @@ -375,16 +375,16 @@ public: entry.activityid = atoi(row[1]); entry.step = atoi(row[2]); entry.activitytype = atoi(row[3]); - entry.target_name = row[4]; - entry.item_list = row[5]; - entry.skill_list = row[6]; - entry.spell_list = row[7]; - entry.description_override = row[8]; + entry.target_name = row[4] ? row[4] : ""; + entry.item_list = row[5] ? row[5] : ""; + entry.skill_list = row[6] ? row[6] : ""; + entry.spell_list = row[7] ? row[7] : ""; + entry.description_override = row[8] ? row[8] : ""; entry.goalid = atoi(row[9]); entry.goalmethod = atoi(row[10]); entry.goalcount = atoi(row[11]); entry.delivertonpc = atoi(row[12]); - entry.zones = row[13]; + entry.zones = row[13] ? row[13] : ""; entry.optional = atoi(row[14]); all_entries.push_back(entry); diff --git a/common/repositories/tasks_repository.h b/common/repositories/tasks_repository.h index 8817973af..f08bc147e 100644 --- a/common/repositories/tasks_repository.h +++ b/common/repositories/tasks_repository.h @@ -173,9 +173,9 @@ public: entry.type = atoi(row[1]); entry.duration = atoi(row[2]); entry.duration_code = atoi(row[3]); - entry.title = row[4]; - entry.description = row[5]; - entry.reward = row[6]; + entry.title = row[4] ? row[4] : ""; + entry.description = row[5] ? row[5] : ""; + entry.reward = row[6] ? row[6] : ""; entry.rewardid = atoi(row[7]); entry.cashreward = atoi(row[8]); entry.xpreward = atoi(row[9]); @@ -184,7 +184,7 @@ public: entry.maxlevel = atoi(row[12]); entry.repeatable = atoi(row[13]); entry.faction_reward = atoi(row[14]); - entry.completion_emote = row[15]; + entry.completion_emote = row[15] ? row[15] : ""; return entry; } @@ -346,9 +346,9 @@ public: entry.type = atoi(row[1]); entry.duration = atoi(row[2]); entry.duration_code = atoi(row[3]); - entry.title = row[4]; - entry.description = row[5]; - entry.reward = row[6]; + entry.title = row[4] ? row[4] : ""; + entry.description = row[5] ? row[5] : ""; + entry.reward = row[6] ? row[6] : ""; entry.rewardid = atoi(row[7]); entry.cashreward = atoi(row[8]); entry.xpreward = atoi(row[9]); @@ -357,7 +357,7 @@ public: entry.maxlevel = atoi(row[12]); entry.repeatable = atoi(row[13]); entry.faction_reward = atoi(row[14]); - entry.completion_emote = row[15]; + entry.completion_emote = row[15] ? row[15] : ""; all_entries.push_back(entry); } @@ -386,9 +386,9 @@ public: entry.type = atoi(row[1]); entry.duration = atoi(row[2]); entry.duration_code = atoi(row[3]); - entry.title = row[4]; - entry.description = row[5]; - entry.reward = row[6]; + entry.title = row[4] ? row[4] : ""; + entry.description = row[5] ? row[5] : ""; + entry.reward = row[6] ? row[6] : ""; entry.rewardid = atoi(row[7]); entry.cashreward = atoi(row[8]); entry.xpreward = atoi(row[9]); @@ -397,7 +397,7 @@ public: entry.maxlevel = atoi(row[12]); entry.repeatable = atoi(row[13]); entry.faction_reward = atoi(row[14]); - entry.completion_emote = row[15]; + entry.completion_emote = row[15] ? row[15] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/titles_repository.h b/common/repositories/titles_repository.h index c0000289f..96cc51ca4 100644 --- a/common/repositories/titles_repository.h +++ b/common/repositories/titles_repository.h @@ -174,8 +174,8 @@ public: entry.char_id = atoi(row[8]); entry.status = atoi(row[9]); entry.item_id = atoi(row[10]); - entry.prefix = row[11]; - entry.suffix = row[12]; + entry.prefix = row[11] ? row[11] : ""; + entry.suffix = row[12] ? row[12] : ""; entry.title_set = atoi(row[13]); return entry; @@ -339,8 +339,8 @@ public: entry.char_id = atoi(row[8]); entry.status = atoi(row[9]); entry.item_id = atoi(row[10]); - entry.prefix = row[11]; - entry.suffix = row[12]; + entry.prefix = row[11] ? row[11] : ""; + entry.suffix = row[12] ? row[12] : ""; entry.title_set = atoi(row[13]); all_entries.push_back(entry); @@ -377,8 +377,8 @@ public: entry.char_id = atoi(row[8]); entry.status = atoi(row[9]); entry.item_id = atoi(row[10]); - entry.prefix = row[11]; - entry.suffix = row[12]; + entry.prefix = row[11] ? row[11] : ""; + entry.suffix = row[12] ? row[12] : ""; entry.title_set = atoi(row[13]); all_entries.push_back(entry); diff --git a/common/repositories/traps_repository.h b/common/repositories/traps_repository.h index 3f75271f1..3dcaded6c 100644 --- a/common/repositories/traps_repository.h +++ b/common/repositories/traps_repository.h @@ -185,7 +185,7 @@ public: Traps entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.version = atoi(row[2]); entry.x = atoi(row[3]); entry.y = atoi(row[4]); @@ -196,7 +196,7 @@ public: entry.effect = atoi(row[9]); entry.effectvalue = atoi(row[10]); entry.effectvalue2 = atoi(row[11]); - entry.message = row[12]; + entry.message = row[12] ? row[12] : ""; entry.skill = atoi(row[13]); entry.level = atoi(row[14]); entry.respawn_time = atoi(row[15]); @@ -378,7 +378,7 @@ public: Traps entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.version = atoi(row[2]); entry.x = atoi(row[3]); entry.y = atoi(row[4]); @@ -389,7 +389,7 @@ public: entry.effect = atoi(row[9]); entry.effectvalue = atoi(row[10]); entry.effectvalue2 = atoi(row[11]); - entry.message = row[12]; + entry.message = row[12] ? row[12] : ""; entry.skill = atoi(row[13]); entry.level = atoi(row[14]); entry.respawn_time = atoi(row[15]); @@ -423,7 +423,7 @@ public: Traps entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.version = atoi(row[2]); entry.x = atoi(row[3]); entry.y = atoi(row[4]); @@ -434,7 +434,7 @@ public: entry.effect = atoi(row[9]); entry.effectvalue = atoi(row[10]); entry.effectvalue2 = atoi(row[11]); - entry.message = row[12]; + entry.message = row[12] ? row[12] : ""; entry.skill = atoi(row[13]); entry.level = atoi(row[14]); entry.respawn_time = atoi(row[15]); diff --git a/common/repositories/tributes_repository.h b/common/repositories/tributes_repository.h index d0ef9f6de..e02d1a1e9 100644 --- a/common/repositories/tributes_repository.h +++ b/common/repositories/tributes_repository.h @@ -138,8 +138,8 @@ public: entry.id = atoi(row[0]); entry.unknown = atoi(row[1]); - entry.name = row[2]; - entry.descr = row[3]; + entry.name = row[2] ? row[2] : ""; + entry.descr = row[3] ? row[3] : ""; entry.isguild = atoi(row[4]); return entry; @@ -264,8 +264,8 @@ public: entry.id = atoi(row[0]); entry.unknown = atoi(row[1]); - entry.name = row[2]; - entry.descr = row[3]; + entry.name = row[2] ? row[2] : ""; + entry.descr = row[3] ? row[3] : ""; entry.isguild = atoi(row[4]); all_entries.push_back(entry); @@ -293,8 +293,8 @@ public: entry.id = atoi(row[0]); entry.unknown = atoi(row[1]); - entry.name = row[2]; - entry.descr = row[3]; + entry.name = row[2] ? row[2] : ""; + entry.descr = row[3] ? row[3] : ""; entry.isguild = atoi(row[4]); all_entries.push_back(entry); diff --git a/common/repositories/variables_repository.h b/common/repositories/variables_repository.h index 2cc5de8a2..2563bd1cc 100644 --- a/common/repositories/variables_repository.h +++ b/common/repositories/variables_repository.h @@ -133,10 +133,10 @@ public: if (results.RowCount() == 1) { Variables entry{}; - entry.varname = row[0]; - entry.value = row[1]; - entry.information = row[2]; - entry.ts = row[3]; + entry.varname = row[0] ? row[0] : ""; + entry.value = row[1] ? row[1] : ""; + entry.information = row[2] ? row[2] : ""; + entry.ts = row[3] ? row[3] : ""; return entry; } @@ -258,10 +258,10 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Variables entry{}; - entry.varname = row[0]; - entry.value = row[1]; - entry.information = row[2]; - entry.ts = row[3]; + entry.varname = row[0] ? row[0] : ""; + entry.value = row[1] ? row[1] : ""; + entry.information = row[2] ? row[2] : ""; + entry.ts = row[3] ? row[3] : ""; all_entries.push_back(entry); } @@ -286,10 +286,10 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Variables entry{}; - entry.varname = row[0]; - entry.value = row[1]; - entry.information = row[2]; - entry.ts = row[3]; + entry.varname = row[0] ? row[0] : ""; + entry.value = row[1] ? row[1] : ""; + entry.information = row[2] ? row[2] : ""; + entry.ts = row[3] ? row[3] : ""; all_entries.push_back(entry); } diff --git a/common/repositories/veteran_reward_templates_repository.h b/common/repositories/veteran_reward_templates_repository.h index 6e18d16b5..55dfbf592 100644 --- a/common/repositories/veteran_reward_templates_repository.h +++ b/common/repositories/veteran_reward_templates_repository.h @@ -137,7 +137,7 @@ public: VeteranRewardTemplates entry{}; entry.claim_id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.item_id = atoi(row[2]); entry.charges = atoi(row[3]); entry.reward_slot = atoi(row[4]); @@ -263,7 +263,7 @@ public: VeteranRewardTemplates entry{}; entry.claim_id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.item_id = atoi(row[2]); entry.charges = atoi(row[3]); entry.reward_slot = atoi(row[4]); @@ -292,7 +292,7 @@ public: VeteranRewardTemplates entry{}; entry.claim_id = atoi(row[0]); - entry.name = row[1]; + entry.name = row[1] ? row[1] : ""; entry.item_id = atoi(row[2]); entry.charges = atoi(row[3]); entry.reward_slot = atoi(row[4]); diff --git a/common/repositories/zone_points_repository.h b/common/repositories/zone_points_repository.h index f76c3f777..1d9f76389 100644 --- a/common/repositories/zone_points_repository.h +++ b/common/repositories/zone_points_repository.h @@ -173,7 +173,7 @@ public: ZonePoints entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.version = atoi(row[2]); entry.number = atoi(row[3]); entry.y = atof(row[4]); @@ -350,7 +350,7 @@ public: ZonePoints entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.version = atoi(row[2]); entry.number = atoi(row[3]); entry.y = atof(row[4]); @@ -391,7 +391,7 @@ public: ZonePoints entry{}; entry.id = atoi(row[0]); - entry.zone = row[1]; + entry.zone = row[1] ? row[1] : ""; entry.version = atoi(row[2]); entry.number = atoi(row[3]); entry.y = atof(row[4]); diff --git a/common/repositories/zone_repository.h b/common/repositories/zone_repository.h index a22e67865..d4f29fa65 100644 --- a/common/repositories/zone_repository.h +++ b/common/repositories/zone_repository.h @@ -379,11 +379,11 @@ public: if (results.RowCount() == 1) { Zone entry{}; - entry.short_name = row[0]; + entry.short_name = row[0] ? row[0] : ""; entry.id = atoi(row[1]); - entry.file_name = row[2]; - entry.long_name = row[3]; - entry.map_file_name = row[4]; + entry.file_name = row[2] ? row[2] : ""; + entry.long_name = row[3] ? row[3] : ""; + entry.map_file_name = row[4] ? row[4] : ""; entry.safe_x = atof(row[5]); entry.safe_y = atof(row[6]); entry.safe_z = atof(row[7]); @@ -395,7 +395,7 @@ public: entry.timezone = atoi(row[13]); entry.maxclients = atoi(row[14]); entry.ruleset = atoi(row[15]); - entry.note = row[16]; + entry.note = row[16] ? row[16] : ""; entry.underworld = atof(row[17]); entry.minclip = atof(row[18]); entry.maxclip = atof(row[19]); @@ -430,7 +430,7 @@ public: entry.fog_minclip4 = atof(row[48]); entry.fog_maxclip4 = atof(row[49]); entry.fog_density = atof(row[50]); - entry.flag_needed = row[51]; + entry.flag_needed = row[51] ? row[51] : ""; entry.canbind = atoi(row[52]); entry.cancombat = atoi(row[53]); entry.canlevitate = atoi(row[54]); @@ -832,11 +832,11 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Zone entry{}; - entry.short_name = row[0]; + entry.short_name = row[0] ? row[0] : ""; entry.id = atoi(row[1]); - entry.file_name = row[2]; - entry.long_name = row[3]; - entry.map_file_name = row[4]; + entry.file_name = row[2] ? row[2] : ""; + entry.long_name = row[3] ? row[3] : ""; + entry.map_file_name = row[4] ? row[4] : ""; entry.safe_x = atof(row[5]); entry.safe_y = atof(row[6]); entry.safe_z = atof(row[7]); @@ -848,7 +848,7 @@ public: entry.timezone = atoi(row[13]); entry.maxclients = atoi(row[14]); entry.ruleset = atoi(row[15]); - entry.note = row[16]; + entry.note = row[16] ? row[16] : ""; entry.underworld = atof(row[17]); entry.minclip = atof(row[18]); entry.maxclip = atof(row[19]); @@ -883,7 +883,7 @@ public: entry.fog_minclip4 = atof(row[48]); entry.fog_maxclip4 = atof(row[49]); entry.fog_density = atof(row[50]); - entry.flag_needed = row[51]; + entry.flag_needed = row[51] ? row[51] : ""; entry.canbind = atoi(row[52]); entry.cancombat = atoi(row[53]); entry.canlevitate = atoi(row[54]); @@ -942,11 +942,11 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Zone entry{}; - entry.short_name = row[0]; + entry.short_name = row[0] ? row[0] : ""; entry.id = atoi(row[1]); - entry.file_name = row[2]; - entry.long_name = row[3]; - entry.map_file_name = row[4]; + entry.file_name = row[2] ? row[2] : ""; + entry.long_name = row[3] ? row[3] : ""; + entry.map_file_name = row[4] ? row[4] : ""; entry.safe_x = atof(row[5]); entry.safe_y = atof(row[6]); entry.safe_z = atof(row[7]); @@ -958,7 +958,7 @@ public: entry.timezone = atoi(row[13]); entry.maxclients = atoi(row[14]); entry.ruleset = atoi(row[15]); - entry.note = row[16]; + entry.note = row[16] ? row[16] : ""; entry.underworld = atof(row[17]); entry.minclip = atof(row[18]); entry.maxclip = atof(row[19]); @@ -993,7 +993,7 @@ public: entry.fog_minclip4 = atof(row[48]); entry.fog_maxclip4 = atof(row[49]); entry.fog_density = atof(row[50]); - entry.flag_needed = row[51]; + entry.flag_needed = row[51] ? row[51] : ""; entry.canbind = atoi(row[52]); entry.cancombat = atoi(row[53]); entry.canlevitate = atoi(row[54]); diff --git a/utils/scripts/generators/repository-generator.pl b/utils/scripts/generators/repository-generator.pl index 77508ecb6..cfaf46b42 100644 --- a/utils/scripts/generators/repository-generator.pl +++ b/utils/scripts/generators/repository-generator.pl @@ -274,8 +274,8 @@ foreach my $table_to_generate (@tables) { $find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = atof(row[%s]);\n", $column_name, $index); } else { - $all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = row[%s];\n", $column_name, $index); - $find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = row[%s];\n", $column_name, $index); + $all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = row[%s] ? row[%s] : \"\";\n", $column_name, $index, $index); + $find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = row[%s] ? row[%s] : \"\";\n", $column_name, $index, $index); } # print $column_name . "\n"; diff --git a/world/world_server_command_handler.cpp b/world/world_server_command_handler.cpp index bd7e674e5..36fb364b3 100644 --- a/world/world_server_command_handler.cpp +++ b/world/world_server_command_handler.cpp @@ -438,8 +438,6 @@ namespace WorldserverCommandHandler { zone.id ); } - - } }