автор:
VladimirMangos
m src/game/Mail.cpp
m src/game/Mail.h
m src/game/Makefile.am
+ src/game/MassMailMgr.cpp
+ src/game/MassMailMgr.h
m src/game/World.cpp
m src/game/World.h
m src/mangosd/mangosd.conf.dist.in
m src/shared/revision_nr.h
m win/VC100/game.vcxproj
m win/VC100/game.vcxproj.filters
m win/VC80/game.vcproj
m win/VC90/game.vcproj
[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.
Дальше...