Glad to present updated battleground system:
- - 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)
* Fix siege engine!
* Fixed teleport to gunship (Todo: sometimes will not find the trigger)
- Arathi Basin:
* Kill magic numbers in Arathi Basin, replace node timers with eventMap