1. Core Cleanup
- Move all ServerMail logic from `ObjectMgr` into a new dedicated `ServerMailMgr` class
- Move faction logic for money from SendServerMail into the script
2. Separation of items into a new table
- Create a new `mail_server_template_items` table
- Allows to send multiple items in one mail
- Separate items per faction Alliance/Horde
3. Separation of conditions into a new table
- Create a new `mail_server_template_conditions` table
- Allows to use multiple conditions for one mail
- Available condition types
- Minimum playtime (playerLevel >= condition)
- Minimum playtime (playerPlayTime >= condition)
- Rewarded quest
- Earned achievement
- Earned reputation (playerReputation >= conditionState)
- Faction
- Race
- Class
4. Updated ServerMail loading
- Move item and condition loading to their own functions
- LoadMailServerTemplateItems()
- LoadMailServerTemplateConditions()
5. Reworked eligibility check
- Player needs to pass all conditions to be eligible for the mail
- All players are automatically eligible if no conditions exist for a server mail template.
6. Updated foreign keys
- For table `mail_server_character`, `mail_server_template_conditions`, `mail_server_template_items` foreign key with on delete cascade is added for automatic removal of entries if mail_server_template.id is deleted.
7. Database changes
- See the PR
* Create rev_1719945200692175000.sql
Migrate to the correct folder
* Delete data/sql/updates/pending_db_character directory
f96d4c8670
The SQL file was placed in the wrong folder
* refactor(DB/Misc): Improve loading time
* NOTE: Running these SQL files can take several minutes (up to 30minutes depending on your system!)
* This will improve loading time over 50%
* comment out error on editing broadcast_text tables
* Update data/sql/updates/pending_db_world/rev_1679045387127819800.sql
* rework riggle bassbait script
* make sure STV_FISHING_HAS_WINNER gets reset
* add script for npc Jang, some improvements for Riggle script. TODO: Jang quest menu and Fishbot5000 quest condition
* fix jang not offering quest
* script fishbot 5000
* some cleanup
* some more cleanuo
* endline
* minimum fishing req for quests is 150
* min fishing skill for flyer is 150
* link box to correct event
* riggle: broadcast texts, announcement happens when pools despawn
* remove redundant code
* Convert Fishbot5000 to db, cleanup comments
* add missing end line - finished now.
* attempt to fix event not launching in real time
* fix condition for world states, when value is 0, convert jang to db
* keep jang gossip also when event has a winner
* small further improvements
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* apply suggestions
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* apply suggestions
* apply one more suggestion
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/scripts/World/npcs_special.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* apply suggestion
* use Talk() instead of Yell()
* use Yell() without passing LANG_UNIVERSAL
Co-authored-by: schell244 <>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>