Commit Graph

18765 Commits

Author SHA1 Message Date
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 e10313b380)
2021-12-22 21:51:33 +01:00
Shauren
29aef603ef Core/SAI: Allow resetting light overrides with SMART_ACTION_OVERRIDE_LIGHT
(cherry picked from commit c5226aec41)
2021-12-22 21:46:04 +01:00
Giacomo Pozzoni
1529fe1064 Core/Database: Fix build with Maria DB on some distros (#24248)
(cherry picked from commit 0752584856)
2021-12-22 21:45:46 +01:00
Giacomo Pozzoni
6770987d6f Core/Objects: MovePositonToFirstCollision will now use detour raycasts to determine terrain obstacles (#24232)
* Core/Objects: MovePositonToFirstCollision will now use detour raycasts to determine terrain obstacles

* Added missing includes

* Update Object.cpp

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit d1080af8db)
2021-12-22 21:44:01 +01:00
jackpoz
d89671dd59 Core/PathFinding: Fix mmaps raycast without hit
Update Z coordinate of end position when casting a mmap raycast that doesn't hit the target

(cherry picked from commit 16ccc17621)
2021-12-22 21:41:53 +01:00
Shauren
cecb36bd68 Core/DBLayer: Use std::variant's stored type instead of relying on our own separate enum for prepared statement parameters
(cherry picked from commit 3048203855)
2021-12-22 21:39:35 +01:00
jackpoz
dab7e5688c Core/AI: Fix remaining charming issue
Make creatures evade when a charming expires and they cannot attack the charmer (i.e. charmer with .gm on)

(cherry picked from commit 69809d1203)
2021-12-22 21:00:14 +01:00
Giacomo Pozzoni
93e66f3f3e Core/AI: Allow creatures to evade (#24221)
* Core/AI: Allow creatures to evade

Revert changes that didn't allow creatures to evade anymore no matter how hard a script would try

* PArtially revert 163f44c1b0

(cherry picked from commit 817ae5bca6)
2021-12-22 21:00:05 +01:00
Shauren
ce9c7b477c Core/DBLayer: Refactor PreparedStatement class to not depend on MySQLPreparedStatement
(cherry picked from commit 5b0a32d164)
2021-12-22 20:59:50 +01:00
NoName
8ec51bf3b6 Core/Spell: Proper SPELL_EFFECT_PULL_TOWARDS_DEST implementation for players (#24178)
* Core/Spell: Proper SPELL_EFFECT_PULL_TOWARDS_DEST implementation for players
Closes ##23203 and also reverts 9a1282a

thnx to xvwyh

* Make it optional

(cherry picked from commit 6067a99632)
2021-12-22 20:50:33 +01:00
jackpoz
8fdeaa2797 Core/Misc: Fix build
(cherry picked from commit 9ba4694ff2)
2021-12-22 20:46:35 +01:00
Giacomo Pozzoni
144cfc2bce Core/AI: Make charmed creatures follow their owner (#24195)
* Core/AI: Make charmed creatures follow their owner

* Follow the charmer only when applying the charm

* Make SmartAI follow the charmer

(cherry picked from commit ddf2f60c13)
2021-12-22 20:46:17 +01:00
Ujp8LfXBJ6wCPR
f871f0098e Replace MySQL prepared statement union with std::variant (#24158)
(cherry picked from commit 3ebcb71c3d)
2021-12-22 20:29:49 +01:00
Ujp8LfXBJ6wCPR
ee5384a15d Modernize codebase with Clang-Tidy range based loops (#24165)
Manual expansion of auto types into "typed types"

(cherry picked from commit a933ba6015)
2021-12-22 16:42:54 +01:00
Ujp8LfXBJ6wCPR
43aa763d04 Part1: Modernize codebase with Clang-Tidy range based loops (#24164)
(cherry picked from commit fb75a958f0)
2021-12-22 15:48:01 +01:00
Sorikoff
32a9191406 Scripts/Ebon Hold: Bloody Breakout (#24126)
* Scripts/Ebon Hold: Bloody Breakout

* Scripts/Ebon Hold: Bloody Breakout (part 2)

* Improvements

* Fail quest

* Spacing

* Update 9999_99_99_99_world.sql

* Update 9999_99_99_99_world.sql

* Rename 9999_99_99_99_world.sql to 2020_02_28_04_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 2b14b720da)
2021-12-22 15:11:35 +01:00
Giacomo Pozzoni
3729c76523 Core/PathFinding: Add support to WorldObject pathfinding (#24207)
* Core/PathFinding: Add support to WorldObject pathfinding

* Handle Unit* specific code

* Fix some wrong const

* Fix no-pch build

(cherry picked from commit c0676a48f7)
2021-12-22 15:07:12 +01:00
Giacomo Pozzoni
313b9d2531 Core/PathFinding: Return raycast hitpoint when specifying straightLine (#24206)
(cherry picked from commit 6443e518cf)
2021-12-22 14:59:46 +01:00
ForesterDev
aa4ee9278f Core/PacketIO: Port refactors from f6e6baa293 (#24200)
(cherry picked from commit f6e6baa293)
2021-12-22 14:59:13 +01:00
ForesterDev
5e178b30fa Core/DynamicInfo: rename some parameters according packet definitions (#24192)
(cherry picked from commit 5cfce94619)
2021-12-22 14:54:59 +01:00
Ovah
8f4c6ebb49 Core/Units: UNIT_FLAG_PACIFIED will no longer block victim updates (#24190)
* Core/Units: UNIT_FLAG_PACIFIED will no longer block victim updates

* pacified units should only have their melee attacks blocked as counterpart to silence mechanics

* Core/Spells: removed unnecessary attack stop call from pacify aura effect handler

(cherry picked from commit 6cbfda2fce)
2021-12-22 14:47:20 +01:00
Rushor
862b0ad651 Scripts/Gameobject: Move Orb of Command script to SAI. (#24189)
* Scripts/Gameobject: Move Orb of Command script to SAI.

* Scripts/Gameobject: Move Orb of Command script to SAI.

* Rename 2020_12_23_00_world.sql to 2020_02_28_03_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 0583445c05)
2021-12-22 14:40:38 +01:00
NoName
61f3d51143 Core/Movement: Implement MoveSplineFlag::Enter_Cycle (#24049)
by xvwyh

(cherry picked from commit 40542f01e3)
2021-12-22 14:33:58 +01:00
jackpoz
a5b4d0c539 Core/Movement: Add support to cyclic splines to GenericMovementGenerator
GenericMovementGenerator sets the _duration to the return value of spline.Launch(). For cyclic splines, this is the duration of 1 single cycle, while the spline itself never ends.
To support this edge case in GenericMovementGenerator we just never update the _duration timer for cyclic splines.

(cherry picked from commit 7a57029d8f)
2021-12-22 12:21:58 +01:00
ForesterDev
69f7686050 Core/Server: correct timestamp format for shutdown/restart notification broadcasts (#24181)
* Core/SmartScripts: implement SMART_ACTION_OVERRIDE_LIGHT and SMART_ACTION_OVERRIDE_WEATHER

* Core/Server: correct timestamp format for shutdown/restart notification broadcasts

* remove unexpected changes

* move enum from Common to Util

* Use enum class instead of enum

* Fix width for seconds 0 to 9

(cherry picked from commit 69231581e4)
2021-12-22 01:25:24 +01:00
ForesterDev
1d08423725 Core/SmartAI: implement SMART_ACTION_OVERRIDE_LIGHT and SMART_ACTION_OVERRIDE_WEATHER (#24146)
* Core\SmartAI: implement SMART_ACTION_OVERRIDE_LIGHT and SMART_ACTION_OVERRIDE_WEATHER

* Change the invoker of action to any worldobject

* Revert "Change the invoker of action to any worldobject"

This reverts commit 2e15f72585.

* Add dbc-validations for new actions

* Use GetBaseObject() instead of Creature* for new actions. Add debug-logging

(cherry picked from commit c65ba35269)
2021-12-22 01:15:52 +01:00
Sorikoff
f0f7cecc01 Scripts/Ebon Hold: Massacre At Light's Point (#24106)
* Scripts/Ebon Hold: Massacre At Light's Point

* Update 9999_99_99_99_world.sql

* Final stuff

* Rename 9999_99_99_99_world.sql to 2020_02_22_00_world.sql

Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 0f265b4af6)
2021-12-22 01:01:58 +01:00
Killyana
2de20560fe Core/GameObject: Fix wrong calculation of the spellfous distance
Closes #24177

(cherry picked from commit 828987a46a)
2021-12-21 23:57:19 +01:00
Ovahlord
a90b9abbf0 Core/SAI: SMART_ACTION_PAUSE_MOVEMENT
Closes #22346

(cherry picked from commit 6f31784979)
2021-12-21 23:55:34 +01:00
dr-j
cc1a6497e4 DB/Quest: Reconnaissance Flight
Closes #23792

(cherry picked from commit 92ac6ca0fe)
2021-12-21 23:26:38 +01:00
Sorikoff
1e93210999 [WIP] Core/AI: Pets musn't attack civilian NPC in aggressive mode (#24121)
* Core/AI: Pets musn't attack civilian NPC in aggressive mode

* Move decision to ignore civilians to PetAI, keeping the check in GridNotifiers

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 5f20715e2f)
2021-12-21 23:06:20 +01:00
ratkosrb
72093e98e1 Core/Creature: Use proper name for wander distance. (#24133)
* Use proper name for wander distance.

* Rename db field.

* Fix query.

* Remove underscore from chat command.

* Rename the handler too.

* Update chat command description.

* Fix remaining issues.

* Rename 2020_99_99_99_world_335.sql to 2020_02_16_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 6176ce92ea)

# Conflicts:
#	sql/updates/world/master/2020_02_16_01_world.sql
#	src/server/database/Database/Implementation/WorldDatabase.cpp
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Globals/ObjectMgr.cpp
#	src/server/game/Globals/ObjectMgr.h
#	src/server/scripts/Commands/cs_npc.cpp
2021-12-21 19:50:12 +01:00
schell244
460549799e Scripts/World: Hourly Bell sound, further improvements (#24147)
* Improvements for hourly bell sound

* TC codestyle

* added missing breaks and improve codestyle

(cherry picked from commit baa87c43ba)
2021-12-21 18:32:22 +01:00
Shauren
2c78f4dd1f Core/Misc: Resolve c++17 TODOs left in code as comments 2021-12-21 18:29:52 +01:00
Rushor
2326eac4f9 Scripts/Gameobject: Journal of Jandice Barov- Convert script to SAI. (#24157)
* Scripts/Gameobject: Journal of Jandice Barov- Convert script to SAI. (Thanks to Sunwell)

* Scripts/Gameobject: Journal of Jandice Barov - Update script and move go spawn to bossscript

* Update boss_jandice_barov.cpp

Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
(cherry picked from commit f0bf447cd1)
2021-12-21 16:33:47 +01:00
Rushor
41b10f4bb8 Scripts/Gameobject: Remove deprecated script for Cat Figurine (#24150)
Scripts/Gameobject: Remove deprecated script for Cat Figurine

(cherry picked from commit 596b2d1ed7)
2021-12-21 16:27:45 +01:00
Ujp8LfXBJ6wCPR
42ce97a74c Core/Misc: Remove redundant null pointer checks before delete (#24140)
* Identified by clang-tidy readability-delete-null-pointer

(cherry picked from commit 9264e5b6f0)
2021-12-21 16:19:13 +01:00
Rushor
1516759859 Scripts/Kalimdor: Move script of Hand of Iruxos Crystal to database. (#24141)
* Scripts/Kalimdor: Move script of Hand of Iruxos Crystal to database.

* Scripts/Kalimdor: Hand of Iruxos Crystal - Add despawn for gameobject.

* Scripts/Kalimdor: Hand of Iruxos Crystal - Add despawn for gameobject.

* Remove unneeded commentline

* Rename 9999_99_99_99_world.sql to 2020_02_11_00_world.sql

Co-authored-by: Aokromes <Aokromes@users.noreply.github.com>
(cherry picked from commit a67dd6ab60)
2021-12-21 15:56:23 +01:00
Killyana
d403e36538 DB/Text: Fix and remove some npc_text
(cherry picked from commit 7450be4cfd)
2021-12-21 15:54:36 +01:00
Ovah
a91be4995b Core/Vehicles: implement vehicle seat addon table to specify seat ori… (#24112)
* Core/Vehicles: implement vehicle seat addon table to specify seat orientation offsets and exit positions in form of offsets or absolute positions
* converted Traveler's Tundra Mammoth to seat addon table data

* first follow batch

* whoopsie

* Core/Vehicles: go from local copies to pointers

* Update and rename 2020_99_99_99_world.sql to 2020_02_08_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 98d6c501d7)
2021-12-21 15:32:49 +01:00
schell244
eae7379417 Core/Scripting: fixed hourly bell sounds (#24127)
* fixed hourly bell sounds

* use switch and moved variable

* fix typo

(cherry picked from commit f87a4543ad)
2021-12-21 15:21:57 +01:00
Ujp8LfXBJ6wCPR
91a0fbbd71 Use boost::optional and boost::none instead of smelly pointer (#24134)
* Remove bad pointer usage from CharacterCache

Use TrinityCore Option type instead which is intended for this purpose. (Wrapper around boost::option until C++17 bump is finalised)

* Unify codestyle regarding TC optional type

Based upon advice from @Shauren

(cherry picked from commit 76831f1f46)
2021-12-21 15:21:39 +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 <giacomopoz@gmail.com>
(cherry picked from commit 9304e496cb)
2021-12-21 15:16:26 +01:00
Keader
e453c632e6 Game/Battlegrounds: Fixed Position and Rotation of Alterac Valley Gates
(cherry picked from commit ddd1a3c1ef)
2021-12-21 01:19:38 +01:00
Sorikoff
6433ed6014 Scripts/Spells: Gift of the Harvester (#24111)
* Scripts/Spells: Gift of the Harvester

* Scripts/Spells: nopch

* Scripts/Spells: nopch

* Scripts/Spells: validate

* Rename 9999_99_99_99_world.sql to 2020_02_01_03_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit e10239311c)
2021-12-21 00:48:30 +01:00
Giacomo Pozzoni
f1f1bc01ba Core/Movement: Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() on Gossip Hello (#24005)
Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() when talking to a NPC, scheduling a 3 minutes pause on the WaypointMovementGenerator even if it was already disabled with no timer, waiting for the player to select a gossip entry to resume the movement.

(cherry picked from commit a9e534762f)
2021-12-21 00:46:32 +01:00
ForesterDev
9124fd1f1f Core/Items: implement some helper methods for easier readability (#24113)
(cherry picked from commit 573ddf4d22)
2021-12-21 00:46:13 +01:00
Sorikoff
e882635774 Scripts/Borean Tundra: Iruk (#24117)
* Scripts/Borean Tundra: Iruk

* Apply suggestions from code review

Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>

* Update 9999_99_99_99_world.sql

* Rename 9999_99_99_99_world.sql to 2020_02_01_01_world.sql

Co-authored-by: Trond B. Krokli <38162891+illfated@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 8c443ae39f)
2021-12-21 00:12:13 +01:00
Sorikoff
3daeb28420 Scripts/The Barrens: Beaten Corpse (#24124)
* Scripts/The Barrens: Beaten Corpse

* Rename 9999_99_99_99_world.sql to 2020_02_01_00_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 74d19691a5)
2021-12-21 00:11:39 +01:00
Killyana
e57967aa3f DB/Creature: Plagued Dragonflayer Tribesman & Plagued Dragonflayer Rune-Caster & Plagued Dragonflayer Handler
Closes #24122

(cherry picked from commit c86d4404c8)
2021-12-21 00:08:43 +01:00