Also implement save game event state to DB mostly for avoid
send mails at resume game event after server downtime.
Thanks to X-Savior for inspiring and original research.
* New comamnds mirror related normal sedn commands:
- send mass items
- send mass mail
- send mass money
* Instead player name it expect or numeric racemask or textual race/team name or 'all'.
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.
* Use Set* names for cases when function replace old value by new (instead Add*)
* Prevent hidden MailDraft copy create becase if draft have items its can't be just shared
and need preoprtly cloned, but item close is high price operation (guid use, DB tiuched and etc)
So this must be explictly operation. In next commits will be added clone function for this.
* Some MailDraft overwrite by assign cases rewrited to more clean way.
Visual appearance depend on model animation capability.
In addition, change stand state for creature at enter combat when creature has custom stand state.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Thanks to Qsa prepare for mangos.
Note: single unsure case: is block chance must be show or set to 0 in shield disarm time.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.
Signed-off-by: zergtmn <zerg@myisp.com>
* Table `game_event_model_equip` renamed to `game_event_creature_data`
* Table allow now store same creatures for different events, BUT
expected that related events no active in same time.
* Added possibility switch entry at gameevent time.
This let have diff factions/loot and etc for creatures.
* Added possibility cast spells at gameevent start/end.
Exist some spells that expected casted to creature at gameevent start
for model replace, and for animation in other cases.
Note: `game_event_creature_data`.`modelid` field posisble will removed soon in fowor related spell use.
Ofc, when spells will implemented in core.
Race can also be creature race and needed for future implementation of spells.
RACE_UNDEAD_PLAYER renamed to more proper RACE_UNDEAD
Signed-off-by: NoFantasy <nofantasy@nf.no>