Need to talk about interesting changes of BattleGround system from TrinityCore, from this branch
for this big job.
- Core/Misc: calculate rotation fields from orientation in some places it's impossible to get:
- SmartScripts: SMART_ACTION_SUMMON_GO
- Spell Effects:
- Command Scripts: .gobject add
- [WiP] Core/PvP: Extensive cleanup, bug-fixing and optimization of Battleground scripts:
- Standards: Moved all statics to cpps where they belong.
- Cleanups: NULL -> nullptr, moved #defines to constants/enums
- Added a helper struct for handling spawns easily. Rewrote spawns using it.
- Moved spawn containers to private scope of Battleground (idea taken from boss states array in InstanceScripts)
- Remove unused teamId parameter from Battleground::SpawnCreature
- Prevent Battleground::RelocateDeadPlayers creating new entries on map.
- Make AddObject return a GameObject pointer instead of a bool (just like its AddCreature sibling)
- Corrected and added proper GO rotation to spawns
- De-hardcode buff entries for Battlegrounds, each BG uses their own entries (blizzlike).
- Moved logs from incorrect logger "sql.sql" to "bg.battleground"
Additional Notes for some BGs:
- Warsong Gulch:
* Fixed inverted worldstates of flags being sent to new players, wrong flag state was shown on UI
|- Alterac Valley:|
* Fix Snowfall graveyard cap time as per Patch 2.3.0
* Use proper gameobject entries for each node (blizzlike)
* Removed magic numbers in favor of compile time consts (enum offsets etc)
* More additional missing spawns (both creatures and gameobjects)
|- Isle of Conquest:|
* Removed Transport pointers from class, instead store GUIDs and use HashMapHolder to access them
* Fixed some wrong spawns which had Y coord set as X coord, Z as Y and Orientation as Z, fix a double spawn related to this
* Additional cleanups of spawn code that checked if the spawn was correct only to then do a Get(spawntype) to manipulate it.
* Incremented door close time to 30 seconds, as it is on sniff
|- Strand of the Ancients:|
* Fixed sending timer to players that join with BG in progress
* Corrected ships rotation as per sniff
* Added missing seaforium bomb spawns
* Implemented team switch logic to different spawn entries (like Titan Relic)
* Implemented changing teleport locations depending on destroyed doors (Closes #12127)
- Magic typedef
- Kill magic numbers in Arathi Basin, replace node timers with eventMap
- Initial work on Siege Engine, also some sql import fixes
- Fixed teleport to gunship (Todo: sometimes will not find the trigger)
- Fix siege engine!