Commit Graph

529 Commits

Author SHA1 Message Date
Giacomo Pozzoni
c12531b023 Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z 2021-02-21 20:26:21 +01:00
Ovahlord
0299fa4fe1 Core/Misc: replace boost::optional with std::optional 2021-02-19 14:07:43 +01:00
Ovahlord
6ba851e809 Core/Maps: corrected spawn mask check when spawning spawn groups
closes #209
2021-01-11 08:52:33 +01:00
Ovahlord
f9f69bb0fe Core/Packets: converted SMSG_RAID_INSTANCE_MESSAGE, SMSG_PENDING_RAID_LOCK, SMSG_INSTANCE_SAVE_CREATED and SMSG_TRANSFER_ABORTED to packet class 2021-01-10 11:55:10 +01:00
Ovahlord
360b1149dc fixed build 2021-01-03 09:44:27 +01:00
Treeston
4aa098a50e Core/Maps: Move some more Map internals to actually be... internals. 2021-01-03 09:44:26 +01:00
Treeston
f7a79750c9 Core/Maps: All RespawnInfo* handed to outside code are now RespawnInfo const*, to signify that outside code has zero business changing these. 2021-01-03 09:44:08 +01:00
Treeston
ee3956b44c Core/Maps: move pooling hand-off outside of Map::CheckRespawn (PR#25785)
fixes #25777
# Conflicts:
#	src/server/game/Maps/Map.cpp
2021-01-03 09:44:08 +01:00
Ovahlord
d35af4ef6c Core/Maps: fixed spawn groups bypassing spawnMask restrictions when tied to boss encounters 2020-11-25 10:14:17 +01:00
Giacomo Pozzoni
6a8ecc3ee3 Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888
# Conflicts:
#	src/common/Collision/DynamicTree.cpp
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/World/World.cpp
2020-08-29 13:49:21 +02:00
kvipka
e6e20bd574 Scripts/InstanceScript: Fix an issue where LoadAllGrids would load creatures before TeamInInstance was properly set (PR #25340)
# Conflicts:
#	src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
2020-08-29 00:48:20 +02:00
Ovahlord
52287e1f07 Core/SAI: ported set speed, weather and override light smart actions from 335 2020-08-22 18:16:03 +02:00
Treeston
c1237c788b Core/Map: Fix a crash that could happen if a player moved very far away from a creature they were in combat with. Closes #21177. 2020-07-22 16:52:02 +02:00
Treeston
942c3a77da Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2020-07-22 16:49:37 +02:00
Peter Keresztes Schmidt
cbd6fb2315 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
# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Spells/SpellInfo.cpp
#	src/server/scripts/Battlefield/BattlefieldWG.cpp
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
#	src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
#	src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
#	src/server/shared/DataStores/DBCDatabaseLoader.cpp
2020-07-18 22:47:52 +02:00
Ovahlord
d46fb93657 Core/Pools: ported pooling updates from 335 branch 2020-07-13 11:17:19 +02:00
Shauren
0f3590ebb4 Core/Maps: Added optional *.tilelist file to map_extractor output which contains a list of existing tiles to speed up map creation in worldserver 2020-07-06 17:45:53 +02:00
Shauren
40f80fc0ed Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-06-11 01:35:27 +02:00
Shauren
47acc59f49 Core/DBLayer: Prevent committing transactions started on a different database 2020-04-15 21:02:26 +02:00
Shauren
d003ebd8e4 Core/DBLayer: Prevent using prepared statements on wrong database 2020-04-15 19:18:58 +02:00
Ovahlord
57825bc011 Core/Packets: fixed build 2020-04-07 17:20:44 +02:00
Ovahlord
eb81e8f4a3 Core/Packets: updated SMSG_WEATHER and SMSG_OVERRIDE_LIGHT to packet class 2020-04-07 16:14:09 +02:00
Ovahlord
113202ea48 Core/Packets: converted SMSG_PLAY_MUSIC to packet class and corrected packet structure 2020-04-07 15:59:33 +02:00
Ovahlord
f1f00c3ec3 Core/Datastores: refactor DBC storage helpers to use a class and fixed no pch build 2020-03-18 15:24:25 +01:00
Ovahlord
6f5ac9d93c Core/Maps: fixed map hole format that was causing invalid height data being returned. Re-extracting maps is required. 2020-03-05 18:21:12 +01:00
Ovahlord
de74f05f90 Core/Vmaps: sync wmo related code with master branch 2020-02-27 14:02:13 +01:00
Ovahlord
1aaf004064 Core/AI: followup fixes 2020-01-31 07:34:12 +01:00
jackpoz
316986765f Core/Map: Load the grid of TempSummons owned by Players
Ensure to load the grid of TempSummons owned by Players when the relocate to another cell
2020-01-28 05:55:09 +01:00
Ovahlord
fcb79fee07 Core/Datastores: updated DBC structure names to generated member format 2020-01-25 12:36:32 +01:00
xvwyh
527064c8d6 Core/DynamicObjects: Restore the ability of DynamicObjects to be world objects which was accidentally removed in f0f4a620fb breaking Far Sight (#24046)
Fixes #17081
2020-01-14 21:03:53 +01:00
jackpoz
131986d1c2 Core/Misc: Replace time(nullptr) with GameTime::GetGameTime() 2020-01-11 03:30:41 +01:00
Aokromes
d6d3f06f06 New year 2020-01-04 18:32:38 +01:00
funjoker
6c56916b29 Misc: Update copyright information
Happy new year
2020-01-01 18:47:28 +01:00
Ovahlord
15f09fb82b Core/Misc: fixed warnings and building connection patcher with boost versions below 1.61 2019-11-06 00:51:04 +01:00
Treeston
90540d684b Core/Misc: Various dynspawn cleanup and refactors split off from pooling rewrite:
- Map::RemoveRespawnTime(SpawnObjectType, LowType, doRespawn) split into Map::Respawn and Map::RemoveRespawnTime, without the extra boolean
- Map::RemoveRespawnTime(RespawnInfo*) merged into Map::DeleteRespawnInfo(RespawnInfo*) and is now private
- Map::DeleteRespawnInfo(void) renamed to Map::UnloadAllRespawnInfos to properly describe what it does
- Map::ProcessRespawns now actually saves the delayed respawn time to DB if the respawn was delayed
- Map::AddRespawnInfo now takes const reference, and returns success as a boolean
- Map::AddRespawnInfo no longer offers an unused "replace" parameter
- Map::DeleteRespawnInfo no longer offers a variety of unused private overloads
- Map::SaveRespawnTime no longer offers a tantalizing writeDB parameter. Parameter is now called "startup" to properly describe what it does.
- Map::SaveRespawnInfoDB now takes RespawnInfo reference instead of all the various fields. Still public because compatibility mode. QQ.
- Map::GetWorldObjectBySpawnId sanitized
- Map::GetXRespawnTime methods sanitized to all go through Map::GetRespawnTime

----------

Core/DB: Unify `creature_respawn` and `gameobject_respawn` into a single `respawn` table
2019-08-18 12:47:10 +02:00
Treeston
f9184f026b Entities/Unit: Nuke Map::ForceRespawn from orbit, with the following implications:
- .npc respawn no longer causes stupid things to happen (Fixes #23014)
- ::DeleteFromDB methods on Creature and GameObject rewritten to be as sensible as such a colossally stupid method can ever be. They're static now.
- .npc delete and .gobj delete ported to new argument handling, and rewritten as per above. They can no longer crash the server when used in instances, too. Yay for that.
- Adjusted various dusty cobwebbed hacks around the core (why does waypoint visualization use permanent spawns *shudder*) to still work too.
2019-08-18 12:12:09 +02:00
Shauren
0b8ab68eb3 Core/Map: Kill zoneId from RespawnInfo, all it did was significantly slow down startup to make one gm command faster 2019-08-18 11:51:09 +02:00
Ovahlord
16b459b7cd Revert "Core/Maps: Loading respawn times will now used database cached zoneId data to avoid loading unnneeded grids during startup"
This reverts commit bdc0f1433f.
2019-08-18 11:30:59 +02:00
Ovahlord
7d40814e45 Core/Maps: added missing update call for weater updating timer 2019-07-12 15:32:28 +02:00
Ovahlord
c074c3a9c6 Revert "Core/Misc: Replace time(NULL) with GameTime::GetGameTime()"
This reverts commit 5fe3a1f7f9.
2019-07-08 15:56:29 +02:00
Ovahlord
5fe3a1f7f9 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(ported commit: 12701cb0c6)
2019-07-08 12:19:19 +02:00
Treeston
83a25ce554 Entities/Creature: Some asserts are now LOG_ERRORs that block spawning. Fix a group spawning bug exposed by the CoS merge. Improve some command output.
# Conflicts:
#	src/server/game/Maps/Map.cpp
#	src/server/scripts/Commands/cs_list.cpp
2019-07-08 09:34:07 +02:00
Ovahlord
bdc0f1433f Core/Maps: Loading respawn times will now used database cached zoneId data to avoid loading unnneeded grids during startup 2019-04-06 09:24:34 +02:00
Ovahlord
c991d4bfe7 Core/Maps:
* Scarlet Monastry will now properly scale down to normal difficulty when trying to enter the instance on heroic difficulty
* removed deprecated quest text requirement from access_requirement
* added new access_requirement field to specifiy if a dungeon is only available for heroic difficulty
* added heroic exclusive access_requirement entries for Zul'Gurub, Zul'Aman, End Time, Well of Eternity and Hour of Twilight
* Players will no longer be able to enter dungeons when a encounter is in progress
2019-03-30 16:43:53 +01:00
Ovahlord
c98be9d2d7 Core/Objects: merged new changes from undermap issue fixup PR 2019-03-17 12:29:08 +01:00
Ovahlord
fe7bcac696 Core/Maps: ported all master branch changes for map extractor including height map extraction
* new maps, and mmaps are required
2019-02-25 07:37:47 +01:00
Ovahlord
65fd7ce282 Core/Maps: use m_parrentTerrainMap for GetWaterOrGroundLevel and added another difference fixup from 335 branch 2019-02-24 12:50:46 +01:00
Ovahlord
5661b4347b Core/Maps: corrected grid height value return to solve multiple undermap issues 2019-02-24 01:39:25 +01:00
Ovahlord
fda1f556af Core/DataStores: use generated member names for AreaTable.dbc
*load all fields of AreaTable.dbc
2019-02-24 00:51:54 +01:00
Ovahlord
1e4cc2293a Core/Datastores: use generated member names for MapEntry fields
* load all dbc fields of MapEntry
2019-02-24 00:14:44 +01:00