Commit Graph
1067 Commits
Author SHA1 Message Date
Peter Keresztes Schmidt 44ea32ace4 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
2022-01-23 22:16:15 +01:00
Shauren 596bf2b772 Core/Misc: Replace boost::optional with std::optional part 2 2022-01-23 20:31:52 +01:00
Giacomo Pozzoni e9cf3828ba Core/Spells: Implement SPELL_EFFECT_ACTIVATE_OBJECT. (#23) (#24997)
* Core/Spells: Implement SPELL_EFFECT_ACTIVATE_OBJECT. (#23)

Original research by @xvwyh.

* Add missing sql update

* Fix some build errors

* Remove unused enum values

* Change artkits from 0-4 to 0-3

* Remove unused code

* Code review feedback

* Fix sql

* Remove artkit4 special case handling

* Default initialize artKits

* Code review feedback

* Split sql into structure and data files

Co-authored-by: Warpten <[email protected]>
(cherry picked from commit 203573db83fb1d3f141b5aadbf1d1ca0a637bf94)
2022-01-23 15:17:54 +01:00
Giacomo Pozzoni 8f4db9aa69 Core/Spells: implement corpse target type support and properly fix resurrections (#24921)
* Core/Spells: implement corpse target type support and properly fix resurrections

(cherry picked from commit df193945d9aff8596985a20e2c654105354b0af7)

* Core/Spells: implement TARGET_CORPSE_SRC_AREA_RAID and updated remaining resurrection effect handlers for updated corpse targeting

(cherry picked from commit 98b075cb4b0da126d409ab42daa63a1f531a70ea)

* Fix no-pch

Co-authored-by: Ovahlord <[email protected]>
(cherry picked from commit cc71da35b5dc74abf71f8691161525a23d870bb5)
2022-01-20 00:13:02 +01:00
Meji ddc71206de Core/Spells: Implemented spell effect 225 (SPELL_EFFECT_GRANT_BATTLEPET_LEVEL) (#27506) 2022-01-07 22:14:07 +01:00
jackpoz e71352db6f Core/Spells: Fix assertion triggered
(cherry picked from commit 740afc71358c32257540350a6d7d4071a851452f)
2022-01-01 20:11:02 +01:00
Giacomo Pozzoni a9e325f6b7 Core/Logs: Log full guid instead of just low guid, part 2
(cherry picked from commit 3def52c1c459f566ab2b2d8cf017c70df4d7cf22)
2022-01-01 00:51:54 +01:00
Giacomo Pozzoni 6ec933f281 Core/Logs: Log full guid instead of just low guid
(cherry picked from commit 468ecb7252ea4eabd37e11b9ddbbb96ffd26bd7e)
2021-12-31 21:56:40 +01:00
Ovah fb7a60d49d Core/Spells: fixed a possible client crash when casting pull towards dest spells with misc value 0 (#24365)
* This case is not happening in 335 yet as it barely has any spell with pull towardst dest effects. However, this is very well present in 4.x and beyond so let's add it for future cherrypicks

(cherry picked from commit 61aec37b4ffd5fbd0bdde4de1cf7313d578651a7)
2021-12-31 00:55:12 +01:00
Meji 9354b4ac8e Core/Spells: Implemented battle pet experience related spell effects and auras (#27488)
* Spell effect 286 (SPELL_EFFECT_GRANT_BATTLEPET_EXPERIENCE)
* Aura type 420 (SPELL_AURA_MOD_BATTLE_PET_XP_PCT)
2021-12-30 20:38:29 +01:00
Shauren 853c58715e Core/Spells: Use orientation given in destTarget instead of always taking casters orientation for all effect types 2021-12-29 14:18:53 +01:00
Jeremy 15b9183635 Core/ZoneScript: Add "invoker" param to ProcessEvent (#24758) 2021-12-27 13:55:59 +01:00
Meji 924182f692 Core/BattlePets: Misc fixes (#27446)
* Added script for "Summon Battle Pet" spell (118301).
* Set the saved display of the battle pet when summoning it.
* If a summon has SummonPropertiesFlags::SummonFromBattlePetJournal it will remove NpcFlag UNIT_NPC_FLAG_WILD_BATTLE_PET (Wild battle pets).
* When a creature is summoned with SummonTitle::Companion, it will check to see if it has SummonPropertiesFlags::SummonFromBattlePetJournal before updating the battle pet's update fields. (If you have a summoned battle pet and summon a creature with that SummonTitle, it will incorrectly update the battle pet's update fields with the summoned battle pet's data).
* Implemented SummonPropertiesFlags::UseCreatureLevel. If a summon has this flag, it will use the owner's level (If the summon doesn't have SummonProperties it will always use the selected level).
2021-12-25 15:27:58 +01:00
NoName cc1c67183f Core/Spell: SPELL_EFFECT_PULL_TOWARDS correction (#24251)
* SPELL_EFFECT_PULL_TOWARDS correction

* Hi Appveyor

(cherry picked from commit b88881f8adc2448395f7487d398012094a06a64f)
2021-12-23 22:44:06 +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 6067a996324dc4e36a414257e6abf7f9dfdfa934)
2021-12-22 20:50:33 +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 76831f1f467efe4aa26a38dc58c9eab2229bce71)
2021-12-21 15:21:39 +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 <[email protected]>
(cherry picked from commit e10239311c95866f9316521b570f8600c08a2ff5)
2021-12-21 00:48:30 +01:00
ForesterDev 9124fd1f1f Core/Items: implement some helper methods for easier readability (#24113)
(cherry picked from commit 573ddf4d22564d022e30807c5ba2c6eb1a2c8b2e)
2021-12-21 00:46:13 +01:00
Meji c4fee8c5cf Core/Spells: Implemented spell effect 204 (SPELL_EFFECT_CHANGE_BATTLEPET_QUALITY) (#27425) 2021-12-19 13:27:27 +01:00
Keader 24281a5323 Core/Spells: Fixed SPELL_EFFECT_DISPEL when target has 2 spells with same ID (#23710)
Ty sirikfoll for all help :)

(cherry picked from commit 95284b23d1e48883fe738ecf5a12c4253566894e)
2021-12-18 20:32:42 +01:00
Sorikoff 66f5275d26 Scripts/Spells: Runic Healing Injector (#23690)
* Scripts/Spells: Runic Healing Injector

* Rename 9999_99_99_99_world.sql to 2019_08_08_00_world.sql

(cherry picked from commit 382f563571d39f9ec02a0df899dbdaaf1745af83)
2021-12-18 19:15:11 +01:00
Sorikoff 1fd0ba816f Scripts/Spells: Devour Humanoid (#23660)
(cherry picked from commit 0d53a0ba981a2471fcd951465f6be5d073fddd38)
2021-12-18 00:01:56 +01:00
Giacomo Pozzoni 92fc09b1b5 3.3.5 Don't allow to summon dead hunter pets (#23271)
* Core/Player: Add support to SMSG_PET_TAME_FAILURE

* Core/Pet: Don't summon dead pets when using "Call pet"

(cherry picked from commit a0f8ce14e9a7aeceea035a733625cc695909a5bd)
2021-12-17 23:56:51 +01:00
Shauren e8b3dda4a0 Core/BattlePets: Wrap battle pet related code in a separate namespace 2021-12-17 14:23:43 +01:00
Shauren 05037bd936 Core/Auras: Implemented ChangeSpec, ChangeTalent and ChangeGlyph interrupt flags 2021-12-17 12:18:43 +01:00
Sorikoff a947a0e85e Scripts/Spells: Brittle Armor & Mercurial Shield (#23576)
(cherry picked from commit a64d7df6623d90c529fab76dc6b41e2db5a3abd4)
2021-12-15 00:17:32 +01:00
ccrs 4e6c59dca7 Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
        uint8 GetLevelForTarget(WorldObject const* /*target*/)
        void SetLevel(uint8 lvl)
        uint8 GetRace()
        uint32 GetRaceMask()
        uint8 GetClass()
        uint32 GetClassMask()
        uint8 GetGender()

(cherry picked from commit 5c09ff51f7015b775def8d5cc1f678eaef37200f)
2021-12-13 00:42:20 +01:00
Sorikoff b8d675eba7 Scripts/Spells: Dimensional Ripper - Everlook (#23547)
(cherry picked from commit 5c09ff51f7015b775def8d5cc1f678eaef37200f)
2021-12-13 00:42:20 +01:00
Sorikoff 996b7c1f0e Scripts/Spells: Ultrasafe Transporter: Toshley's Station (#23537)
* Scripts/Spells: Ultrasafe Transporter: Toshley's Station

* Rename 9999_99_99_99_world.sql to 2019_06_29_01_world.sql

(cherry picked from commit 33b4ad5a89cae0d3d527b58e1a438772450d7e32)
2021-12-13 00:42:18 +01:00
Sorikoff 7b08125c23 Scripts/Spells: Remove Collapsing Cave Aura (#23533)
* Scripts/Spells: Remove Collapsing Cave Aura

* Rename 9999_99_99_99_world.sql to 2019_06_29_00_world.sql

(cherry picked from commit 8d1a5fa1266dc98438cabfb1ced7891791245ff0)
2021-12-13 00:42:18 +01:00
Sorikoff 88457030cc Scripts/Spells: Deathbolt (#23531)
* Scripts/Spells: Deathbolt

* Rename 9999_99_99_99_world.sql to 2019_06_28_01_world.sql

(cherry picked from commit 62b2c379b37b843076eb4df379e7de86b18303eb)
2021-12-13 00:42:18 +01:00
Sorikoff ea4c1ae7d0 Scripts/Spells: Dimensional Ripper - Area 52 (#23505)
* Scripts/Spells: Dimensional Ripper - Area 52

* Rename 9999_99_99_99_world.sql to 2019_06_28_00_world.sql

(cherry picked from commit 63f548921c268cc9f30af68bf9b41c80df0492ac)
2021-12-13 00:42:18 +01:00
Wyrserth 575f42089e Core/Spell: fix some issues with taunt spells (#23425)
(cherry picked from commit 5dc2dfd60c4ecd243729e86496d926976e383156)
2021-12-13 00:42:18 +01:00
Treeston 9f7d3ebd6a Core/AI: Remove EnterEvadeMode calls from Guardian/Summon spell handlers. Add follow logic to CreatureAI::JustAppeared. Closes #23270.
(cherry picked from commit 8499434340919902b5aefe58f812c3f24d37310d)
2021-12-12 01:27:04 +01:00
Sorikoff 799fba7fd1 Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind (#23463)
* Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind

* Revert "Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind"

This reverts commit a8055960

* Revert "Revert "Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind""

This reverts commit a5be792b

* Fix NoPCH

* Clean up

* Clean up

* fixup! Clean up

* Caster -> Target

* Rename 9999_99_99_99_world.sql to 2019_06_22_01_world.sql

(cherry picked from commit ac7c72d63392cc246d2cd4ab64f558f2bf0970bf)
2021-12-11 23:01:46 +01:00
Sorikoff aa407adf3e Scripts/Spells: Ultra-Advanced Proto-Typical Shortening Blaster (#23456)
* Scripts/Spells: Ultra-Advanced Proto-Typical Shortening Blaster

* Fix NoPCH

* Correct header

* fixup! Clean up

* Rename 9999_99_99_99_world.sql to 2019_06_22_00_world.sql

(cherry picked from commit 40b09e3df144304562a63f33d16e25bbde5079fd)
2021-12-11 22:58:16 +01:00
Sorikoff 8fc52bc5e5 Scripts/Spells: Migrate Teleporting to Script (#23458)
* Scripts/Spells: Migrate Teleporting to Script

* Rename 9999_99_99_99_world.sql to 2019_06_21_02_world.sql

(cherry picked from commit e9d803ccee2fb5d229babbf6c2c4a17b1986edb0)
2021-12-11 22:28:55 +01:00
Shauren 4595e63dd7 Core/Spells: Deleted old script (partial port of a4cd4d8b872bcbd9e28e9ae76f5220b30494a996) 2021-12-11 21:40:30 +01:00
Wyrserth 07dcb28f80 Spell/Fishing: ensure that the fishing bobber expires when the Fishing channeling ends, and don't allow fish to be hooked in the instant the spell is cast. (#23448)
(cherry picked from commit 9083fc149d61f9f2ee8fe760ece4392b1e8b181e)
2021-12-11 16:18:57 +01:00
DanVS f15bcebdbe Core/Spell: Jump Speed Calculations (#22886)
* Jump Speed Calculations

* Fix

(cherry picked from commit 0197a2f990aa7c7eaf8637a2a5da7f43def9c4bd)
2021-12-11 15:25:57 +01:00
Wyrserth 59da957165 Core/Spells: don't allow spells with SPELL_EFFECT_CREATE_LOOT to be cast if there isn't enough space in inventory (#23404)
* Core/Spells: don't allow spells with SPELL_EFFECT_CREATE_LOOT to be cast if there isn't enough space in inventory,

* Move GetFreeInventorySpace() to a better place, thanks ccrs!

(cherry picked from commit 218055280af4563f28643e2683eafe40808f90db)
2021-12-11 13:29:39 +01:00
ForesterDev dd4da6ce5b Core/Logging: Split logs for unknown and zero triggered spells (#23180)
* Core/Conditions: implement CONDITION_GAMEMASTER

* Split logs for unknown and zero triggered spells

* Update SpellAuraEffects.cpp

* Update SpellAuraEffects.cpp

* Update SpellAuraEffects.cpp

* Update SpellEffects.cpp

* Update SpellAuraEffects.cpp

* Update SpellAuraEffects.cpp

* Update SpellEffects.cpp

* Update SpellEffects.cpp

(cherry picked from commit 1f853480ee07d22fdbe9782d600423bbd4ef4abb)
2021-12-10 21:41:50 +01:00
Meji 0a8f79ad5a Core/BattlePets: Improvements when enabling battle pets (#27367) 2021-12-10 20:17:21 +01:00
Wyrserth 9d865f7536 Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura (#23319)
* Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura.

* Forgot to change this in last-second rename.

* Apply suggested changes, thanks Shauren!

(cherry picked from commit 8bc5451864570c07eff6d427846335044f85a509)
2021-12-09 00:13:59 +01:00
Gildor 9752ef4d6e Core/Spells: Fix spells with Health Leech effect, now check damage absorb when calculate Heal (#23312)
Closes: #23311
(cherry picked from commit ad89472fe3512b4a5f4160240154fd5b11a3b07c)
2021-12-07 00:31:48 +01:00
Giacomo Pozzoni 5f545f5402 3.3.5 gameobject summoner (#23289)
* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)

* Scripts/Misc: Fix build

* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()

* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too

* Fix build

* Core/TempSummons: Allow GameObject to be owner of TempSummon

* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon

* Scripts/Misc: Fix no-pch build

* Core/TempSummons: Implement PR comments

(cherry picked from commit 797fba98e95da1236465a15061ec4122d7ec33fe)
2021-12-07 00:02:03 +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
Sorikoff d72e809ecf Scripts/Spells: Migrate Some Scripted Spells to Scripts (#23185)
* Migrate spells to scripts

* Simplify code

* I need to sleep

* Update chapter1.cpp

* Use actual damage

* No need in null check here

(cherry picked from commit 2cfaeb14004cfbb5500855472ad89ab9238df13d)
2021-11-30 22:30:53 +01:00
Shauren a809932f50 Core/Spells: Implemented spell effect 254 (SPELL_EFFECT_JUMP_CHARGE) 2021-11-28 00:05:38 +01:00
MejiandShauren 93c668ac50 Core/BattlePets: Implemented BattlePetSpeciesFlags::NotAccountWide (#27303)
Co-authored-by: Shauren <[email protected]>
2021-11-25 20:55:12 +01:00