Minor styling tidy up

This commit is contained in:
Antz 2020-05-24 21:01:04 +01:00
parent b6dda4df13
commit 2d32788121
7 changed files with 22 additions and 26 deletions

View File

@ -125,7 +125,7 @@ bool ChatHandler::HandleTicketCloseCommand(char* args)
ObjectGuid target_guid = ticket->GetPlayerGuid(); ObjectGuid target_guid = ticket->GetPlayerGuid();
// Get Player // Get Player
// Can be nullptr if player is offline // Can be nullptr if player is offline
Player* pPlayer = sObjectMgr.GetPlayer(target_guid); Player* pPlayer = sObjectMgr.GetPlayer(target_guid);
@ -441,7 +441,7 @@ bool ChatHandler::HandleTicketRespondCommand(char* args)
ObjectGuid target_guid = ticket->GetPlayerGuid(); ObjectGuid target_guid = ticket->GetPlayerGuid();
// Get Player // Get Player
// Can be nullptr if player is offline // Can be nullptr if player is offline
Player* target = sObjectMgr.GetPlayer(target_guid); Player* target = sObjectMgr.GetPlayer(target_guid);

View File

@ -30,7 +30,7 @@
/********************************************************************** /**********************************************************************
CommandTable : mailCommandTable CommandTable : mailCommandTable
/***********************************************************************/ /***********************************************************************/
// Send mail by command // Send mail by command
bool ChatHandler::HandleSendMailCommand(char* args) bool ChatHandler::HandleSendMailCommand(char* args)
{ {
if (!*args) if (!*args)

View File

@ -1013,8 +1013,7 @@ enum MangosStrings
LANG_HONOR_LAST_WEEK = 1438, LANG_HONOR_LAST_WEEK = 1438,
LANG_HONOR_LIFE = 1439, LANG_HONOR_LIFE = 1439,
LANG_COMMAND_TICKETUPDATED = 1440, LANG_COMMAND_TICKETUPDATED = 1440,
// Room for old clients 1.x 1441499 not used // Room for old clients 1.x 1441-1499 not used
// Level 2 (continue) // Level 2 (continue)
LANG_POOL_CHANCE_POOL_LIST_CONSOLE = 1500, LANG_POOL_CHANCE_POOL_LIST_CONSOLE = 1500,

View File

@ -1021,7 +1021,7 @@ void ChatHandler::PSendSysMessageMultiline(int32 entry, ...)
va_end(ap); va_end(ap);
std::string mangosString(str); std::string mangosString(str);
/* Used for tracking our position within the string while iterating through it */ /* Used for tracking our position within the string while iterating through it */
std::string::size_type pos = 0, nextpos; std::string::size_type pos = 0, nextpos;
@ -1315,7 +1315,7 @@ void ChatHandler::ExecuteCommand(const char* text)
int loc_idx = m_session->GetSessionDbLocaleIndex(); int loc_idx = m_session->GetSessionDbLocaleIndex();
sCommandMgr.GetCommandHelpLocaleString(command->Id, loc_idx, &helpText); sCommandMgr.GetCommandHelpLocaleString(command->Id, loc_idx, &helpText);
} }
SendSysMessage(helpText.c_str()); SendSysMessage(helpText.c_str());
} }
else else

View File

@ -51,32 +51,32 @@ class Unit;
class ChatCommand class ChatCommand
{ {
public: public:
uint32 Id; uint32 Id;
const char* Name; const char* Name;
uint32 SecurityLevel; // function pointer required correct align (use uint32) uint32 SecurityLevel; // function pointer required correct align (use uint32)
bool AllowConsole; bool AllowConsole;
bool (ChatHandler::* Handler)(char* args); bool (ChatHandler::* Handler)(char* args);
std::string Help; std::string Help;
ChatCommand* ChildCommands; ChatCommand* ChildCommands;
ChatCommand( ChatCommand(
const char* pName, const char* pName,
uint32 pSecurityLevel, uint32 pSecurityLevel,
bool pAllowConsole, bool pAllowConsole,
bool (ChatHandler::* pHandler)(char* args), bool (ChatHandler::* pHandler)(char* args),
std::string pHelp, std::string pHelp,
ChatCommand* pChildCommands ChatCommand* pChildCommands
) )
: Id(-1) : Id(-1)
{ {
Name = pName; Name = pName;
SecurityLevel = pSecurityLevel; SecurityLevel = pSecurityLevel;
AllowConsole = pAllowConsole; AllowConsole = pAllowConsole;
Handler = pHandler; Handler = pHandler;
Help = pHelp; Help = pHelp;
ChildCommands = pChildCommands; ChildCommands = pChildCommands;
} }
}; };
enum ChatCommandSearchResult enum ChatCommandSearchResult

View File

@ -88,7 +88,7 @@ void WorldSession::HandleGMTicketUpdateTextOpcode(WorldPacket& recv_data)
GMTicket * ticket = sTicketMgr.GetGMTicket(GetPlayer()->GetObjectGuid()); GMTicket * ticket = sTicketMgr.GetGMTicket(GetPlayer()->GetObjectGuid());
// Notify all GM that the ticket has been changed // Notify all GM that the ticket has been changed
sObjectAccessor.DoForAllPlayers([ticket, this](Player* player) sObjectAccessor.DoForAllPlayers([ticket, this](Player* player)
{ {
if (player->GetSession()->GetSecurity() >= SEC_GAMEMASTER && player->isAcceptTickets()) if (player->GetSession()->GetSecurity() >= SEC_GAMEMASTER && player->isAcceptTickets())

View File

@ -323,11 +323,11 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
// expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour // expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour
uint32 expire_delay; uint32 expire_delay;
// Normal Mail Expire Timer // Normal Mail Expire Timer
expire_delay = 30 * DAY; expire_delay = 30 * DAY;
// auction mail without any items and money // auction mail without any items and money (auction sale note) pending 1 hour
if (sender.GetMailMessageType() == MAIL_AUCTION && m_items.empty() && !m_money) if (sender.GetMailMessageType() == MAIL_AUCTION && m_items.empty() && !m_money)
{ {
expire_delay = HOUR; expire_delay = HOUR;
@ -342,14 +342,11 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
// COD Mail Expire Timer // COD Mail Expire Timer
expire_delay = 3 * DAY; expire_delay = 3 * DAY;
} }
//Mail from GM //Mail from GM
else if (sender.GetStationery() == MAIL_STATIONERY_GM) else if (sender.GetStationery() == MAIL_STATIONERY_GM)
{ {
expire_delay = 90 * DAY; expire_delay = 90 * DAY;
} }
time_t expire_time = deliver_time + expire_delay; time_t expire_time = deliver_time + expire_delay;