Commit Graph

27268 Commits

Author SHA1 Message Date
Shauren
b6bc8a50ac Core/Spells: Correct implementation of SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC, SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2, SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED and rename them (SPELL_ATTR2_ACTIVE_THREAT, SPELL_ATTR3_NOT_A_PROC, SPELL_ATTR3_CAN_PROC_FROM_PROCS) 2022-02-02 13:56:49 +01:00
Shauren
7261592364 Warning fixes 2022-02-02 11:55:04 +01:00
Shauren
950db60435 Core/Pets: Updated pet summoning for latest client version (5 Call Pet spells and stable size 200) 2022-02-02 00:08:37 +01:00
Shauren
d6a2461fc7 Core/Misc: GCC build fix
Closes #27707
2022-02-01 23:44:14 +01:00
Shauren
fd9eb28322 Core/Pets: Adjust pet slot saving logic after constant changes in 22e823b5f9 2022-01-31 23:30:00 +01:00
Shauren
22e823b5f9 Core/Pets: Change PET_SAVE_NOT_IN_SLOT constant from 100 to -1 to truly avoid conflicts when growing stable size and change PET_SAVE_AS_DELETED from -1 to -2 2022-01-31 21:50:32 +01:00
Shauren
8349444749 Core/Pets: Save last summoned pet number in characters table 2022-01-31 21:34:48 +01:00
Shauren
0ef41fcda2 Core/Pets: Removed deprecated enum 2022-01-31 19:53:11 +01:00
Shauren
e458144442 Core/Pets: Removed storing stable slot count in db 2022-01-31 14:34:05 +01:00
Shauren
c654c15bcd Core/PacketIO: Removed handlers for two pet opcodes that no longer exist 2022-01-31 14:31:13 +01:00
Shauren
3642e3a765 Core/Pets: Fixed saving pets put in stable while not being summoned
Closes #26599

(cherry picked from commit 4acd6e1d38)
2022-01-31 00:27:29 +01:00
jackpoz
238d5b1587 Core/Pet: Fix assert triggered by e203ecda88
(cherry picked from commit 22a5b0fcde)
2022-01-31 00:27:02 +01:00
Giacomo Pozzoni
40d882b754 Core/Pet: Attempt to fix assertions triggered when summoning pets (#26501)
* Core/Pet: Attempt to fix an assertion triggered when re-summoning the current pet

* Core/Pet: Attempt to fix an assertion triggered when stabling a pet while in a vehicle

* Core/Pet: Attempt to fix an assertion triggered when stabling a pet and casting spell 6962

* Core/Pet: Attempt to fix an assertion triggered when casting spell 6962 while being dead

* Core/Pet: Attempt to fix an assertion triggered when summoning a pet while on vehicle 34775

* Handle cases in a generic way

* Code cleanup

* Core/Pet: Attempt to fix an assertion triggered when summoning a pet while on vehicle 34775 with a new character

(cherry picked from commit e203ecda88)
2022-01-31 00:26:54 +01:00
Shauren
33e747bc8f Core/Pets: Add missing nullptr check
(cherry picked from commit 0152878de5)
2022-01-31 00:25:17 +01:00
Shauren
688d1d9533 Core/Pets: Fixed crash happening when current pet is forcibly removed while being temporarily unsummoned (like on a mount)
(cherry picked from commit d163735abd)
2022-01-31 00:24:51 +01:00
Shauren
e102022eeb Core/Pets: Fixed crash happening when summoning a different pet than one that was unsummoned by summoning a guardian (imp -> infernal -> felhunter)
Closes #25478

(cherry picked from commit d29274f3a1)
2022-01-31 00:23:57 +01:00
Shauren
9147918363 Core/Pets: Fixed automatic resurrecting pets on battleground graveyards
Closes #25289

(cherry picked from commit 74a0d579ee)
2022-01-31 00:20:53 +01:00
Shauren
4de94169e9 Core/Pets: Fix loading pet data
Closes #25269

(cherry picked from commit a9a4f05a28)
2022-01-31 00:20:40 +01:00
Shauren
87b1c3700e Core/Spells: Fix summoning warlock pets in case that pet has never been summoned before
(cherry picked from commit bbcf00257e)
2022-01-31 00:20:30 +01:00
Shauren
48d491ae2f Core/Spells: Fix summoning SUMMON_PET type pets
Closes #25265

(cherry picked from commit 9c5876d8ab)
2022-01-31 00:18:48 +01:00
Shauren
ca92686b44 Core/Pets: Pet management refactoring (#25191)
* Core/Pets: Pet management refactoring

* Preload basic pet data on character login with async query
* Load additional pet data (declined names/auras/spells/cooldowns) using async query after we are sure pet loading will succeed
* Remove all select queries related to pet stable/unstable
* Remove all silent pet deletions except explicit UI-triggered abandons
* Fixed displaying stable master content when current pet is not summoned
* Allow to stable/swap unsummoned current pet

Closes #3610
Closes #21266

(cherry picked from commit 5c1fc5e387)
2022-01-31 00:17:21 +01:00
Shauren
b79a91039b Core/DBUpdater: Apply each sql update file in a separate transaction 2022-01-30 15:50:35 +01:00
Teleqraph
af0edf5afc Scripts/Spells: Moved Blessing of Faith script to spell_items (#27692) 2022-01-30 13:10:08 +01:00
Shauren
78283e3ef2 Scripts/Spells: Fixed Holy Shock visuals 2022-01-30 12:55:57 +01:00
Nyr
0d9b1072b5 Scripts/Spells: Updated Holy Shock spell script.
* renamed related enums.
* removed unnecessary rank dependency checks.
2022-01-30 12:55:57 +01:00
Shauren
2cc652b305 Core/Scripts: Expose IsCrit to hit hooks for spell scripts 2022-01-30 12:36:29 +01:00
Shauren
ea82454932 Core/Guilds: Fixed loading of guild member logout time
Closes #27690
2022-01-30 11:57:19 +01:00
Teleqraph
72839e660e Scripts/Spells: Judgment (Holy) will now apply Rank 3 debuff if the paladin knows it (#27685) 2022-01-30 00:10:04 +01:00
Shauren
faf12a8883 Core/Objects: Don't consider SMSG_UPDATE_OBJECT packets that contain only destroyed objects as empty 2022-01-29 20:35:25 +01:00
Shauren
7044204130 Core/Objects: Cleanup SmoothPhasing code - move to separate files and better integrate it with visibility system 2022-01-29 20:35:25 +01:00
Seyden
a5c713eaf2 Core/Objects: Implement SmoothPhasing part of CreateObject and replacing visible objects 2022-01-29 20:35:25 +01:00
Shauren
5a82a0381d Core/Objects: Properly choose between "Destroyed" or "OutOfRange" during visibility update 2022-01-29 16:01:57 +01:00
Shauren
472384e757 Core/Objects: Add overridable function UpdateObjectVisibilityOnDestroy 2022-01-29 15:18:27 +01:00
Shauren
4fbf6dacff Core/Spells: Exclude empty mods from affecting spells and ignore PointsIndexX mods for spells that don't have any effect at that index 2022-01-28 11:19:48 +01:00
Robingad
5b57722211 Scripts/Spells: Fix shaman Lava Surge proc (#27667)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-01-28 11:18:45 +01:00
Robingad
1696d73860 Scripts/Spells: Move shaman Lava Burst crit chance calculation to scripts and add Lava Burst Overload (#27676) 2022-01-27 23:23:37 +01:00
Robingad
3e725e1d25 Scripts/Spells: Fix shaman Earthquake (#27620)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-01-27 22:18:46 +01:00
Shauren
88659dcebf Core/Gossip: Sync naming and db structure with 3.3.5 2022-01-26 23:49:42 +01:00
Peter Keresztes Schmidt
d33214c50a Core/ChatCommands: Do not parse partial strings for numeric paramters (PR #25259)
Check if integral/floating point type arguments were parsed successfully.

std::stoull will happily parse floating point strings until the decimal separator and return the value.
Make sure for all parsing methods that we actually parsed the whole token.

This allows to use handler arguments like Variant<uint32, float> which will be populated with the right type
depending on the token value (e.g "10" vs "10.0").

(cherry picked from commit 7edad0d601)
2022-01-26 22:30:13 +01:00
Giacomo Pozzoni
f2ee365da4 Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events (#25238)
* Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events

* Core/SAI: Re-sort the events only when needed

* Fix some priority reset and wrong mEventSortingRequired handling

* Code cleanup.
Sort only events loaded from db (not stored events, not timed action list).

* Code cleanup.
Raise priority of failed casts so they are retried before other spells

* Keep priority of the action fails and is rescheduled on next update

* Don't try recasting a spell in SMART_ACTION_CAST if there are multiple targets and at least 1 was successful

(cherry picked from commit ca25e8d019)
2022-01-26 22:26:08 +01:00
Peter Keresztes Schmidt
2d1a1d8ac3 Core/ChatCommands: Honor exact matches during enum arg parsing (PR #25255)
(cherry picked from commit df29f60595)
2022-01-26 22:16:24 +01:00
Peter Keresztes Schmidt
ec44c8296d Scripts/Commands: Use enum type arg for HandleDebugAnimCommand (PR #25256)
* Core/Shared: Make Emote enum smart
* Scripts/Commands: Use enum type arg for HandleDebugAnimCommand

(cherry picked from commit 86dc58974a)
2022-01-26 22:16:05 +01:00
scizzydo
1429237144 Core/Warden: Fix for LUA_STR_CHECK (#25247)
The check above is what I use to actually get a real result for LUA_STR_CHECK, which when I used variables that would have a string to them it actually fails the check. When checking for items like a function if it exists of course it won't work... In addition, fixing the Unk2 to Unk3 causes people to be able to adjust the address of the check to the address 0x00419210 to make warden perform the FrameScript__Execute to run lua on the client. This seems to be the big request like in https://github.com/TrinityCore/TrinityCore/issues/23035

(cherry picked from commit 4125a81bb1)
2022-01-26 22:13:25 +01:00
Peter Keresztes Schmidt
3923650aeb Core/ChatCommands: Add support for enum type arguments (PR #25242)
(cherry picked from commit 5e40eb20e2)
2022-01-26 22:13:06 +01:00
Peter Keresztes Schmidt
2e3c612c80 Core/Unit: Make HandleEmoteCommand typesafe (#25249)
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter

* Scripts/HoR: Fix wrong emote during escape event

* Core/Unit: Make improve type safety of HandleEmoteCommand

Change argument type to the expected enum type Emote

* Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE

UNIT_NPC_EMOTESTATE is no flag field

(cherry picked from commit 6c7837f947)
2022-01-26 21:46:51 +01:00
Peter Keresztes Schmidt
595e89e02b Core/Spells: Mark constructors of Spell/AuraScript handlers as explicit (#25248)
Mostly to make clang-tidy happier

(cherry picked from commit 34d403e83f)
2022-01-26 20:57:27 +01:00
Shauren
b87f56d070 Core/Quests: Sync comments/log with 3.3.5 2022-01-26 20:46:42 +01:00
Aokromes
e538d42f12 Script/Quest: The Light of Dawn (#25243)
remove incorrect check, source:
https://www.wowhead.com/spell=53606/the-light-of-dawn
Flags
Can be used while dead

https://www.wowhead.com/quest=12801/the-light-of-dawn#comments:id=1495830
https://www.wowhead.com/quest=12801/the-light-of-dawn#comments:id=374127
(cherry picked from commit 681c738c61)
2022-01-26 20:44:35 +01:00
Giacomo Pozzoni
7d548c34a9 Core/AI: Remove code that removed UNIT_DYNFLAG_LOOTABLE from possessed units (#25229)
* Core/AI: Remove code that removed UNIT_DYNFLAG_LOOTABLE from possessed units

* Update PassiveAI.cpp

Restored logic that removes loot flag while being possessed

* Restored logic that removes loot flag while being possessed

(cherry picked from commit 298d799485)
2022-01-26 20:40:24 +01:00
Gildor
27c70ca728 Scripts/Naxxramas: Adjust Frogger event timer (#25214)
* Scripts/Naxxramas: Adjust Frogger event timer

Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit 7035a9caf1)
2022-01-26 19:51:48 +01:00