Commit Graph
2140 Commits
Author SHA1 Message Date
Killyana 1ced6d2192 Remove Deprecated code
(cherry picked from commit fd166025c857477d654cdea6cd6f700e53bfe64b)
2021-12-03 22:00:39 +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 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
Killyana f7048afac1 Core: Remove wrong emotes played in combat
Ref #23152

(cherry picked from commit c52eb49f71606b6b07b9edf279606713292ec92c)
2021-11-26 11:22:26 +01:00
jackpoz 43a41caafb Core/Misc: Fix GCC 8 warnings
(cherry picked from commit 1d04a3b216901671eae0104547715a570b1ff3ab)
2021-11-24 23:40:15 +01:00
PolarCookie f7299dce97 Core/Spell: SpellAura Redux (#22794)
* typo and correction

* spell aura no longer shared between targets

_spellAura isolated

* SPELL_AURA_CONTROL_VEHICLE is not strictly single target spell

Steam Tank Control and Wyrmrest Commander

units can reseat themselves again

* Rename 9999_99_99_99_world.sql to 2019_03_08_00_world.sql

(cherry picked from commit ec3cb05d7fbc5cef60d000af910dc39dd3af92bf)
2021-11-24 20:35:19 +01:00
Gustavo 10c915dd34 Core/Units: Only update height in SetHover if unit is bellow HoverHeight (#23061)
(cherry picked from commit 2dfea54533830b326ce9ac29d59de01d3fee503b)
2021-11-23 23:18:58 +01:00
jackpoz ef04a26bf4 Core/Pet: Add assert
Add additional assert to check if it's possible for a Pet not to have an active AI when the Player owner kills an enemy.
Ref #23036

(cherry picked from commit 43dec9e4d0b6f7da3c2051624742e9fb8a9bcb31)
2021-11-23 23:10:45 +01:00
Aokromes 2682bf0fca Core/Misc: Add categories to 3 logs
(cherry picked from commit 2d22c027fe0df505ddc63d4faaad032cddd5e258)
2021-11-23 22:29:21 +01:00
jackpoz e475cac631 Core/Spells: Fix assert triggered
Fix assert triggered when a spell would trigger another spell in OnEffectHitTarget that would kill the aura owner, then processing the main spell effects. The triggered spell can kill the aura owner, changing its death state to CORPSE and removing auras created.

Fix #21856
Ref 518e6299ca08a362bc3709daaaa5e5d5633d1bf1

(cherry picked from commit 46c7446bd4ef606b1091c1582df50e027fab28b6)
2021-11-23 20:47:31 +01:00
jackpoz 36468203dd Core/Spells: Fix assert triggered
Fix assert triggered when a spell would trigger another spell in OnEffectHitTarget that would kill the target, then processing the main spell effects. The triggered spell can kill the target, changing its death state to CORPSE and removing auras created.
Fix #22306

(cherry picked from commit 518e6299ca08a362bc3709daaaa5e5d5633d1bf1)
2021-11-21 21:09:36 +01:00
ccrs a8ec1ba9bc Core/Unit: rename & cleanup GetCreatePowers
it hurted my eyes too much

(cherry picked from commit 954fd2639a5745c8f5165f329f64a143c6ffc5f7)
2021-11-21 19:28:17 +01:00
Shauren de8e1a4820 Core/Units: Fixed crash with charm/possess
Closes #27168
Closes #27247
2021-11-21 18:49:55 +01:00
Giacomo Pozzoni ed88435494 3.3.5 UnitAI (#22911)
* Core/AI: Revamp how UnitAI changes are applied

Revamp how UnitAI changes are applied by storing current AI in a variable and all previous AIs plus current in a stack.
The callers can push/pop AIs on the stack that will take effect only in next Unit::Update() call.
The current AI will be a valid object for the whole duration of Unit::Update() and until next Unit::Update() call.

* Core/AI: Apply new AI change code

* Core/AI: Fix build

* Core/AI: Fix crash on Creature::AIM_Create()

* Core/AI: Fix crash

* Core/AI: Restore ASSERT

* Core/AI: Fix UnitAI not being popped properly when restoring a charmed AI

(cherry picked from commit 8f9654d8176646c3076482477fc4b91011fb83cc)
2021-11-21 15:36:57 +01:00
MejiandShauren 8614690e27 Core/BattlePets: Implemented battle pet name query packet (#27294)
Co-authored-by: Shauren <[email protected]>
2021-11-20 19:06:14 +01:00
SeydenandShauren e4630c5354 Core/Movement: Temporarily disable "no state change" checks in Unit::SetFeatherFall and Unit::SetCanTurnWhileFalling
Co-authored-by: Shauren <[email protected]>
2021-11-20 15:51:02 +01:00
acidmanifesto d4d47b52e3 Core/Misc: Corrected function name in log message (#27288) 2021-11-19 20:07:07 +01:00
Shauren ba2586c92f Core/Spells: Fixed unapplying rockbiter weapon
Closes #22528

(cherry picked from commit f93a23adc5ee2e0759c5766816a7885bb71e3f27)
2021-11-18 22:41:57 +01:00
Shauren f3c1b27c26 Core/Units: Fixed crash happening when charm was removed by its own charmed AI during update
(cherry picked from commit c7445669e8577884fd512fe009f7d3da4cf0429a)
2021-11-16 20:40:05 +01:00
Giacomo Pozzoni d5c41d23e6 Core/Misc: Log more information in asserts (#22783)
* Core/Misc: Log more information in asserts

Add a new function GetDebugInfos() to types that could trigger an ASSERT() to easily include more useful information in crashlogs.
This is an initial commit that requires many more commits to implement the new GetDebugInfos() function in all required types.
If the type doesn't have the function, the global default one is picked which doesn't log anything.

* Core/Misc: Fix dynamic build

Add missing attribute for dynamic build

* Core/Misc: Fix gcc/clang build

* Core/Misc: Rename GetDebugInfos() to GetDebugInfo()

* Core/Misc: Fix FormatAssertionMessage() adding an extra '\0'

* Core/Misc: Add GetDebugInfo support to Unit

* Core/Misc: Add GetDebugInfo support to Creature

* Core/Misc: Add more info to GetDebugInfo for Creature

* Core/Misc: Add GetDebugInfo support to GameObject

* Core/Misc: Add GetDebugInfo support to Player

* Core/Misc: Add more GetDebugInfo info

* Core/Misc: Add GetDebugInfo support to Item

* Core/Misc: Add GetDebugInfo support to Bag

* Core/Misc: Add GetDebugInfo support to Transport

* Core/Misc: Add GetDebugInfo support to TempSummon, Minion, Guardian, Pet

* Core/Misc: Add GetDebugInfo support to Map, InstanceMap

* Core/Misc: Add GetDebugInfo support to Spell

* Core/Misc: Fix build warning

* Core/Misc: Add GetDebugInfo support to Aura

* Core/Misc: Add GetDebugInfo support to UnitAI

(cherry picked from commit 9a924fb9d557434c5a2e4020c80db6e6bfe466ad)
2021-11-16 20:36:58 +01:00
Treeston 1015f30704 Core/AI: Add some checks to catch if the AI changes mid-update for players. Tag #22731 #22629.
(cherry picked from commit d8fee3c46b70fed660aec905a496e56d6a327aaf)
2021-11-15 22:20:17 +01:00
PolarCookie 1232f1d06e Core/Creatures: Changed creatures to become tagged by player doing any action that causes creature aggro (apart from distance) (#22759)
* This was introduced in patch 3.0.8

(cherry picked from commit f2df802c500e3878ba431d1be0a57ce293983121)
2021-11-15 22:16:04 +01:00
Treeston 7c062db94b Core/Player: Clean up duel related code. Fix a check for abusive client behavior, sanitize pointer usage, code style. Closes #22374.
(cherry picked from commit 003cc56d70c9b07f4484cb82484091ab4013895a)
2021-11-08 23:49:15 +01:00
Seyden 107f5ce0a4 Core/Auras: Implement SpellAuraInterruptFlags2::Ground and SpellAuraInterruptFlags2::Swimming (#27193) 2021-11-08 10:16:55 +01:00
ShaurenandSeyden 732a8ee261 Core/Movement: Corrected values sent in knockback packet when speedXY < 0
Co-authored-by: Seyden <[email protected]>
2021-11-06 23:17:43 +01:00
3010f2ca5d Core/Auras: Mount speed auras are now properly selected when teleporting (dungeon enter/exit, regular teleport, ...) (#27159)
* Update mount speed when learning new riding skill level
* Update mount speed on SPELL_AURA_MOUNT_RESTRICTIONS

Co-authored-by: Ovah <[email protected]>
Co-authored-by: Shauren <[email protected]>
2021-11-06 22:02:35 +01:00
Treeston c8b11f7e3d Core/Unit: Successfully (?) prevented the zombie apocalypse. Corpses can no longer gain HP. Closes #22409.
(cherry picked from commit f50a8e5926372400e87337fdcdcd03fd68a8a4c6)
2021-10-27 00:08:14 +02:00
Treeston 00b9c23e28 Core/Entities: Fixed an issue where creatures would not properly assist formation members in certain scenarios. Tagging #21967.
(cherry picked from commit a001bc63b1182babddbb188f7c762c6168a98b5c)
2021-10-23 14:45:40 +02:00
Treeston 34f9666f20 Core/Unit: Some charm fixes:
* Properly restore react state after possession expires. Closes #20769.
* Possessed creatures now don't override player control with random/waypoint motion
* SmartAI creatures now properly re-aggress charmer after charm expires

(cherry picked from commit da21ca80fc35a325df0fb0ef2f687a91121d42de)
2021-10-23 14:44:05 +02:00
Treeston 05119fd909 Core/Unit: Random code style/naming adjustments
(cherry picked from commit 710488ea2063d384d3b57aeca1eeccec103b9a38)
2021-10-23 02:14:04 +02:00
Treeston 392a644dc8 Core/Threat: Threat system adjustments:
* Online states are now re-evaluated before victim update instead of continuously. Closes #22226. Tagging #21501.
* Victim update now happens every 1s as opposed to every server tick unless current target goes away.
* Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance).
* Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target.

(cherry picked from commit 5cea572a9ad524c6f28ff8519bee61d1ff4357d0)
2021-10-23 02:14:04 +02:00
Treeston 395f58d651 Core/Unit: Inline some unnecessary helpers.
(cherry picked from commit ce06767ef50e4eca7b9ff834a873f99e6ad381d5)
2021-10-23 02:14:04 +02:00
Treeston a5989dcee9 Core/Unit: Store charmer and charmed pointers on Unit directly, no more map lookups for Unit::GetCharmer and Unit::GetCharmed
(cherry picked from commit d4ef2529e91043bc719c3238714413fd21c9005c)
2021-10-23 00:11:44 +02:00
Treeston 070bbb6707 Core/Unit: Acquire GetControllingPlayer. Use to fix duel bugs.
(cherry picked from commit d2d9f470c388a80d395e9a49a860ceb0b7e27fd3)
2021-10-22 23:51:36 +02:00
Treeston e4e8c1c59c Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
(cherry picked from commit 042f5515e4f3e52b0d2e23d9b9e147041849ce12)
2021-10-22 23:47:51 +02:00
Seyden 8f097e4425 Core/Scripts: Implement script name reloading
* Authored by Seyden
* Co-authored by Naios
* We thank Shauren for your helpful feedback
2021-10-22 12:52:37 +02:00
Shauren 3e81db7b93 Core/Auras: Implemented SPELL_AURA_CAST_WHILE_WALKING_BY_SPELL_LABEL and SPELL_AURA_CAST_WHILE_WALKING_ALL 2021-10-16 18:44:59 +02:00
Meji 11cc5c0d3b Core/BattlePets: Misc fixes (#27057)
* Rename WorldPackets::BattlePet::BattlePet::CollarID to WorldPackets::BattlePet::BattlePet::DisplayID
* Use the DisplayID field to store the model of the battle pet. If the species has BattlePetSpeciesFlags::RandomDisplay, nothing is stored. Otherwise a random model is chosen from those available
* Stored DisplayID in ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID when caging the battle pet (previously the CreatureID was being stored)
* Modified SendPlaySpellVisual function to allow sending Target and TargetPosition at the same time
* Added SpellVisual when uncaging
2021-10-16 12:15:03 +02:00
ModoX 4a6308f5f0 Core/Units: Added possibility to send emotes to single players (#27054) 2021-10-13 15:01:10 +02:00
Treeston 2642fb1a48 Core/AI: Add a new LeavingWorld AI hook
(cherry picked from commit c0a7274ff148b35577bf8c57320142bb08e10710)
2021-10-07 21:20:40 +02:00
Meji 0cfd14d2a0 Core/BattlePets: Misc fixes (#26990)
* Define BattlePetBreedQuality enum class.
* Check the quality of the battle pet species in battle_pet_quality table to avoid invalid values.
* Set CurrentBattlePetBreedQuality and WildBattlePetLevel update fields with the data of the summoned battle pet.
* Added function to calculate the WildBattlePetLevel of wild battle pets according to their spawn zone.
2021-10-03 21:20:45 +02:00
Shauren 555b2d40ec Core/Spells: Send OriginalCastId in SMSG_SPELL_START and SMSG_SPELL_GO for triggered spells in 'game' project 2021-10-03 16:36:39 +02:00
ModoX a0c4a3071c Core/Auras: Implemented new aura type 487 (SPELL_AURA_COSMETIC_MOUNTED) (#26988) 2021-10-02 21:59:22 +02:00
Shauren 2d7af28e9f Core/Transports: Store information about continent transports 2021-10-02 19:59:56 +02:00
ccrs 426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2)
2021-09-28 00:15:13 +02:00
ccrs ab740026b3 Core/Movement: crashfix workaround
untested
ref #18471

(cherry picked from commit 76667e45a902f86bd341d40efa28037137e5e541)
2021-09-26 16:16:16 +02:00
Treeston c926e2fc94 1b7ec4b follow-up
(cherry picked from commit 7fe59c95d857708181991bf8478712b56e5076ac)
2021-09-26 16:11:59 +02:00
Treeston f1ac141f25 Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.

(cherry picked from commit 081eab3cf5a5ec42917b2a7eaebf816fb36da423)
2021-09-26 16:07:09 +02:00
ccrs 0b6049fe0b Core/Movement: use helpers for validation
(cherry picked from commit 71188062314ee94402d9d3e228fd5b46e8865b18)
2021-09-26 14:21:14 +02:00