Commit Graph
26168 Commits
Author SHA1 Message Date
Shauren dc4b516844 Core/Movement: Use correct root check
(cherry picked from commit 3e9239a1e552d926caccf7e9a588e8d82ce0b9ee)
2021-12-05 14:38:39 +01:00
Shauren 34eedc2ad8 Core/Movement: Prevent rooted units from falling
* Fixes a client freeze

Closes #23042

(cherry picked from commit 99a9129a72a594cab8f3b15d9da388cf99afa47b)
2021-12-05 14:38:26 +01:00
brotalnia ab988dc982 Core/Spells: Return CheckCast result from CastSpell (#23236)
* Return CheckCast result from CastSpell

* Return cast result from UnitAI methods too.

(cherry picked from commit 49d0a5bbb69dd352bac0009625ded2c472b66805)
2021-12-05 14:37:13 +01:00
Aokromes 8f8ea509cb Core/Movement: Fix Warrior's Charge launch visual while jumping backw… (#23243)
* Core/Movement: Fix Warrior's Charge launch visual while jumping backwards

By Natureknight

* fix no-pch

(cherry picked from commit cc1a5202995b2c70eb2d0d4af36c593011234e35)
2021-12-05 14:03:47 +01:00
Wyrserth 558772a0bc Core/Quest: improve source item deletion logic for items that give quests (#23250)
* Core/Quest: improve source item deletion logic for items that give quests.

Prevent deletion of items that aren't supposed to be destroyed (like Demon Scarred Cloak).

* Whoops.

(cherry picked from commit 49dc8a8e4461063b4500e6b8af4eefadbd6698a1)
2021-12-05 14:01:48 +01:00
Shauren 3a5f87ccb8 Core/AreaTriggers: Initialize _spawnId in constructor 2021-12-05 11:17:54 +01:00
Shauren 77ddb4da81 Core/AreaTriggers: Move ScriptName from areatrigger_template to areatrigger_create_properties and areatrigger tables 2021-12-04 23:47:40 +01:00
Shauren 759d2fdd86 Core/Spells: Initialize EffectIndex of empty effects to their proper values instead of always being 0
Closes #27261
2021-12-04 23:20:55 +01:00
Shauren 6e5f35a14c Core/Quests: Allow more objects to update their dynamicflags in Player::UpdateForQuestWorldObjects 2021-12-04 21:18:46 +01:00
Shauren eb834272cb Core/Quests: Optimize Player::HasQuestForGO 2021-12-04 21:17:43 +01:00
MejiandShauren 198d18bef5 Core/SAI: Fixed crash when using SMART_TARGET_CLOSEST_* in areatrigger smart script (#27336)
Co-authored-by: Shauren <[email protected]>
2021-12-04 20:40:06 +01:00
Meji 0d0f9784a9 Core/Conditions: Added CONDITION_SOURCE_TYPE_TRAINER_SPELL (#27321) 2021-12-04 14:42:54 +01:00
Shauren 7e779a6f59 Core/Units: Send PlayHoverAnim state in CreateObject if enabled by Unit::SetPlayHoverAnim 2021-12-04 12:45:46 +01:00
Keader 0b7089a7d1 Scripts/Icecrown Citadel: Fixed a edge case in Blood Quickening quest
killer can be a pet

(cherry picked from commit a639a99c6c43a6e74883fb03a3a3ec5334da1db3)
2021-12-04 00:37:17 +01:00
Demonid f981b15389 Scripts/Icecrown Citadel: The Lich King's Last Stand quest kill credit (#23239)
Closes #8919

(cherry picked from commit d1c5b3c89792a429f0b07bf5b146540082803745)
2021-12-04 00:31:32 +01:00
Trond B. Krokli b6dc6fd742 Core/Spells: make Four Horsemen debuffs negative (#23253)
By Riztazz
Closes #23248

(cherry picked from commit 1e97dfec538b9113134a67b7d25a1c1d2bc7b662)
2021-12-04 00:31:32 +01:00
Killyana bdb728a165 Spell/Script: Throw Torch must hit only one target
(cherry picked from commit ce562415ed49d202de172fc2edab84250c494238)
2021-12-04 00:31:32 +01:00
Wyrserth 238726b824 Core/Achievement: fix mistake related to ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM. (#23252)
(cherry picked from commit b76bcc836cb194e35a534c94054b2bf4b94776be)
2021-12-04 00:31:32 +01:00
Wyrserth 3264ef1f75 Core/Achievement: correctly credit progress for skill-related achievements when learning a new skill. (#23249)
(cherry picked from commit 0a25069db4fd359619fed219e86f7842104677d0)
2021-12-04 00:31:32 +01:00
jackpoz ccc8d679d8 Core/Misc: Log Map name in asserts
(cherry picked from commit 991b2a11bd8aba4351a60a5f0e13153cd3f2c71c)
2021-12-04 00:31:32 +01:00
jackpoz 6be185e6a2 Core/Misc: Log Spell/Aura name in Spell/Auras asserts
(cherry picked from commit 4130384f2e88ba266f75c553c89a351d43e52203)
2021-12-04 00:31:28 +01:00
jackpoz a855e6221d Core/Vehicles: Fix accessories disappearing on reset
(cherry picked from commit 6dae4a747da558ca46a777186d4519c32fc1bf04)
2021-12-03 22:02:13 +01:00
jackpoz eb25fbd485 Core/Misc: Apply fatigue when flying too
Fix #22856

(cherry picked from commit a76d01278a8f7986414edd0eaefaa42344926dbd)
2021-12-03 22:01:02 +01:00
Killyana 19ce65c01b Remove deprecated code
(cherry picked from commit fe311260f7fab3b6fb4d7dd2ee88826820379d94)
2021-12-03 22:00:47 +01:00
Killyana 1ced6d2192 Remove Deprecated code
(cherry picked from commit fd166025c857477d654cdea6cd6f700e53bfe64b)
2021-12-03 22:00:39 +01:00
Shauren 768ed2cbdc Core/Spells: Use 3D distance for calculating speed from movement time instead of 2D 2021-12-03 16:12:10 +01:00
Giacomo Pozzoni 910e0b70ef Core/Vehicles: Fix multiple vehicle join events on same seat (#23233)
(cherry picked from commit d4414af2d4f0736a842c4c596546c9583692ec3c)
2021-12-03 00:23:24 +01:00
Jozef Dúc a13a765610 Core/Object: Range check vol. 2 (#23226)
* Core/Object: Fix all missing parts for #23062

* Update GameObject.cpp

(cherry picked from commit 78070163dc6b9bb34ab2d006e9cc218548e861b7)
2021-12-03 00:21:19 +01:00
sirikfoll 03e03f3fc6 Core/Scripts: Fix Skadi dismount issue
Closes #23005

(cherry picked from commit fe3bf57aba9a5009e7e17922391a0d9374915ab5)
2021-12-02 23:51:51 +01:00
Giacomo Pozzoni 46170fdf01 Scripts/Spells: Fix implementation of #22332 (#23228)
Change the way #22332 moved spell damage calculations from SpellEffectDMG to scripts, using OnEffectLaunchTarget and SetEffectValue instead

(cherry picked from commit 20772dbf5d10c6ec2891a068fb556c9f5fc7d324)
2021-12-02 23:46:00 +01:00
jackpoz 97be87b7d5 Core/LFG: Remove dungeon cooldown when completing random dungeons
(cherry picked from commit 24fbbee4b9af7b5226772378dd83b78c103d969d)
2021-12-02 23:45:29 +01:00
ccrs c22431936e Core/Creature: couple refactors/renaming
(cherry picked from commit 69c15f5ae769612c89346c6a308655d0987caae7)
2021-12-02 23:45:14 +01:00
Killyana 5163559c1e Quest/Script: Breakfast Of Champions
Set both Earthshaker Drum Events to 50%

(cherry picked from commit 14445088ea0b03d556619a9e5cd5f138cca09561)
2021-12-02 19:35:47 +01:00
ccrs 1ba002ef3d Core/Object: re-change faction template related logs
(cherry picked from commit dfa54d3bf41897dbdfc0acf42f39b173dd39e857)
2021-12-02 00:39:28 +01:00
ccrs 356358ee15 Core/Misc: standarize a couple logs
(cherry picked from commit aee26eb46727171593ef7cc1d2652a7847dc88fc)
2021-12-02 00:39:28 +01:00
jackpoz 57411da5b2 Core/Pet: Change assert to error log
Change assert added in 43dec9e4d0b6f7da3c2051624742e9fb8a9bcb31 to error log since charmed creatures lose their AI until next map update

(cherry picked from commit 70fcdc687d1227a796c03f6353fc8dbfc4f4aea3)
(cherry picked from commit f45ebe71b0d8f6e3008514324a58a92c0db3810e)
2021-12-02 00:39:28 +01:00
jackpoz 49414acaef Core/CrashHandler: Remove sensitive data from crashlogs
(cherry picked from commit 25bcb1a0b2d9326519d9226dfe968caf26bb4e2d)
(cherry picked from commit 37478c5ac1efb8e4f19ffc94f444e160600c7b27)
2021-12-02 00:39:28 +01:00
jackpoz cf979de813 Core/Misc: Fix some GCC 8 warnings
(cherry picked from commit 26b6cb0584b50a2540e977cac8fa040c82fe7bb4)
2021-12-02 00:39:28 +01:00
jackpoz 841f0452a4 Core/MMaps: Revert PATHFIND_INCOMPLETE handling change in ChaseMovementGenerator in 386b5a6fd948b4866cbd9a8a9892e8777922e9c9 since the current hp reset code in Creature::Update() will reset the hp of bosses as soon as CanNotReachTarget() is true. In case of boss mechanics like Abub'Rekhan at Naxx where the boss throws the player in the air, a PATHFIND_INCOMPLETE path is returned.
The code in Creature::Update() should be modified to wait a few seconds before resetting the hp. PATHFIND_NOPATH / PATHFIND_INCOMPLETE don't really mean that the Creature can't attack the player anyway either.

(cherry picked from commit d910ffd77949f422bd08f12079866962fb53c4dc)
2021-12-02 00:39:28 +01:00
jackpoz a4fcfbb3af Core/Scripts: Rename recent GameObject spell overloads to fix GCC warnings
Rename recent GameObject spell overloads (they used to accept only Unit as parameters) to fix GCC warnings about partial function override.

(cherry picked from commit e3a9a9bfb2cba3fc1f6ed616b07fb0ea88de461f)
2021-12-02 00:39:28 +01:00
jackpoz c73fd0e6e3 Scripts/Commands: Add .debug asan commands
Add ".debug asan memoryleak" and ".debug asan outofbounds" commands to trigger Address Sanitizer warnings at runtime (or other dynamic analysis tools)

(cherry picked from commit 71d15ea25be3e86646faaa3266617a0b8177972f)
2021-12-02 00:39:20 +01:00
jackpoz dc2fed13c8 Shared/Metric: Fix a rare memory leak
Fix a memory leak in Metric happening only when enabling/disabling Metric from configs at runtime, leaking the metric added between last SendBatch() call and the ScheduleSend() call in the same function. The only way to reproduce this is to actually freeze the thread calling SendBatch(), disable metric, reload config, unfreeze the thread.

(cherry picked from commit 0d1ff7446dce7b0641f49ac55a008669838612cd)
2021-12-02 00:39:20 +01:00
jackpoz 98863659bb Scripts/Guards: Fix infinite loop in npc_air_force_bots
Fix infinite loop in npc_air_force_bots happening when aura 38067 was removed, triggering MoveInLineOfSight() that would add back the aura. Only 1 aura add/remove for guard for player is allowed now.

(cherry picked from commit 844e7ee9262a5ba035ac9e8a6ffc298fb97fd3a9)
2021-12-02 00:39:20 +01:00
jackpoz 519e3c9ab7 Core/Commands: Fix .cheat god command letting you die
Fix .cheat god command still letting you die with Area Aura like Slime near Thaddius, broken since 777b287dff

(cherry picked from commit f26f716714fefa2af4c6e3eea263206682d45236)
2021-12-02 00:39:20 +01:00
jackpoz dd825c5614 Core/Maps: Fix crash caused by setActive(false) called after DespawnOrUnsummon()
Fix crash caused by WorldObject::setActive(false) called after WorldObject::DespawnOrUnsummon() happening because the WorldObject would be set as not active but then Map::RemoveFromActiveHelper() would not be called because of not being in world anymore.
Whenever setActive() gets desync'd with what Map actually contains a rare crash would happen since Map only reads a few values of the active WorldObject, making it hard to reproduce. If this happens again some ASSERT calls should be added (or a check in Map::RemoveFromMap() could be added about if the WorldObject is in Map::m_activeNonPlayers container).

(cherry picked from commit 1c833f28e471e3787f1d328e44af5f065ad9ca8c)
2021-12-02 00:39:20 +01:00
Killyana 36e009baf2 Core: Restore reset in EscortAI::InitializeAI (#23197)
Closes  #23008

(cherry picked from commit 56b65329e5dc2fb04d5b1d6068d957490146ee89)
2021-12-02 00:39:20 +01:00
Jozef Dúc b717603a9b Core/Object: Range check (#23179)
* Should solve #23062. All credits to @xvwyh

* Remove unused variables

* Remove unused variable

* Cast int32 to uint32

* Remove G3D headers from core header file

* Change door distance

* Update GameObject.cpp

Add newline

* Update GameObject.h

Indentation

(cherry picked from commit 32e1de39a26628dcb64bc21ad415afb2ad938925)
2021-12-02 00:39:20 +01:00
jackpoz 73c6c13ace Core/GameObject: Code cleanup
(cherry picked from commit 16a154c4e87ff1ff89323a8960bf601e6c18589b)
2021-12-02 00:39:20 +01:00
Killyana a18808212e Core/GameObject: Remove summoned gobs properly from the map without effecting other cases
Ref https://github.com/TrinityCore/TrinityCore/commit/0e8e3828f48120629b642d0de1db704fd0bb86cb
Ref #23115

(cherry picked from commit 9db64666dc30b1f8cad904bf8aeea1c9daf41c95)
2021-12-02 00:39:20 +01:00
ForesterDev a2c0f6d321 Scripts/Commands: add some missing checks for .guild create command (#23201)
* Core/Conditions: implement CONDITION_GAMEMASTER

* Scripts/Commands: add some missing checks for .guild create command

(cherry picked from commit ae8750716f63ddc41f21bb38ceafe949d7260f0e)
2021-12-02 00:39:20 +01:00