Commit Graph

37602 Commits

Author SHA1 Message Date
offl
4e625bcde7 DB/SAI: Fix event flags for "Discovering Your Roots" script
Closes #24622

(cherry picked from commit 73f7a78a33)
2022-01-05 22:41:42 +01:00
killerwife
c9b13f1897 MMAP: Build ADT floor just like WMO floor below liquid (#27503)
Fixes ocean floor pathfinding

(cherry picked from commit 8a779268b6)
2022-01-04 20:44:26 +01:00
Giacomo Pozzoni
feb36f3f7d Tools/MMAPs: Show an error when running mmaps_generator built in Debug mode (#27412)
* Tools/MMAPs: Show an error when running mmaps_generator built in Debug mode

* Fix GCC build

(cherry picked from commit 8c80f28581)
2022-01-04 20:44:26 +01:00
jackpoz
071a8b5b7d Core/Misc: Remove whitespace
(cherry picked from commit 869fb748cd)
2022-01-04 20:44:26 +01:00
jackpoz
be7acb2527 Core/MMAPs: Reduce chances of breaking tile connections
Reduce chances of breaking tile connections caused by floating point rounding issues.

(cherry picked from commit e615e2ddef)
2022-01-04 20:44:26 +01:00
killerwife
dbb7f65723 Vmap: Introduce skipping of antiportals and unreachable mogp (#26331)
* Vmap: Introduce skipping of antiportals and unreachable mogp

* Reduce differences with master branch

* Update VMAP and MMAP versions

* Update MMAPs version

Co-authored-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit d5f1fefe7f)
2022-01-04 20:44:25 +01:00
killerwife
2467f799bb MapExtraction: Fix water height redundancy algorithm ignoring "no water" (#26324)
* MapExtraction: Fix water height redundancy algorithm ignoring "no water"

* Update MMAP_VERSION

* Change map version

Co-authored-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit 00da074109)
2022-01-04 20:44:25 +01:00
Giacomo Pozzoni
1ba940b17a Core/Maps: Change .map file version from FourCC to uint32 (#26326)
(cherry picked from commit 42877e75e2)
2022-01-04 20:44:25 +01:00
Giacomo Pozzoni
89e183704c Improve multithreading of mmaps_generator (#25625)
* Build/Misc: Add a few *San CMake flags

Add the following flags for the related tools:
- MSAN for Memory Sanitizer
- UBSAN for Undefined Behavior Sanitizer
- TSAN for Thread Sanitizer

* Remove unused parameter

* Fix UBSan reported issue

* Disable G3D buffer pools when using Thread Sanitizer as it has its custom locking mechanisms

* Code cleanup

* Move threads from maps to tiles

* Move tile building logic to TileBuilder class

* Fix memory leak in TileBuilder

* Fix build

* Store TileBuilder as raw pointer for now, it will be changed later on to use modern C++ constructs

* Fix crash on shutdown

* Revert pvs-studio change

* Fix generating 1 single tile not closing the program

(cherry picked from commit a4e93d779c)
2022-01-04 20:44:25 +01:00
Shauren
1d0ca1106f Tools/mmaps_generator: Made loading vmaps by mmaps_generator threadsafe 2022-01-04 20:44:22 +01:00
jackpoz
3820aabcd8 Core/MMAPs: Restore single slope angle of 55°
Re-generating MMAPs IS required.
Partially reverts 995a443da2 .

Having 2 different slope angles of 55° and 85° created too many polygons to fit in the current mmtile structure. This caused some polygons to become disconnected from each other, creating the old "invisible walls" effect. Because of this and because of the performance hit when loading a mmtile caused by the increase of polygon numbers, this commit reverts the recent changes and sets by default the slope angle to 55°.
Feel free to restore the previous behaviour by running .\mmaps_generator --maxAngle 85 --maxAngleNotSteep 55 , specifying the map id as number if a single map should have different slope values.
This is the last commit that will change MMAPs version to force re-generating them. Any future change that will affect only the generation settings will be optional (but recommended).

(cherry picked from commit 3947e4cb57)
2022-01-04 20:44:02 +01:00
jackpoz
ddcbc01a65 Core/MMAPs: Fix small steps being considered as NAV_AREA_GROUND_STEEP
(cherry picked from commit 3ac1992afb)
2022-01-04 20:44:02 +01:00
Giacomo Pozzoni
782a943b38 Tools/MMapsGenerator: Add some more input parameters to improve mmaps load performances (#25520)
* Some research about mmaps load performances

* Tools/MMapsGenerator: Add some more input parameters

Add some more input parameters which affect the resulting mmaps:
- --smallOutputSize: sets both walkableSlopeAngle and walkableSlopeAngleNotSteep to 55°, reducing by a lot the .mmtile size and the number of polys. A rcFilterLedgeSpans() call is included too to filter out some polys. Default to false.
- --maxAngle: Restore this parameter removed some commits ago. Specifies the max walkable angle of a Creature when in combat. Default to 85
- --maxAngleNotSteep: Max walkable angle of a Player and of a Creature out of combat. Must be less or equal than --maxAngle. Default to 55.

A performance profiling comparison highlighted that .mmtile load grows exponential with the number of polys. A small server with GridUnload enabled and without preloading all grids on startup will be more affected than a big server with GridUnload disabled and preloading grids on startup.

(cherry picked from commit b6e205f7ef)
2022-01-04 20:44:02 +01:00
Giacomo Pozzoni
d58d0e895c Handle different slopes in mmaps (#24765)
* Tools/MMAPs: Remove input argument --maxAngle

Remove input argument --maxAngle . This should be just hardcoded in MapBuilder::GetMapSpecificConfig() so all settings are easily found in the same place instead of being spread around.

* Tools/MMAPs: Add new area type NAV_AREA_GROUND_STEEP

Add new area type NAV_AREA_GROUND_STEEP for ground with slope in the range (55, 70] .
NAV_AREA_GROUND is used for ground with range [0, 55] .
NAV_AREA_GROUND_STEEP takes priority over NAV_AREA_GROUND.

* Tools/MMAPs: Fix NAV_GROUND_STEEP flag not being saved in the mmtile

* Core/PathFinding: Implement NAV_GROUND_STEEP flag

Implement NAV_GROUND_STEEP flag, used only by Creatures that are in combat or evading.

* Distinguish between RC_WALKABLE_AREA and NAV_AREA_GROUND.

* Allow mobs in combat to walk on steeps up to 80°

* Allow mobs in combat to walk on steeps up to 85°.
Disable rcFilterLedgeSpans() filter as it removed long steep spans.

* Increase cost of steep spans to try making creatures walk around obstacles instead of walking on them

* Revert last commit

(cherry picked from commit 995a443da2)
2022-01-04 20:44:02 +01:00
jackpoz
bafd22104c Tools/MMAPs: Output the time spent in a human readable format
(cherry picked from commit 6e34e07c48)
2022-01-04 20:44:00 +01:00
Ovahlord
0ff1dd577e DB/Creatures: corrected several movement template flight values for creatures all accross Northrend. No more raining Gargoyles, Frost Wyrms, Birds and other flying things
(cherry picked from commit 8a9f809093)
2022-01-04 15:33:04 +01:00
Ovahlord
0c15b2ac7c Core/Objects: fixed destination calculation for destination based spells casted by flying units
* Additionally he PathGenerator will now check for realtime movement flags instead of creature based template data only so scripted flying movement and players will now correctly get their path calculated

(cherry picked from commit fdcb7388a6)
2022-01-04 15:33:04 +01:00
Shauren
98272944ee Core/Commands: Fixed .npc add overwriting existing spawns when used on transports
(cherry picked from commit 75ab3619bd)
2022-01-04 15:33:04 +01:00
Giacomo Pozzoni
9cb01a7904 Fixes/3.3.5 aura infinite loop (#24631)
* Core/Auras: Attempt to fix infinite loop with aura 18950 on map unload

* Core/Auras: Log a detailed error and assert when failing to remove all auras after a few tries

* Code cleanup

* Fix build warnings

* Fix more build warnings

(cherry picked from commit bd2d60c267)
2022-01-04 15:33:04 +01:00
offl
2256735a77 DB/SAI: Black Morass - Infinite mobs
Closes #4613

(cherry picked from commit 8ad0ab362e)
2022-01-04 15:33:04 +01:00
joshwhedon
e95215e9ae Removing a duplicate item combat spell handling causing poisons (and others) to proc twice. (#24627)
https://github.com/TrinityCore/TrinityCore/issues/24608
(cherry picked from commit 4db77bc913)
2022-01-04 15:33:04 +01:00
Giacomo Pozzoni
89afeed41b Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)
* Core/MMAPs: Adjust walkable climb

Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb.

* Temporarily disable static collision (the whole check should be removed)

* Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP

* Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells)

* Code refactor

* Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH

* Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors.

* Remove whitespace

* Revert 4a197ba22a as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End

* Cleanup PathGenerator raycast case

* Fix PathGenerator raycast broken if start and end are on same poly.
Fix PathGenerator raycast broken if no wall is hit.
Remove unused case of using raycast with an existing previous path (can be added back properly if needed).
Remove forcing poly length to 2 when we actually have already the right number.

* Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast.
Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead.

* Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision)

* Add far from poly flags

* Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly

* Fix blink close to walls with no valid polygon behind the wall

* Require to re-extract mmaps

Co-authored-by: Ovah <dreadkiller@gmx.de>
(cherry picked from commit c0b75bf40d)
2022-01-04 15:33:04 +01:00
HelloKitty
406c7219ad Further improve ChrRace DBC handling (#24508)
* Core/DBC: Added ChrRacesAllianceType for ChrRaces.dbc

* Core/Character: Check ChrRace DBC playable in HandleCharCreateOpcode

* Core/DBC: Implement ChrRacesFlags removing literals

Cannot take credit for this enum, derived from documentation in
https://wowdev.wiki/DB/ChrRaces

* Core/Character: Check CHRRACES_FLAGS_NOT_PLAYABLE on creation

* Core/DBC: Fix formatting of ChrRaces enums

* Core/DBC: Use ChrRaces CreatureType instead of hardcoded humanoid assumption

* Address enum style code changes

(cherry picked from commit 43b595111d)
2022-01-04 15:33:04 +01:00
Shauren
5e37b1cd5d Scripts/Icecrown Citadel: Fixed Professor Putricide oozes not moving during their channel
(cherry picked from commit 1d43003cfa)
2022-01-04 15:33:04 +01:00
Metalaka
d62886685b Core/CreatureAI: Shambling Horror re-cast Enrage as soon as it is not stun (#24618)
(cherry picked from commit e2434e4f47)
2022-01-04 15:33:04 +01:00
Killyana
6b49c52f0b DB/Gameobject: Shaffar's Stasis Chamber & Mana-Tombs Stasis Chamber
Closes #17328
By @offl and @dr-j

(cherry picked from commit 07842547b4)
2022-01-04 15:33:04 +01:00
offl
c55e296cfe DB/Loot: Remove remaining herbs and ore with low chance to drop pt 4
Closes #24614

(cherry picked from commit 128684f077)
2022-01-04 15:33:04 +01:00
offl
56a6a69975 DB/Creature: Sunblade Protector & Sunblade Scout
Closes #15665

(cherry picked from commit f28d19666a)
2022-01-04 15:33:04 +01:00
dr-j
a85819f549 DB/GameObject: Netherwing Egg Pooling
Closes #24611

(cherry picked from commit e069372de9)
2022-01-04 15:33:04 +01:00
offl
edb8e97bd3 DB/Creature: Add formations for some creatures in SWP
Closes #24612

(cherry picked from commit 5fc54f9481)
2022-01-04 15:33:04 +01:00
ccrs
9fd26c5f09 Core/Movement: 9080e78 followup
actually port back the previous implementation, now correctly
this implies that a unit that has a different victim than the one its chasing will stand still till either:
- a new movement replaces the current, for w/e reason
- the chase target is again the current victim

probably a pause implementation on the generator is a more elegant solution...

updates #24600

(cherry picked from commit 472e1fd8ae)
2022-01-04 15:33:04 +01:00
offl
a0538f979a DB/Loot: Add references for rare items from RFK, RFD & Scarlet Monastery
Closes #24597

(cherry picked from commit 874b149923)
2022-01-04 15:33:00 +01:00
ModoX
5b38a8101b DB/Quest: Fixed Thirst Unending for priests & dhs
Closes #18411
2022-01-04 01:07:02 +01:00
offl
0485c3f0ba DB/Quest: Gaining the advantage - Nether residue - Add Missing drops
Closes #16536

(cherry picked from commit 16d4a39c7d)
2022-01-04 01:02:22 +01:00
offl
63e1c04b4c DB/Loot: Remove more incorrect items from loot
Closes #24596

(cherry picked from commit a64d5c7452)
2022-01-04 00:59:26 +01:00
Jildor
9d27de8b80 DB/Spell: Arm Dead Damage Kologarn
Closes #24577

(cherry picked from commit 9170567218)
2022-01-04 00:55:07 +01:00
VanDobben
5d0b43cec4 DB/Loot: Fix some loots in The Obsidian Sanctum
Closes #24598

(cherry picked from commit 267e707fe3)
2022-01-04 00:52:09 +01:00
dr-j
dd5dd45caa DB/GameObject: Supply Crate
Closes #23962

(cherry picked from commit 3e1aede6fa)
2022-01-04 00:50:56 +01:00
offl
148b534eba DB/Loot: Remove remaining herbs and ore with low chance to drop pt 3
Closes  #24591

(cherry picked from commit b518457604)
2022-01-04 00:47:11 +01:00
offl
0faed2df98 DB/Loot: Remove excess items from some creatures
Closes #24589

(cherry picked from commit fc80c41079)
2022-01-04 00:45:26 +01:00
funjoker
0e05dbd3b5 DB/Hotfixes: Update hotfixes to build 41488 2022-01-03 21:02:52 +01:00
Shauren
c0f976d23d Core/Spells: Added helper function to select random injured healing spell targets 2022-01-03 13:07:30 +01:00
Shauren
08b5a0586a Core/Util: Added iterator range overload for Trinity::Containers::RandomShuffle 2022-01-03 12:48:40 +01:00
Shauren
3a67e37681 Core/Time: Remove artificially high minimal update intervals 2022-01-03 11:26:23 +01:00
TDB Release
87a85dd9d2 TDB 915.22011 - 2022/01/02 TDB915.22011 2022-01-02 21:29:31 +00:00
jackpoz
79250cb0df CI/CircleCI: Switch to Ubuntu 20.04 and MySQL 8
(cherry picked from commit e3dfab52a6)
2022-01-02 21:29:32 +01:00
Shauren
c981af6b31 Rename sql 2022-01-02 20:44:58 +01:00
Giacomo Pozzoni
528e9959e8 DB: Add drop script compatible with MySQL 8
(cherry picked from commit 7e5c1cf453)
2022-01-02 19:55:05 +01:00
Sorikoff
74174332c6 Scripts/Pet: Lil' K.T (#24528)
* Lil' K.T.

* Rename 9999_99_99_99_world_335.sql to 2020_05_10_00_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 34fecde022)
2022-01-02 19:24:18 +01:00
Shauren
d30e4a20e5 Core/Misc: Define and use ChrRacesFlag and CreatureModelDataFlags (ref 772f506a3b) 2022-01-02 19:14:32 +01:00