aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Mails/Mail.cpp
diff options
context:
space:
mode:
authorsilinoron <none@none>2010-08-23 19:56:47 -0700
committersilinoron <none@none>2010-08-23 19:56:47 -0700
commit8649bee17fdd477623465a0ef22abe4d80b74fc3 (patch)
treef652ac8f180d88345cfd5ecdc779b4296d154189 /src/server/game/Mails/Mail.cpp
parentb30800e9bcc38faf4bcbe443240a6d0797ad88e5 (diff)
Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Mails/Mail.cpp')
-rw-r--r--src/server/game/Mails/Mail.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 311414c1103..3d7ffb0b9ab 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -92,9 +92,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
Player* pl = _player;
- if (pl->getLevel() < sWorld.getConfig(CONFIG_MAIL_LEVEL_REQ))
+ if (pl->getLevel() < sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_MAIL_SENDER_REQ), sWorld.getConfig(CONFIG_MAIL_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_MAIL_SENDER_REQ), sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ));
return;
}
@@ -175,15 +175,15 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
}
}
- if (!accountBound && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER)
+ if (!accountBound && !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER)
{
pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM);
return;
}
- if (receiveLevel < sWorld.getConfig(CONFIG_MAIL_LEVEL_REQ))
+ if (receiveLevel < sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_MAIL_RECEIVER_REQ), sWorld.getConfig(CONFIG_MAIL_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_MAIL_RECEIVER_REQ), sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ));
return;
}
@@ -255,7 +255,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
for (uint8 i = 0; i < items_count; ++i)
{
Item* item = items[i];
- if (GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
+ if (GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand(GetAccountId(), "GM %s (Account: %u) mail item: %s (Entry: %u Count: %u) to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), item->GetProto()->Name1, item->GetEntry(), item->GetCount(), receiver.c_str(), rc_account);
@@ -275,7 +275,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
needItemDelay = pl->GetSession()->GetAccountId() != rc_account;
}
- if (money > 0 && GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
+ if (money > 0 && GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), money, receiver.c_str(), rc_account);
@@ -283,7 +283,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
// If theres is an item, there is a one hour delivery delay if sent to another account's character.
- uint32 deliver_delay = needItemDelay ? sWorld.getConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
+ uint32 deliver_delay = needItemDelay ? sWorld.getIntConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
// will delete item or place to receiver mail list
draft
@@ -448,7 +448,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
uint32 sender_accId = 0;
- if (GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
+ if (GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
{
std::string sender_name;
if (receive)
@@ -903,7 +903,7 @@ void MailDraft::SendReturnToSender(uint32 sender_acc, uint32 sender_guid, uint32
}
// If theres is an item, there is a one hour delivery delay.
- uint32 deliver_delay = needItemDelay ? sWorld.getConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
+ uint32 deliver_delay = needItemDelay ? sWorld.getIntConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
// will delete item or place to receiver mail list
SendMailTo(trans,MailReceiver(receiver,receiver_guid), MailSender(MAIL_NORMAL, sender_guid), MAIL_CHECK_MASK_RETURNED, deliver_delay);
@@ -926,7 +926,7 @@ void MailDraft::SendMailTo(SQLTransaction& trans, MailReceiver const& receiver,
// auction mail without any items and money
if (sender.GetMailMessageType() == MAIL_AUCTION && m_items.empty() && !m_money)
- expire_delay = sWorld.getConfig(CONFIG_MAIL_DELIVERY_DELAY);
+ expire_delay = sWorld.getIntConfig(CONFIG_MAIL_DELIVERY_DELAY);
// mail from battlemaster (rewardmarks) should last only one day
else if (sender.GetMailMessageType() == MAIL_CREATURE && sBattlegroundMgr.GetBattleMasterBG(sender.GetSenderId()) != BATTLEGROUND_TYPE_NONE)
expire_delay = DAY;