mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -89,12 +89,10 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32
|
||||
uint32 timeHr = (((time / 60) / 60) / 12);
|
||||
uint32 deposit = uint32(((multiplier * MSV * count / 3) * timeHr * 3) * sWorld->getRate(RATE_AUCTION_DEPOSIT));
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("auctionHouse", "MSV: %u", MSV);
|
||||
LOG_DEBUG("auctionHouse", "Items: %u", count);
|
||||
LOG_DEBUG("auctionHouse", "Multiplier: %f", multiplier);
|
||||
LOG_DEBUG("auctionHouse", "Deposit: %u", deposit);
|
||||
#endif
|
||||
|
||||
if (deposit < AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT))
|
||||
return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT);
|
||||
@@ -295,8 +293,8 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -312,7 +310,7 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template);
|
||||
if (!proto)
|
||||
{
|
||||
LOG_ERROR("server", "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
|
||||
LOG_ERROR("auctionHouse", "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -327,8 +325,8 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void AuctionHouseMgr::LoadAuctions()
|
||||
@@ -340,8 +338,8 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -366,8 +364,8 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void AuctionHouseMgr::AddAItem(Item* it)
|
||||
@@ -675,7 +673,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
|
||||
Item* item = sAuctionMgr->GetAItem(item_guid);
|
||||
if (!item)
|
||||
{
|
||||
LOG_ERROR("server", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %s", Id, item_guid.ToString().c_str());
|
||||
LOG_ERROR("auctionHouse", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %s", Id, item_guid.ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
data << uint32(Id);
|
||||
@@ -758,7 +756,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
|
||||
auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntryFromHouse(houseId);
|
||||
if (!auctionHouseEntry)
|
||||
{
|
||||
LOG_ERROR("server", "Auction %u has invalid house id %u", Id, houseId);
|
||||
LOG_ERROR("auctionHouse", "Auction %u has invalid house id %u", Id, houseId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -766,7 +764,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
|
||||
// and item_template in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
|
||||
if (!sAuctionMgr->GetAItem(item_guid))
|
||||
{
|
||||
LOG_ERROR("server", "Auction %u has not a existing item : %s", Id, item_guid.ToString().c_str());
|
||||
LOG_ERROR("auctionHouse", "Auction %u has not a existing item : %s", Id, item_guid.ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user