Commit Graph

27083 Commits

Author SHA1 Message Date
Giacomo Pozzoni
e188a75c68 Scripts/Kologarn: Fix another "stuck in combat" issue (#24998)
(cherry picked from commit ee34a1f19e)
2022-01-23 15:20:29 +01:00
Gildor
81154a7455 Core/Spells: Check a few aura effects for determining if should be negative (#25004)
(cherry picked from commit 5e1571062a)
2022-01-23 15:20:09 +01:00
Shauren
b6a3774a38 Warning fix 2022-01-23 15:18:10 +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 <vertozor@gmail.com>
(cherry picked from commit 203573db83)
2022-01-23 15:17:54 +01:00
Peter Keresztes Schmidt
365ae6ff25 Fix some compiler warnings reported by GCC (#25007)
* Core/AI: Remove unneeded null checks

GetMap() can never return NULL.

Fixes additionally -Wunused-variable warnings
reported by GCC.

* Core/GameObject: Fix a -Wunused-variable warning reported by GCC

* Core/Player: Fix a -Wunused-variable warning reported by GCC

* Scritps/CavernsOfTime: Fix -Wimplicit-fallthrough warnings reported by GCC

* Scritps/CavernsOfTime: Fix a -Wmaybe-uninitialized warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp: In member function ‘virtual void npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp:1119:58: warning: ‘emote’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1119 |                                 (*it)->HandleEmoteCommand(emote);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

* Scritps/PitOfSaron: Fix -Wunused-variable warnings reported by GCC

* Scritps/EyeOfEternity: Fix a -Wclass-memaccess warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp: In member function ‘virtual void boss_malygos::boss_malygosAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp:950:81: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
  950 |                             memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
      |

* Scritps/CoilfangReservoir: Fix a -Wclass-memaccess warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp: In member function ‘void boss_leotheras_the_blind::boss_leotheras_the_blindAI::Initialize()’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp:220:55: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
  220 |             memset(InnderDemon, 0, sizeof(InnderDemon));
      |                                                       ^

* Scritps/Naxx: Fix a -Wimplicit-fallthrough warning reported by GCC

For discussion see https://github.com/TrinityCore/TrinityCore/pull/25007

(cherry picked from commit 10be49bdfe)
2022-01-23 00:16:31 +01:00
Peter Keresztes Schmidt
1e1679a1f7 Core/DataStores: Port refactors from Update DBC field names to generated ones (#24999)
(cherry picked from commit c92950b3e1)
2022-01-23 00:06:16 +01:00
Max Drosdo.www
b7353fb927 Core/Player: Introduce separate level caps for each expansion (#24989)
(cherry picked from commit 3529442668)
2022-01-22 16:00:49 +01:00
Aqua Deus
0bbdfc6112 Scripts/Spells: Move spell_anchor_here to generic because is used by more than one boss (#27641) 2022-01-22 14:52:05 +01:00
Aqua Deus
c2dd07aa32 Core/Auras: Named new proc flags (#27655) 2022-01-22 14:49:53 +01:00
Shauren
d32dd913fd Core/Units: Fixed typo in unit flag name 2022-01-22 14:45:03 +01:00
Shauren
b4952db464 Core/Units: Named unit flags linked to CreatureDifficulty flags 2022-01-22 13:21:15 +01:00
Teleqraph
2fd4ce9fb9 Core/Units: Named UNIT_FLAG2_UNTARGETABLE_BY_CLIENT and renamed CREATURE_DIFFICULTYFLAGS_5_CANNOT_SWITCH_TARGETS to CREATURE_DIFFICULTYFLAGS_5_UNTARGETABLE_BY_CLIENT (#27637) 2022-01-22 12:22:55 +01:00
Eridium
a4ed8806b7 Creature/Script: npc_blackfathom_deeps_event (#24969)
* Creature/Script: npc_blackfathom_deeps_event

* Update blackfathom_deeps.cpp

* Update blackfathom_deeps.h

* codestyle

* Update blackfathom_deeps.cpp

Co-authored-by: Killyana <Killyana@users.noreply.github.com>
Co-authored-by: Ovah <dreadkiller@gmx.de>
(cherry picked from commit 98c37b15e0)
2022-01-22 01:20:23 +01:00
Shauren
6ce56e8137 Core/DBLayer: Fixed false positive msvc analysis warning 2022-01-22 01:11:16 +01:00
jackpoz
ff778a7581 Core/Creature: Add null check for charmed creatures
(cherry picked from commit b4adaa838c)
2022-01-22 00:50:40 +01:00
Ovah
c7cf9f8c6c Core/Spells: Expose corpseTarget to spell scripts with SpellScript::GetHitCorpse() (#24981)
Closes #24945

(cherry picked from commit 94a4404e7e)
2022-01-22 00:34:38 +01:00
akrom23
77d76ecc1d Creature/AI: Remove SetVisible from SmartAI::InitializeAI
Closes #24184

(cherry picked from commit f99a79cb43)
2022-01-22 00:34:25 +01:00
Shauren
0ac5b1da8c Core/Spells: Don't select corpses for spell targets that expect to hit units
Closes #24980

(cherry picked from commit 14db2215d3)
2022-01-22 00:33:53 +01:00
Ovah
508ea9e3c7 Scripts/ICC: fixed a crash in the Lich King encounter caused by invalid corpse targets
(cherry picked from commit 232628f0a6)
2022-01-22 00:33:12 +01:00
offl
fb6a72aa2d DB/Quest: Convert & update support for 'Khu'nok Will Know' to SAI
Closes #24933

(cherry picked from commit c6811d3e4e)
2022-01-21 22:21:43 +01:00
Shauren
a0e5f9db7e Core/Misc: Fixed engrish in static_assert for EnumFlag and restrict DEFINE_ENUM_FLAG to enums only (with std::is_enum) 2022-01-21 22:19:57 +01:00
Ovahlord
7a5529eb58 Core/Events: refactored battleground holiday assignments.
Instead of going with shitty bitmasks we now accept plain battleground ids
 instead

(cherry picked from commit 8a82403400)
2022-01-21 22:09:06 +01:00
offl
144914b4f0 DB/Quest: Convert & update support for 'Chasing A-Me 01' to SAI
Closes #24925

(cherry picked from commit 46ad9fa0d9)
2022-01-21 20:42:32 +01:00
offl
4d64524a70 DB/Quest: Convert & update scripts from Thousand Needles to SAI
Closes #24924

(cherry picked from commit 18864aeddb)
2022-01-21 20:36:00 +01:00
offl
20535a5d2d DB/Quest: Convert & update support for 'Protect Kaya' to SAI
Closes #24923

(cherry picked from commit c29e3b46af)
2022-01-21 20:34:54 +01:00
Giacomo Pozzoni
74923df35a Core/Pools: Attempt to workaround pools being broken since 2015 (#24949)
* Core/Pools: Attempt to workaround pools being broken since 2015

Attempt n°2

* Fix warning

(cherry picked from commit 8c0a315734)
2022-01-21 18:57:24 +01:00
jackpoz
8fd7a4b6e5 Core/PetAI: Validate GetCharmInfo()
Fixes #24870

(cherry picked from commit bf62901053)
2022-01-21 18:55:48 +01:00
Gildor
054b62be3b Core/Gameobjects: Improve IsValidAttackTarget faction check for traps that hasn't owner or have NPC owner (#24931)
(cherry picked from commit 2a5f537d6a)
2022-01-21 18:50:43 +01:00
Gildor
a8edacd20b Core/Spells: Check a few aura effects for determining if should be negative (#24930)
* Core/Spells: Check a few aura effects for determining if should be negative

* Rename 9999_99_99_99_world_auras.sql to 2020_07_04_00_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 26ba4ecd51)
2022-01-21 18:45:04 +01:00
offl
dde859cb21 DB/Creature: Convert & update support for 'Messenger Torvus' to SAI
Closes #24852

(cherry picked from commit 2ebef0c51c)
2022-01-21 16:16:43 +01:00
Gildor
fb39553831 Core/Gameobjects: Traps shouldn't ignore IsImmuneToNPC/IsImmuneToPC and IsInSanctuary rules if has owner (#24911)
(cherry picked from commit 4a4aac61d5)
2022-01-21 16:16:04 +01:00
Gildor
a16c804ea0 Core/Spells: SPELL_AURA_MOD_HEALTH_REGEN_PERCENT should be negative if TargetType is enemy and Basepoints are negative (#24902)
(cherry picked from commit af1571ce50)
2022-01-21 16:12:31 +01:00
Gildor
de21d446aa Core/Spells: SPELL_AURA_MELEE_SLOW should be negative if TargetType is enemy or Basepoints are negative (#24901)
(cherry picked from commit 7a81ce2f21)
2022-01-21 16:11:39 +01:00
Gildor
cc6e616e61 Core/Spells: SPELL_AURA_MOD_MELEE_RANGED_HASTE should be negative if Basepoints are negative (#24900)
(cherry picked from commit 0759d73777)
2022-01-21 16:11:15 +01:00
Shauren
96137fb30f Core/Misc: Future msvc warning fixes 2022-01-21 13:40:48 +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 <dreadkiller@gmx.de>
(cherry picked from commit cc71da35b5)
2022-01-20 00:13:02 +01:00
genion18
1ddfbf3ecc DB/Quest: Rumors for Kravel outro event
Closes #24835

(cherry picked from commit 32aebc14ab)
2022-01-19 23:06:57 +01:00
offl
fa0d4ceea1 DB/Quest: Convert & update support for 'Escorting Erland' to SAI
Closes #24834

(cherry picked from commit eea3cf1401)
2022-01-19 23:01:12 +01:00
jackpoz
68faf5bc4b Core/Common: Replace ASSERT(false, "...") with ABORT_MSG("...")
(cherry picked from commit 54c701cf0d)
2022-01-19 22:17:42 +01:00
jackpoz
f7c1ae01f8 Core/Common: Add macro ASSERT_WITH_SIDE_EFFECTS to be used when asserting conditions that have side effects
(cherry picked from commit 49da3533cd)
2022-01-19 21:18:39 +01:00
offl
306e08cc31 DB/Quest: Convert & update support for 'Scratches' to SAI
Closes #24824

(cherry picked from commit d526d5d176)
2022-01-19 20:54:24 +01:00
Shauren
a270005de1 Core/SAI: Support SMART_TARGET_POSITION in SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER 2022-01-19 19:20:56 +01:00
Shauren
279744efcd Core/Commands: Fixed wrong field being used to determine instance type in .lookup map id 2022-01-19 12:37:27 +01:00
Shauren
18cc0b2e4a Core/Quests: Fixed quest select query 2022-01-19 10:40:10 +01:00
offl
c5bc1cbeb6 DB/Quest: Convert Galen's Escape to SAI
Closes #23684

(cherry picked from commit f621173748)
2022-01-18 23:47:59 +01:00
offl
775c6ca039 DB/Quest: Convert & update support for 'City of Light' to SAI
Closes #24814

(cherry picked from commit f2c2210dbb)
2022-01-18 23:45:00 +01:00
funjoker
4c5f57d712 Core/Quests: Remove RewardMoney from quest_template as it is not a static value and depends on receiving player (#27590) 2022-01-18 21:22:41 +01:00
Jeremy
bbed5dc3e8 Core/Auras: Store non-unit caster guids in auras (#27625)
This allows retrieving any caster object, not just units
2022-01-18 21:18:25 +01:00
Seyden
12d00e2e5f Scripts/Spells: Implement OnPrecast scripting hook for spell scripts (#27632)
* Fires before cast bar starts
2022-01-18 21:06:10 +01:00
Seyden
f383c0ea21 Core/SAI: Add SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER (#27581) 2022-01-18 20:51:23 +01:00