[10970] Implement mass mail send infrastructure.

It expected to be used in 2 case: some gameevent must send mails at start/end,
and this can be useful in game commands. Both case wil implemented in later commits.

* New MassMailMgr can accept tasks for send mass mails in safe way for map update threads context/etc.
* It work in way:
   - By provided race mask or more generic SQL query string in async query selected affected characters
   - At query result ready at next world tick update in safe common part of tick code some from mails
     from queued mas mail tasks send.
   - Amount mails limited MassMailer.SendPerTick confir option (10 by default). This done for prevent
     high server load/lags at send too many mails in one tick (mail send all existed characters in DB
     who match to seelction criteria)
   - Manager not persistant for server shutdowns so any not send mails in queue lost at shutdown.
     But with default setting 10K mail send in 20 secs (10000/50/10). Adding more safe execution
     for this case will make related code lot more slow and req. many DB tables and code support.
This commit is contained in:
VladimirMangos 2011-01-06 05:48:35 +03:00
parent 231c6d77ce
commit 5f2aef756a
13 changed files with 331 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10969"
#define REVISION_NR "10970"
#endif // __REVISION_NR_H__