mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11014] Fix some typos in MassMailMgr
This commit is contained in:
parent
f9a6513d38
commit
3de0f99f59
3 changed files with 12 additions and 12 deletions
|
|
@ -82,16 +82,16 @@ void MassMailMgr::Update(bool sendall /*= false*/)
|
|||
{
|
||||
MassMail& task = m_massMails.front();
|
||||
|
||||
while (!task.m_recivers.empty() && (sendall || maxcount > 0))
|
||||
while (!task.m_receivers.empty() && (sendall || maxcount > 0))
|
||||
{
|
||||
uint32 receiver_lowguid = *task.m_recivers.begin();
|
||||
task.m_recivers.erase(task.m_recivers.begin());
|
||||
uint32 receiver_lowguid = *task.m_receivers.begin();
|
||||
task.m_receivers.erase(task.m_receivers.begin());
|
||||
|
||||
ObjectGuid receiver_guid = ObjectGuid(HIGHGUID_PLAYER, receiver_lowguid);
|
||||
Player *receiver = sObjectMgr.GetPlayer(receiver_guid);
|
||||
|
||||
// last case. can be just send
|
||||
if (task.m_recivers.empty())
|
||||
if (task.m_receivers.empty())
|
||||
{
|
||||
// prevent mail return
|
||||
task.m_protoMail->SendMailTo(MailReceiver(receiver, receiver_guid), task.m_sender, MAIL_CHECK_MASK_RETURNED);
|
||||
|
|
@ -112,7 +112,7 @@ void MassMailMgr::Update(bool sendall /*= false*/)
|
|||
--maxcount;
|
||||
}
|
||||
|
||||
if (task.m_recivers.empty())
|
||||
if (task.m_receivers.empty())
|
||||
m_massMails.pop_front();
|
||||
}
|
||||
while(!m_massMails.empty() && (sendall || maxcount > 0));
|
||||
|
|
@ -124,7 +124,7 @@ void MassMailMgr::GetStatistic(uint32& tasks, uint32& mails, uint32& needTime) c
|
|||
|
||||
uint32 mailsCount = 0;
|
||||
for (MassMailList::const_iterator mailItr = m_massMails.begin(); mailItr != m_massMails.end(); ++mailItr)
|
||||
mailsCount += mailItr->m_recivers.size();
|
||||
mailsCount += mailItr->m_receivers.size();
|
||||
|
||||
mails = mailsCount;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include <memory>
|
||||
|
||||
/**
|
||||
* A class to represent the mail send factory to multiply (often all existed) characters.
|
||||
* A class to represent the mail send factory to multiple (often all existing) characters.
|
||||
*
|
||||
* Note: implementation not persistence for server shutdowns
|
||||
*/
|
||||
|
|
@ -62,7 +62,7 @@ class MassMailMgr
|
|||
* @param mailProto prepared mail for clone and send to characters, will deleted in result call.
|
||||
* @param raceMask mask of races that must receive mail.
|
||||
*
|
||||
* Note: this function safe to be called from Map::Update content/etc, real data add will executed in next tick after query resultrs ready
|
||||
* Note: this function safe to be called from Map::Update content/etc, real data add will executed in next tick after query results ready
|
||||
*/
|
||||
void AddMassMailTask(MailDraft* mailProto, MailSender sender, uint32 raceMask);
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ class MassMailMgr
|
|||
* @param mailProto prepared mail for clone and send to characters, will deleted in result call
|
||||
* @param queryStr SQL query for get guid list of receivers, first field in query result must be uint32 low guids list.
|
||||
*
|
||||
* Note: this function safe to be called from Map::Update content/etc, real data add will executed in next tick after query resultrs ready
|
||||
* Note: this function safe to be called from Map::Update content/etc, real data add will executed in next tick after query results ready
|
||||
*/
|
||||
void AddMassMailTask(MailDraft* mailProto, MailSender sender, char const* queryStr);
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ class MassMailMgr
|
|||
ReceiversList& AddMassMailTask(MailDraft* mailProto, MailSender sender)
|
||||
{
|
||||
m_massMails.push_back(MassMail(mailProto, sender));
|
||||
return m_massMails.rbegin()->m_recivers;
|
||||
return m_massMails.rbegin()->m_receivers;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -115,7 +115,7 @@ class MassMailMgr
|
|||
std::auto_ptr<MailDraft> m_protoMail;
|
||||
|
||||
MailSender m_sender;
|
||||
ReceiversList m_recivers;
|
||||
ReceiversList m_receivers;
|
||||
};
|
||||
|
||||
typedef std::list<MassMail> MassMailList;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11013"
|
||||
#define REVISION_NR "11014"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue