mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[9389] Cleanup config data. Use proper names and expected types.
This commit is contained in:
parent
58d188f21a
commit
ebfb0f9835
63 changed files with 1591 additions and 967 deletions
|
|
@ -849,7 +849,7 @@ void Guild::LoadGuildEventLogFromDB()
|
|||
if (!result)
|
||||
return;
|
||||
bool isNextLogGuidSet = false;
|
||||
//uint32 configCount = sWorld.getConfig(CONFIG_GUILD_EVENT_LOG_COUNT);
|
||||
//uint32 configCount = sWorld.getConfig(CONFIG_UINT32_GUILD_EVENT_LOG_COUNT);
|
||||
// First event in list will be the oldest and the latest event is last event in list
|
||||
do
|
||||
{
|
||||
|
|
@ -889,7 +889,7 @@ void Guild::LogGuildEvent(uint8 EventType, uint32 PlayerGuid1, uint32 PlayerGuid
|
|||
NewEvent.NewRank = NewRank;
|
||||
NewEvent.TimeStamp = uint32(time(NULL));
|
||||
// Count new LogGuid
|
||||
m_GuildEventLogNextGuid = (m_GuildEventLogNextGuid + 1) % sWorld.getConfig(CONFIG_GUILD_EVENT_LOG_COUNT);
|
||||
m_GuildEventLogNextGuid = (m_GuildEventLogNextGuid + 1) % sWorld.getConfig(CONFIG_UINT32_GUILD_EVENT_LOG_COUNT);
|
||||
// Check max records limit
|
||||
if (m_GuildEventLog.size() >= GUILD_EVENTLOG_MAX_RECORDS)
|
||||
m_GuildEventLog.pop_front();
|
||||
|
|
@ -1415,7 +1415,7 @@ void Guild::LoadGuildBankEventLogFromDB()
|
|||
{
|
||||
// Money log is in TabId = GUILD_BANK_MONEY_LOGS_TAB
|
||||
|
||||
// uint32 configCount = sWorld.getConfig(CONFIG_GUILD_BANK_EVENT_LOG_COUNT);
|
||||
// uint32 configCount = sWorld.getConfig(CONFIG_UINT32_GUILD_BANK_EVENT_LOG_COUNT);
|
||||
// cycle through all purchased guild bank item tabs
|
||||
for (uint32 tabId = 0; tabId < m_PurchasedTabs; ++tabId)
|
||||
{
|
||||
|
|
@ -1580,7 +1580,7 @@ void Guild::LogBankEvent(uint8 EventType, uint8 TabId, uint32 PlayerGuidLow, uin
|
|||
uint32 currentLogGuid = 0;
|
||||
if (NewEvent.isMoneyEvent())
|
||||
{
|
||||
m_GuildBankEventLogNextGuid_Money = (m_GuildBankEventLogNextGuid_Money + 1) % sWorld.getConfig(CONFIG_GUILD_BANK_EVENT_LOG_COUNT);
|
||||
m_GuildBankEventLogNextGuid_Money = (m_GuildBankEventLogNextGuid_Money + 1) % sWorld.getConfig(CONFIG_UINT32_GUILD_BANK_EVENT_LOG_COUNT);
|
||||
currentLogGuid = m_GuildBankEventLogNextGuid_Money;
|
||||
currentTabId = GUILD_BANK_MONEY_LOGS_TAB;
|
||||
if (m_GuildBankEventLog_Money.size() >= GUILD_BANK_MAX_LOGS)
|
||||
|
|
@ -1590,7 +1590,7 @@ void Guild::LogBankEvent(uint8 EventType, uint8 TabId, uint32 PlayerGuidLow, uin
|
|||
}
|
||||
else
|
||||
{
|
||||
m_GuildBankEventLogNextGuid_Item[TabId] = ((m_GuildBankEventLogNextGuid_Item[TabId]) + 1) % sWorld.getConfig(CONFIG_GUILD_BANK_EVENT_LOG_COUNT);
|
||||
m_GuildBankEventLogNextGuid_Item[TabId] = ((m_GuildBankEventLogNextGuid_Item[TabId]) + 1) % sWorld.getConfig(CONFIG_UINT32_GUILD_BANK_EVENT_LOG_COUNT);
|
||||
currentLogGuid = m_GuildBankEventLogNextGuid_Item[TabId];
|
||||
if (m_GuildBankEventLog_Item[TabId].size() >= GUILD_BANK_MAX_LOGS)
|
||||
m_GuildBankEventLog_Item[TabId].pop_front();
|
||||
|
|
@ -2141,7 +2141,7 @@ void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, u
|
|||
if (pItemChar)
|
||||
{
|
||||
// logging item move to bank
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE))
|
||||
{
|
||||
sLog.outCommand(pl->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
|
||||
pl->GetName(),pl->GetSession()->GetAccountId(),
|
||||
|
|
@ -2216,7 +2216,7 @@ void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot,
|
|||
}
|
||||
|
||||
// logging item move to bank (before items merge
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE))
|
||||
{
|
||||
sLog.outCommand(pl->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
|
||||
pl->GetName(),pl->GetSession()->GetAccountId(),
|
||||
|
|
@ -2242,7 +2242,7 @@ void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot,
|
|||
if (msg == EQUIP_ERR_OK) // merge
|
||||
{
|
||||
// logging item move to bank
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE))
|
||||
{
|
||||
sLog.outCommand(pl->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
|
||||
pl->GetName(),pl->GetSession()->GetAccountId(),
|
||||
|
|
@ -2292,7 +2292,7 @@ void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot,
|
|||
}
|
||||
|
||||
// logging item move to bank
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (pl->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE))
|
||||
{
|
||||
sLog.outCommand(pl->GetSession()->GetAccountId(), "GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
|
||||
pl->GetName(), pl->GetSession()->GetAccountId(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue