Commit Graph
565 Commits
Author SHA1 Message Date
Shauren 073a036d84 Core/Battlefields: Refactor Battlefield creation to be linked to host map creation instead of having globally accessible objects 2022-07-19 23:18:19 +02:00
Shauren 775be0682a Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects 2022-07-18 22:45:03 +02:00
Shauren c42e52f171 Core/OutdoorPvP: Move Halaa spawns to db using worldstate conditions 2022-07-18 20:21:58 +02:00
Shauren db79e29121 Core/WorldStates: Skip sending SMSG_UPDATE_WORLD_STATE when value does not change 2022-07-09 00:50:29 +02:00
Shauren de26cafbbe Core/WorldStates: Allow setting "hidden" field of SMSG_UPDATE_WORLD_STATE 2022-07-07 23:07:20 +02:00
Shauren 70eacebad5 Core/WorldStates: Add area requirements to world states 2022-06-26 21:27:17 +02:00
Shauren 737d94d7ef Core/World: implement database support for default map and realm wide world states
Co-Authored-By: Shauren <[email protected]>
2022-06-25 22:48:27 +02:00
Shauren 5d27939667 Core/Conditions: Implemented conditions for spawn groups 2022-06-24 22:20:34 +02:00
Shauren cace414497 Core/Transports: Localized transport objects within each map
Transports no longer move between maps, each map gets a separate copy of the transport object and players are moved between them when transferring to another map
This means they can no longer be globally looked up in HashMapHolder
2022-06-13 20:06:26 +02:00
Shauren 94d829c84f Core/Pools: Implemented pooling for instances 2022-06-11 14:04:56 +02:00
Shauren 630b60eb0d Core/GameObjects: Transport (type 11) improvements
* Fully synchronize serverside animation progress with client
* Implemented updating passenger positions on elevators
* Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
2022-05-25 22:14:32 +02:00
Shauren 3031fbb63b Core/Objects: Remove restriction on what object types can be set as active 2022-05-25 22:07:47 +02:00
Shauren 5e90f188f8 Core/Corpses: Fixed crash in corpse creation 2022-04-24 14:31:55 +02:00
Shauren 22edf79c70 Core/Achievements: Implemented GameEvent related criteria types 73 and 93 2022-04-24 13:59:51 +02:00
Shauren fddd6cdf3f Core/Objects: Initialize position data and zone/instance script for all worldobject types (except player) 2022-04-23 23:03:22 +02:00
Shauren 4eba978670 Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags 2022-03-26 18:59:44 +01:00
Ovah 21177487ea Core/Spawns: prevent spawn groups from bypassing spawnMask restrictions (#26711)
* spawn groups have been able to spawn for all difficulties even when they should be restricted to a single difficulty only

(cherry picked from commit 48f63eda9029d4fe16b7a350059c8e26ba8484ce)
2022-03-11 19:28:56 +01:00
Giacomo Pozzoni 9c3dc31a37 Core/Pools: Fix pools with 1 member never spawning anything anymore (#26620)
* Core/Pools: Fix pools with 1 member never spawning anything anymore

Attempts to fix a 6 years old bug and never fixed by the original author.

* Remove respawn times from db once a respawn has been handled

* Allow to specify if Despawn1Object() should save or not the respawn time. We don't need to do that when respawning an object.

* Apply the same fix to GameObjects too

(cherry picked from commit c8ca48823d45dadb042a80637eff954483dd5328)
2022-03-11 13:39:15 +01:00
HelloKitty a67bb1f575 Core/Map: Added Map::SetZoneOverrideLight std::chrono overload (#26486)
* Core/Map: Added Map::SetZoneOverrideLight std::chrono overload

* Scripts: Replace Map::SetZoneOverrideLight usages with new std::chrono overload

* Core/Map: Remove non-chrono Map::SetZoneOverrideLight overload

(cherry picked from commit e33c4b8f7f18c89fec3d95531fdccad526c12c10)
2022-03-09 14:56:04 +01:00
Mikhail Redko 9e6def8ae2 Core/Console: Improve ReadWinConsole logic and cosmetic changes (#26402)
* Core/Console: Improve ReadWinConsole logic and cosmetic changes

* Core/Console: Fixed possible appearance of weird characters in the console when printing the output of child processes

* Fix codestyle

* Removed auto

* Core/Misc: Explicit casting Difficulty values to uint8 before outputting to console

* Core/Misc: Cast Difficulty to uint32 for output to console

Co-authored-by: jackpoz <[email protected]>
(cherry picked from commit 6c12f45f3b7d7eab32ed29860d2261fc8a512f0e)
2022-03-09 14:55:18 +01:00
Giacomo Pozzoni 9bcff210f9 Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z (#26092)
Use a fixed offset 0.5f instead of full collision height when retrieving floor Z as a full collision height ended up on the floor above a few times. It makes more sense to cast the ray just a bit higher up than using a full collision height (which by default is 2.0f)

(cherry picked from commit f96aab2186d17ddd286fa42913f3f14e9562c4eb)
2022-03-06 22:24:01 +01:00
Kargatum 373ed8f46b Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf

(cherry picked from commit a32b6b8ac4c81128a56b282f20837fb085bdd9e7)
2022-03-05 20:07:57 +01:00
Treeston 5b9fec5f0b Core/Maps: Move some more Map internals to actually be... internals.
(cherry picked from commit 94c03b2107ad6603aaf185d58d63480e79c97e76)
2022-03-05 17:12:51 +01:00
Treeston b5f3a6fd80 Core/Maps: All RespawnInfo* handed to outside code are now RespawnInfo const*, to signify that outside code has zero business changing these.
(cherry picked from commit 803dc789e42ea2298a8bd1822849b6f2df82efe6)
2022-03-05 17:12:23 +01:00
Treeston a8d00ddd69 Core/Maps: move pooling hand-off outside of Map::CheckRespawn (PR#25785)
fixes #25777

(cherry picked from commit f8afcec9f3efc58ce8a38a6c63e2ebfc24d2e01d)
2022-03-05 17:07:46 +01:00
Giacomo Pozzoni 30ebecc0de Core/Maps: Attempt to fix picking the wrong min height (#25771)
Close #25652

(cherry picked from commit aabd2b49e2710e00c39c4b4f22fef08aa029d4db)
2022-03-05 17:03:14 +01:00
jackpoz bea8894bce Core/Maps: Partially revert 0c69316714d0558e32462f5401197fe1e803ae75
The development will continue in a PR

(cherry picked from commit 1e3d85e2839c5ee3170223f4d985eecd527c5533)
2022-03-05 17:02:38 +01:00
jackpoz c14f4dc835 Core/Maps: Use the same logic to calculate grid coords to avoid mismatches
Use the same logic of (CENTER_GRID_ID - x / SIZE_OF_GRIDS) in GridMap::getMinHeight() as Map::GetGrid() to avoid coord grid mismatches caused by floating point precision, i.e. getting the wrong grid.
Replace defines with constexpr in grids to make debugging easier.

Closes #25652

(cherry picked from commit 0c69316714d0558e32462f5401197fe1e803ae75)
2022-03-05 17:02:19 +01:00
Gildor 6b681ebc8a Core/Visibility: Split BG/Arena visibility settings (#25690)
(cherry picked from commit 8217519ea2d64917d725d8141fb3247bcadf716b)
2022-03-05 16:25:30 +01:00
Shauren ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
Giacomo Pozzoni ca498ffab2 Core/Maps: Always update the grid of player summons even if far away (#25406)
* Core/Maps: Always update the grid of player summons even if far away

* Code cleanup

* Use a vector instead of unordered_set

(cherry picked from commit c68faf108edf50ae8a2ff4a341eff1e0d4269cbc)
2022-02-05 13:46:49 +01:00
Giacomo Pozzoni 99ee958e0a Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888

(cherry picked from commit cfc8f7b442a9dba07b198fcebe2c02ab89cf0a8b)
2022-02-04 12:18:15 +01:00
kvipka 5a20f14a99 Scripts/InstanceScript: Fix an issue where LoadAllGrids would load creatures before TeamInInstance was properly set (PR #25340)
(cherry picked from commit 5d2780c43c36b0ae1cc4ac2694bf6ec464d079c7)
2022-02-04 12:05:36 +01:00
Shauren 5a82a0381d Core/Objects: Properly choose between "Destroyed" or "OutOfRange" during visibility update 2022-01-29 16:01:57 +01:00
Shauren 472384e757 Core/Objects: Add overridable function UpdateObjectVisibilityOnDestroy 2022-01-29 15:18:27 +01:00
Giacomo Pozzoni 61bf51874d Core/Misc: Fix static analysis issues (#25178)
(cherry picked from commit 7cf122fc2a604bae77d0b935536c41ec9203e62d)
2022-01-24 20:21:25 +01:00
Peter Keresztes Schmidt 44ea32ace4 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
2022-01-23 22:16:15 +01:00
jackpoz 68faf5bc4b Core/Common: Replace ASSERT(false, "...") with ABORT_MSG("...")
(cherry picked from commit 54c701cf0db81c0062e8c5020e07db18984d0ffa)
2022-01-19 22:17:42 +01:00
Giacomo Pozzoni 07f42907c6 Log number of Creatures and GameObject per map (#24809)
* Shared/Metric: Allow to specify tags in metrics

* Core/Metric: Log number of Creatures and GameObject per map

* Apply feedback

* Codestyle changes

* Codestyle changes

* Remove whitespace

* Update Grafana dashboards to v7.0.3

* Fix missing filter on realm

* Include Creatures and Gameobjects in Maps dashboard

* Show instances with a different color

(cherry picked from commit 4e1dbd1cf808c9cf1f310b6d498f7e304dfb4147)
2022-01-06 23:15:07 +01:00
Giacomo Pozzoni 1ba940b17a Core/Maps: Change .map file version from FourCC to uint32 (#26326)
(cherry picked from commit 42877e75e2a67514dfeb185661e4f397b6eb044a)
2022-01-04 20:44:25 +01:00
NoName 0aa98a5bc9 Core/Maps: fix respawn times for manual respawns (#24571)
by joshwhedon

(cherry picked from commit 5bbab32793eb66ffb05e88d5dac2bce3de249477)
2022-01-02 13:56:18 +01:00
Giacomo Pozzoni 97c1d01cbb Core/Pooling: Remove respawn times from the database when despawning a pool (#24422)
* Core/Pooling: Remove respawn times from the database when despawning a pool

Remove respawn times from the database when despawning a pool. This is needed when a Game Event ends but there are still some respawn times saved in the database.

* Remove respawn time of active pool objects even if they are not spawned

(cherry picked from commit 4f33fd3932d362466ee017111895bf14fcc79c88)
2022-01-01 14:02:00 +01:00
Giacomo Pozzoni a9e325f6b7 Core/Logs: Log full guid instead of just low guid, part 2
(cherry picked from commit 3def52c1c459f566ab2b2d8cf017c70df4d7cf22)
2022-01-01 00:51:54 +01:00
Giacomo Pozzoni 6ec933f281 Core/Logs: Log full guid instead of just low guid
(cherry picked from commit 468ecb7252ea4eabd37e11b9ddbbb96ffd26bd7e)
2021-12-31 21:56:40 +01:00
Matan ShukryandShauren 8fabe5a3aa Core/Phasing: Implemented db spawns in personal phases (#26345)
Co-authored-by: Shauren <[email protected]>
2021-12-28 13:24:10 +01:00
Treeston ea0aa63d96 Core/Misc: C++17 cleanups, commit 2, the advstd commit
(cherry picked from commit 857f8d9231d148d4f2def9c83548b40059923029)
2021-12-24 00:37:21 +01:00
Shauren e8d1f37ee0 Core/Maps: Citizens of Dalaran! Raise your eyes to the skies and observe! Any non-map-default light can now be overriden!
Closes #24250

(cherry picked from commit e10313b380c84dafde462bdb116827f2b8be1851)
2021-12-22 21:51:33 +01:00
ForesterDev 5e178b30fa Core/DynamicInfo: rename some parameters according packet definitions (#24192)
(cherry picked from commit 5cfce94619cc02cc04bb25ccdd2e1b98e53d9160)
2021-12-22 14:54:59 +01:00
Treeston 94a79bac7a Core/Misc: Some refactoring, #23603 prep: (#23676)
- Split SpawnMetadata off from SpawnData
- No longer allocate Creature/Gameobject objects in ObjectGridLoader just to check their typeid and delete them afterwards

Co-authored-by: Giacomo Pozzoni <[email protected]>
(cherry picked from commit 9304e496cbf6ab6c028671fb8526c732ae5d799f)
2021-12-21 15:16:26 +01:00
xvwyh 9b79d1b410 Core/DynamicObjects: Restore the ability of DynamicObjects to be world objects which was accidentally removed in f0f4a620fb breaking Far Sight (#24046)
Fixes #17081

(cherry picked from commit d4ba47a76e71a0ac103a1ff9b892593bc9c6a67a)
2021-12-20 21:22:37 +01:00