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>
Changed multi-segment taxi paths to fly nearby flight masters along the way, not directly through them.
Taxi cost on multi-segment paths is now charged per segment when it is started.
Properly send taxi node status on login, as well as if the taxi master is out of range.
Apply reputation discount to all points in multi-segment paths.
Properly clean up list of taxi destinations upon arrival at final node.
Teleport players to the destination taxi node location instead of their current ground position.
Don't start a spline with just 1 point in FlightPathMovementGenerator
Source: TrinityCore.
* fix(Core): Save gameobject state on instances
Currently, azerothcore doesn't save gameobject states on instances.
Whenever there's a re-start or crash, the instance's gameobjects and
their states aren't saved, producing un-wanted behaviours and blocking instances at times.
Implemented CRUD for new table `instance_saved_data` that holds the states of gameobjects.
- When worldserver launches and gameobjects are loaded, this will check
if this object's state exists on the DB and sets the previous state.
- On instance deletion (reset) these states are also removed based on
the instance ID.
- Whenever a gameobject state changes inside a dungeon or raid, we save
on the database the set state.
* Select query to synchronous and used FindMap()
* loading gameobject states on create
* reseting instance saved data
* missing reset methods and on create state
* database structure
* Update src/server/game/Entities/GameObject/GameObject.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/game/Entities/GameObject/GameObject.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/game/Entities/GameObject/GameObject.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/game/Entities/GameObject/GameObject.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/game/Entities/Player/PlayerMisc.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/game/Groups/Group.cpp
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* codestyle
* table changes
* table style
* codestyle
* table changes for columns
* data sanitization
* todo:
- Finish loading db data into the containers
- Using containers to find data
- How to get data from ObjectMGR inside Gameobject?
* loading on start up and db changes
* Removing unused data structure
* Uninitialised integer
* Whitespace
* clean-up and hooks to save states on memory
* Codestyle MySQL deprecated backticks
* i dont understand codefactor
* build
* Update data/sql/updates/pending_db_world/rev_1643395587559675400.sql
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* Update src/server/game/Globals/ObjectMgr.h
Co-authored-by: Kargatum <dowlandtop@yandex.com>
* review changes
* unecessary removal
* pushback instead of emplace
* wrong database update
* Update ObjectMgr.cpp
* missing check
* removing entry from the PR
* missing removals
* last delete
* build
* aha! Found the culprit for the sudden assert errors
* type safety, save only important gameobjects
* static cast to unsigned short
* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
* type changes
* queries fix
* fix build
* enabling which gameobjects to save on the database
* deadmines iron clad door
* Adjustment to gameobject onj create state and instances:
- Gnomeregan doors and Grubbis boss state
- Deadmines missing doors
- Stratholme gameobjects state saved
* forgot emi blastfuse change to despawn
* Leaving group logic
* codestyle
* fixing merge issues
* prevent bad behaviour
* brain meltdown
* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql
* Update data/sql/updates/pending_db_world/rev_1649359139539727000.sql
Co-authored-by: Claudiodfc <54484196+claudiodfc@users.noreply.github.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Kargatum <dowlandtop@yandex.com>
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
* refactor(DB): Handle SQL files in a new way
* remove proof that it works files
* Update rev_1650721405699287200.sql
* Update rev_1650721339143444200.sql
* Update rev_1650721386624384400.sql
* fix build
* fix
* auth
* char
* world
* archive
* new files
* v
* correct auth db
* add support get last file from archive
* correct world updates
* fix auth
* pendinig to normal
* add pending auth
* add pendings
* smallint
* MEDIUMINT