feat (core\db): Server Mail Reward System #162
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is based on my module with remake assistance from @Kitzunu to make it a core feature back on azerothcore.
The Server Mail Reward System is known to be a blizzlike retail feature, the only challenge is, are we able to present it as a blizzlike retail feature in the terms of a open source project. We are able to incorporate play time as a option with the option to input subject and body messages, which would work out in replicating seasonal and promotional blizzlike messages that were never present in the dbc\db2 files. This also helps with the ease of localization since we have a active collumn to have the reward run active or not. by default tables are blank, however two simple examples are provided below at the bottom.
Co-Authored-By: Kitzunu [email protected]
In-Game:
New Tables
Character Database:
Explanation of tables:
The `mail_server_character` table
This table keeps entries of which player has recieved a server mail. This prevents the same mail to be sent twice to the same player.
Structure
Description of the fields
guid
characters.guid.
mailId
mail_server_template.id.
The `mail_server_template` table
This table contains information for server mail to be sent to players that meet the requirement. Mails are sent OnLogin.
Structure
Description of the fields
id
Unique ID.
reqLevel
Players required level to be able to recieve the mail.
reqPlayTime
Players required play time in milliseconds to recieve the mail.
moneyA
Money in copper that is sent to Alliance player.
moneyH
Money in copper that is sent to Horde player.
itemA
item_template.entry that is sent to Alliance player.
itemCountA
How many of the specified itemA is sent.
itemH
item_template.entry.
itemCountH
How many of the specified itemH is sent that is sent to Horde player.
subject
The title/subject of the mail.
body
The body of the mail.
active
boolean
Examples
Apply to Character DB
Issues addressed
SOURCE:
Tests performed
How to Test the Changes:
Known issues and TODO list