Commit Graph

26168 Commits

Author SHA1 Message Date
Shauren
dc4b516844 Core/Movement: Use correct root check
(cherry picked from commit 3e9239a1e5)
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 99a9129a72)
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 49d0a5bbb6)
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 cc1a520299)
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 49dc8a8e44)
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
Meji
198d18bef5 Core/SAI: Fixed crash when using SMART_TARGET_CLOSEST_* in areatrigger smart script (#27336)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
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 a639a99c6c)
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 d1c5b3c897)
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 1e97dfec53)
2021-12-04 00:31:32 +01:00
Killyana
bdb728a165 Spell/Script: Throw Torch must hit only one target
(cherry picked from commit ce562415ed)
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 b76bcc836c)
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 0a25069db4)
2021-12-04 00:31:32 +01:00
jackpoz
ccc8d679d8 Core/Misc: Log Map name in asserts
(cherry picked from commit 991b2a11bd)
2021-12-04 00:31:32 +01:00
jackpoz
6be185e6a2 Core/Misc: Log Spell/Aura name in Spell/Auras asserts
(cherry picked from commit 4130384f2e)
2021-12-04 00:31:28 +01:00
jackpoz
a855e6221d Core/Vehicles: Fix accessories disappearing on reset
(cherry picked from commit 6dae4a747d)
2021-12-03 22:02:13 +01:00
jackpoz
eb25fbd485 Core/Misc: Apply fatigue when flying too
Fix #22856

(cherry picked from commit a76d01278a)
2021-12-03 22:01:02 +01:00
Killyana
19ce65c01b Remove deprecated code
(cherry picked from commit fe311260f7)
2021-12-03 22:00:47 +01:00
Killyana
1ced6d2192 Remove Deprecated code
(cherry picked from commit fd166025c8)
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 d4414af2d4)
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 78070163dc)
2021-12-03 00:21:19 +01:00
sirikfoll
03e03f3fc6 Core/Scripts: Fix Skadi dismount issue
Closes #23005

(cherry picked from commit fe3bf57aba)
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 20772dbf5d)
2021-12-02 23:46:00 +01:00
jackpoz
97be87b7d5 Core/LFG: Remove dungeon cooldown when completing random dungeons
(cherry picked from commit 24fbbee4b9)
2021-12-02 23:45:29 +01:00
ccrs
c22431936e Core/Creature: couple refactors/renaming
(cherry picked from commit 69c15f5ae7)
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 14445088ea)
2021-12-02 19:35:47 +01:00
ccrs
1ba002ef3d Core/Object: re-change faction template related logs
(cherry picked from commit dfa54d3bf4)
2021-12-02 00:39:28 +01:00
ccrs
356358ee15 Core/Misc: standarize a couple logs
(cherry picked from commit aee26eb467)
2021-12-02 00:39:28 +01:00
jackpoz
57411da5b2 Core/Pet: Change assert to error log
Change assert added in 43dec9e4d0 to error log since charmed creatures lose their AI until next map update

(cherry picked from commit 70fcdc687d)
(cherry picked from commit f45ebe71b0)
2021-12-02 00:39:28 +01:00
jackpoz
49414acaef Core/CrashHandler: Remove sensitive data from crashlogs
(cherry picked from commit 25bcb1a0b2)
(cherry picked from commit 37478c5ac1)
2021-12-02 00:39:28 +01:00
jackpoz
cf979de813 Core/Misc: Fix some GCC 8 warnings
(cherry picked from commit 26b6cb0584)
2021-12-02 00:39:28 +01:00
jackpoz
841f0452a4 Core/MMaps: Revert PATHFIND_INCOMPLETE handling change in ChaseMovementGenerator in 386b5a6fd9 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 d910ffd779)
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 e3a9a9bfb2)
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 71d15ea25b)
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 0d1ff7446d)
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 844e7ee926)
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 f26f716714)
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 1c833f28e4)
2021-12-02 00:39:20 +01:00
Killyana
36e009baf2 Core: Restore reset in EscortAI::InitializeAI (#23197)
Closes  #23008

(cherry picked from commit 56b65329e5)
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 32e1de39a2)
2021-12-02 00:39:20 +01:00
jackpoz
73c6c13ace Core/GameObject: Code cleanup
(cherry picked from commit 16a154c4e8)
2021-12-02 00:39:20 +01:00
Killyana
a18808212e Core/GameObject: Remove summoned gobs properly from the map without effecting other cases
Ref 0e8e3828f4
Ref #23115

(cherry picked from commit 9db64666dc)
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 ae8750716f)
2021-12-02 00:39:20 +01:00