Renamed DoLog to Out as the aggregate logging function for simplicity of use and shortened syntax of Log.Out

This commit is contained in:
Akkadius
2015-01-18 02:00:15 -06:00
parent 1c048cb1d1
commit c025765283
119 changed files with 2653 additions and 2653 deletions
+53 -53
View File
@@ -124,7 +124,7 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const Ite
account_id, slot_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error runing inventory verification query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error runing inventory verification query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
//returning true is less harmful in the face of a query error
return true;
}
@@ -214,7 +214,7 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
}
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "UpdateInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "UpdateInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@@ -258,7 +258,7 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst,
}
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "UpdateSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "UpdateSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@@ -271,7 +271,7 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid = %i", char_id, slot_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@@ -284,7 +284,7 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
char_id, base_slot_id, (base_slot_id+10));
results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteInventorySlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteInventorySlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@@ -299,7 +299,7 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
std::string query = StringFormat("DELETE FROM sharedbank WHERE acctid=%i AND slotid=%i", account_id, slot_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@@ -313,7 +313,7 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
account_id, base_slot_id, (base_slot_id+10));
results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteSharedBankSlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteSharedBankSlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@@ -403,7 +403,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
"FROM sharedbank WHERE acctid=%i", id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Database::GetSharedBank(uint32 account_id): %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Database::GetSharedBank(uint32 account_id): %s", results.ErrorMessage().c_str());
return false;
}
@@ -423,7 +423,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
const Item_Struct* item = GetItem(item_id);
if (!item) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error,
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error,
"Warning: %s %i has an invalid item_id %i in inventory slot %i",
((is_charid==true) ? "charid" : "acctid"), id, item_id, slot_id);
continue;
@@ -473,7 +473,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
if (put_slot_id != INVALID_INDEX)
continue;
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in shared bank inventory: %s=%i, item_id=%i, slot_id=%i",
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in shared bank inventory: %s=%i, item_id=%i, slot_id=%i",
((is_charid==true)? "charid": "acctid"), id, item_id, slot_id);
if (is_charid)
@@ -492,8 +492,8 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
"FROM inventory WHERE charid = %i ORDER BY slotid", char_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
return false;
}
@@ -521,7 +521,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
const Item_Struct* item = GetItem(item_id);
if (!item) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error,"Warning: charid %i has an invalid item_id %i in inventory slot %i", char_id, item_id, slot_id);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error,"Warning: charid %i has an invalid item_id %i in inventory slot %i", char_id, item_id, slot_id);
continue;
}
@@ -587,7 +587,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
else if (slot_id >= 3111 && slot_id <= 3179)
{
// Admins: please report any occurrences of this error
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Defunct location for item in inventory: charid=%i, item_id=%i, slot_id=%i .. pushing to cursor...", char_id, item_id, slot_id);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Defunct location for item in inventory: charid=%i, item_id=%i, slot_id=%i .. pushing to cursor...", char_id, item_id, slot_id);
put_slot_id = inv->PushCursor(*inst);
}
else
@@ -599,7 +599,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
// Save ptr to item in inventory
if (put_slot_id == INVALID_INDEX) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: charid=%i, item_id=%i, slot_id=%i",char_id, item_id, slot_id);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: charid=%i, item_id=%i, slot_id=%i",char_id, item_id, slot_id);
}
}
@@ -617,8 +617,8 @@ bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv)
name, account_id);
auto results = QueryDatabase(query);
if (!results.Success()){
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
return false;
}
@@ -704,7 +704,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv)
// Save ptr to item in inventory
if (put_slot_id == INVALID_INDEX)
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: name=%s, acctid=%i, item_id=%i, slot_id=%i", name, account_id, item_id, slot_id);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: name=%s, acctid=%i, item_id=%i, slot_id=%i", name, account_id, item_id, slot_id);
}
@@ -720,7 +720,7 @@ void SharedDatabase::GetItemsCount(int32 &item_count, uint32 &max_id) {
const std::string query = "SELECT MAX(id), count(*) FROM items";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetItemsCount '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetItemsCount '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -760,7 +760,7 @@ bool SharedDatabase::LoadItems() {
items_hash = new EQEmu::FixedMemoryHashSet<Item_Struct>(reinterpret_cast<uint8*>(items_mmf->Get()), size);
mutex.Unlock();
} catch(std::exception& ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Items: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Items: %s", ex.what());
return false;
}
@@ -805,7 +805,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
"updated FROM items ORDER BY id";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "LoadItems '%s', %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "LoadItems '%s', %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1018,7 +1018,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
try {
hash.insert(item.ID, item);
} catch(std::exception &ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Database::LoadItems: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Database::LoadItems: %s", ex.what());
break;
}
}
@@ -1079,7 +1079,7 @@ std::string SharedDatabase::GetBook(const char *txtfile)
}
if (results.RowCount() == 0) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "No book to send, (%s)", txtfile);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "No book to send, (%s)", txtfile);
txtout.assign(" ",1);
return txtout;
}
@@ -1097,7 +1097,7 @@ void SharedDatabase::GetFactionListInfo(uint32 &list_count, uint32 &max_lists) {
const std::string query = "SELECT COUNT(*), MAX(id) FROM npc_faction";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1132,7 +1132,7 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
"ON npc_faction.id = npc_faction_entries.npc_faction_id ORDER BY npc_faction.id;";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1198,7 +1198,7 @@ bool SharedDatabase::LoadNPCFactionLists() {
faction_hash = new EQEmu::FixedMemoryHashSet<NPCFactionList>(reinterpret_cast<uint8*>(faction_mmf->Get()), size);
mutex.Unlock();
} catch(std::exception& ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading npc factions: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading npc factions: %s", ex.what());
return false;
}
@@ -1216,8 +1216,8 @@ ItemInst* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1,
inst = CreateBaseItem(item, charges);
if (inst == nullptr) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
return nullptr;
}
@@ -1242,8 +1242,8 @@ ItemInst* SharedDatabase::CreateItem(const Item_Struct* item, int16 charges, uin
inst = CreateBaseItem(item, charges);
if (inst == nullptr) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
return nullptr;
}
@@ -1273,8 +1273,8 @@ ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, int16 charges)
inst = new ItemInst(item, charges);
if (inst == nullptr) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateBaseItem()");
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateBaseItem()");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
return nullptr;
}
@@ -1344,7 +1344,7 @@ bool SharedDatabase::LoadSkillCaps() {
mutex.Unlock();
} catch(std::exception &ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading skill caps: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading skill caps: %s", ex.what());
return false;
}
@@ -1360,7 +1360,7 @@ void SharedDatabase::LoadSkillCaps(void *data) {
const std::string query = "SELECT skillID, class, level, cap FROM skill_caps ORDER BY skillID, class, level";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading skill caps from database: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading skill caps from database: %s", results.ErrorMessage().c_str());
return;
}
@@ -1462,7 +1462,7 @@ void SharedDatabase::LoadDamageShieldTypes(SPDat_Spell_Struct* sp, int32 iMaxSpe
"AND `spellid` <= %i", iMaxSpellID);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadDamageShieldTypes: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadDamageShieldTypes: %s %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1482,7 +1482,7 @@ int SharedDatabase::GetMaxSpellID() {
std::string query = "SELECT MAX(id) FROM spells_new";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Error in GetMaxSpellID query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Error in GetMaxSpellID query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return -1;
}
@@ -1497,12 +1497,12 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
const std::string query = "SELECT * FROM spells_new ORDER BY id ASC";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Error in LoadSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Error in LoadSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
if(results.ColumnCount() <= SPELL_LOAD_FIELD_COUNT) {
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT(%u)", SPELL_LOAD_FIELD_COUNT);
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT(%u)", SPELL_LOAD_FIELD_COUNT);
return;
}
@@ -1512,7 +1512,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
for (auto row = results.begin(); row != results.end(); ++row) {
tempid = atoi(row[0]);
if(tempid >= max_spells) {
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Non fatal error: spell.id >= max_spells, ignoring.");
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Non fatal error: spell.id >= max_spells, ignoring.");
continue;
}
@@ -1658,7 +1658,7 @@ int SharedDatabase::GetMaxBaseDataLevel() {
const std::string query = "SELECT MAX(level) FROM base_data";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetMaxBaseDataLevel query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetMaxBaseDataLevel query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return -1;
}
@@ -1691,7 +1691,7 @@ bool SharedDatabase::LoadBaseData() {
mutex.Unlock();
} catch(std::exception& ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Base Data: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Base Data: %s", ex.what());
return false;
}
@@ -1704,7 +1704,7 @@ void SharedDatabase::LoadBaseData(void *data, int max_level) {
const std::string query = "SELECT * FROM base_data ORDER BY level, class ASC";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1716,22 +1716,22 @@ void SharedDatabase::LoadBaseData(void *data, int max_level) {
cl = atoi(row[1]);
if(lvl <= 0) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.level <= 0, ignoring.");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.level <= 0, ignoring.");
continue;
}
if(lvl >= max_level) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.level >= max_level, ignoring.");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.level >= max_level, ignoring.");
continue;
}
if(cl <= 0) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.cl <= 0, ignoring.");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.cl <= 0, ignoring.");
continue;
}
if(cl > 16) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.class > 16, ignoring.");
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.class > 16, ignoring.");
continue;
}
@@ -1784,7 +1784,7 @@ void SharedDatabase::GetLootTableInfo(uint32 &loot_table_count, uint32 &max_loot
const std::string query = "SELECT COUNT(*), MAX(id), (SELECT COUNT(*) FROM loottable_entries) FROM loottable";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1806,7 +1806,7 @@ void SharedDatabase::GetLootDropInfo(uint32 &loot_drop_count, uint32 &max_loot_d
const std::string query = "SELECT COUNT(*), MAX(id), (SELECT COUNT(*) FROM lootdrop_entries) FROM lootdrop";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1832,7 +1832,7 @@ void SharedDatabase::LoadLootTables(void *data, uint32 size) {
"ON loottable.id = loottable_entries.loottable_id ORDER BY id";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@@ -1886,7 +1886,7 @@ void SharedDatabase::LoadLootDrops(void *data, uint32 size) {
"ON lootdrop.id = lootdrop_entries.lootdrop_id ORDER BY lootdrop_id";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot drop info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot drop info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
}
uint32 current_id = 0;
@@ -1940,7 +1940,7 @@ bool SharedDatabase::LoadLoot() {
loot_drop_mmf->Size());
mutex.Unlock();
} catch(std::exception &ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading loot: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading loot: %s", ex.what());
return false;
}
@@ -1956,7 +1956,7 @@ const LootTable_Struct* SharedDatabase::GetLootTable(uint32 loottable_id) {
return &loot_table_hash->at(loottable_id);
}
} catch(std::exception &ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not get loot table: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not get loot table: %s", ex.what());
}
return nullptr;
}
@@ -1970,7 +1970,7 @@ const LootDrop_Struct* SharedDatabase::GetLootDrop(uint32 lootdrop_id) {
return &loot_drop_hash->at(lootdrop_id);
}
} catch(std::exception &ex) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not get loot drop: %s", ex.what());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not get loot drop: %s", ex.what());
}
return nullptr;
}