Decouple temporary merchant list call [skip ci]

This commit is contained in:
Akkadius
2020-03-30 21:32:59 -05:00
parent 43716332aa
commit 79dbddd56e
7 changed files with 115 additions and 73 deletions
+6 -11
View File
@@ -472,21 +472,16 @@ void Database::AssignRaidToInstance(uint32 raid_id, uint32 instance_id)
}
void Database::BuryCorpsesInInstance(uint16 instance_id) {
std::string query = StringFormat(
"UPDATE `character_corpses` "
"SET `is_buried` = 1, "
"`instance_id` = 0 "
"WHERE "
"`instance_id` = %u ",
instance_id
);
auto results = QueryDatabase(query);
QueryDatabase(
fmt::format(
"UPDATE character_corpses SET is_buried = 1, instance_id = 0 WHERE instance_id = {}",
instance_id
)
);
}
void Database::DeleteInstance(uint16 instance_id)
{
// TODO: BOUNDARY REWRITE
std::string query = StringFormat("DELETE FROM instance_list WHERE id=%u", instance_id);
QueryDatabase(query);
+2
View File
@@ -115,6 +115,7 @@ namespace Logs {
Flee,
Aura,
HotReload,
Merchants,
MaxCategoryID /* Don't Remove this */
};
@@ -189,6 +190,7 @@ namespace Logs {
"Flee",
"Aura",
"HotReload",
"Merchants",
};
}
+16
View File
@@ -571,6 +571,16 @@
OutF(LogSys, Logs::Detail, Logs::HotReload, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define LogMerchants(message, ...) do {\
if (LogSys.log_settings[Logs::Merchants].is_category_enabled == 1)\
OutF(LogSys, Logs::General, Logs::Merchants, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define LogMerchantsDetail(message, ...) do {\
if (LogSys.log_settings[Logs::Merchants].is_category_enabled == 1)\
OutF(LogSys, Logs::Detail, Logs::Merchants, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define Log(debug_level, log_category, message, ...) do {\
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
@@ -910,6 +920,12 @@
#define LogHotReloadDetail(message, ...) do {\
} while (0)
#define LogMerchants(message, ...) do {\
} while (0)
#define LogMerchantsDetail(message, ...) do {\
} while (0)
#define Log(debug_level, log_category, message, ...) do {\
} while (0)