Simplify error logging

This commit is contained in:
Akkadius
2019-09-01 22:05:44 -05:00
parent 98cbb7d781
commit 678c25e02c
44 changed files with 532 additions and 486 deletions
+11 -11
View File
@@ -62,17 +62,17 @@ uint32 ZoneDatabase::GetZoneForage(uint32 ZoneID, uint8 skill) {
return 0;
}
uint8 index = 0;
for (auto row = results.begin(); row != results.end(); ++row, ++index) {
if (index >= FORAGE_ITEM_LIMIT)
break;
item[index] = atoi(row[0]);
chance[index] = atoi(row[1]) + chancepool;
Log(Logs::General, Logs::Error, "Possible Forage: %d with a %d chance", item[index], chance[index]);
chancepool = chance[index];
}
uint8 index = 0;
for (auto row = results.begin(); row != results.end(); ++row, ++index) {
if (index >= FORAGE_ITEM_LIMIT) {
break;
}
item[index] = atoi(row[0]);
chance[index] = atoi(row[1]) + chancepool;
LogError("Possible Forage: [{}] with a [{}] chance", item[index], chance[index]);
chancepool = chance[index];
}
if(chancepool == 0 || index < 1)
return 0;
@@ -413,7 +413,7 @@ void Client::ForageItem(bool guarantee) {
const EQEmu::ItemData* food_item = database.GetItem(foragedfood);
if(!food_item) {
Log(Logs::General, Logs::Error, "nullptr returned from database.GetItem in ClientForageItem");
LogError("nullptr returned from database.GetItem in ClientForageItem");
return;
}