Commit Graph

627 Commits

Author SHA1 Message Date
Benjamin Jackson
d6d49a9e45 refactor(Core/ObjectMgr): Implement display probabilities. (#19068)
* Init.

Cherry-picked from TC commits 9d210476e5 and c488fb219a

Co-Authored-By: Traesh <9392905+traesh@users.noreply.github.com>
Co-Authored-By: Shauren <shauren.trinity@gmail.com>

* Add brute data.

Needs validation against what existed before, i.e. Classic change prevention.

* Add validation info for brute data.

* Remove incomplete data queries.

* Requested changes.

* Whitespace.

* Requested change.

Table name.

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Requested change.

Table name.

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Resolve the funny merge conflicts.

I wonder why git blame doesn't work on a file with 20k lines in it that's odd huh champ.

* Remove unused parameter.

* Remove uses of unused parameter.

* Use unused parameter.

Hopefully?

* I will cry.

* Sobbing endlessly.

* Remove comment.

* Adjust table structure query.

Remove length parameters and allow null for build value.

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Adjust column datatype and add check constraint.

---------

Co-authored-by: Traesh <9392905+traesh@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2024-06-16 18:12:16 +02:00
Andrew
78aaa136cc fix(Scripts/BlackTemple): Fix Free Friend spell (#19065) 2024-06-15 13:43:30 -03:00
Andrew
4294525084 fix(Core/Spells): Dive Bomb should not share damage (#18740) 2024-04-14 08:30:16 -03:00
Andrew
22c8469d8c fix(Core/Spells): Fix Anetheron sleep only targetting himself (#18735) 2024-04-13 17:14:07 +02:00
Anton Popovichenko
47f9d66874 feat(Core/Optimization): Create index for sSkillLineAbilityStore to speedup search by skillLine. (#18622)
* feat(Core/Optimization): Create index for sSkillLineAbilityStore to speedup search by skillLine.

* Remove whitespace.
2024-04-01 05:50:12 -03:00
skelUA
1a537236a8 fix(Core/Spell): Fix spell 35329 (Vibrant Blood) (#18587) 2024-03-20 05:01:57 -03:00
Mykhailo Redko
33f951d742 fix(Core/Spells): Fixed work of sobering spells and other improvements for drunk system (#18390)
* fix(Core/Spells): Fix sobering spells and possible uint8 overflow/underflow in SPELL_EFFECT_INEBRIATE handler.

* fix(Core/Spells): Improvements for SPELL_AURA_MOD_FAKE_INEBRIATE handling
2024-03-20 01:45:01 -03:00
Dan
42c41525de fix(Scripts/TheEye): increase dagger proc chance and make sure mind control only targets players (#18563) 2024-03-16 17:28:40 -03:00
Andrew
3bcdc4d23e fix(Core/Spells): Domination affect max 5 targets (#18555) 2024-03-15 08:20:51 +01:00
Walter Pagani
7a7ea27293 fix(SpellInfoCorrections) Raid buffs should ignore LoS (#18518) 2024-03-15 01:20:36 -03:00
Dan
1c8644b3bc fix(Scripts/TheEye): make legendary TK dagger have 100% proc chance (#18482)
initial
2024-03-04 10:44:35 +01:00
Elmsroth
729a1ff539 fix(Crash/Quest/Spell) : The Boon of Remulos (#18379)
Fix the spell : https://www.wowhead.com/wotlk/spell=57678/emerald-acorn-effect
Used in quest : https://www.wowhead.com/wotlk/quest=13075/the-boon-of-remulos

The crashed was caused by a nullptr Excception. It also could be throuwn in another similar test that has also been fixed.
If the spell did not have a CastTimeEntry a nullptr Exception was not checked.
2024-02-22 22:40:26 -03:00
Nathan Handley
df33a57b78 feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243)
* Class Comparison Logic Encapsulation - Parity

* Add Context to IsClass

* Add Unit IsClass script hook

* Replace additional getClass with IsClass

* Update CanUseItem to replace getClass with IsClass

* Add separate context for pet vs ability

* Change Create to Init since not all referenced contexts are creation

* Align spacing in ClassContext

* Drop context on LFGManager max power

* Update IsClass context that wraps around Missle Barrage

* Rename context for swapping weapons

* Be more specific than CLASS_CONTEXT_TALENT

* Remove duplicate context

* Moved IsClass Hook to Player

* Removed unused parameter in virtual base function

* Added maybe_unused to IsClass virtual in order to compile

To match the override signature, the virtual base needs to include the parameter in question, so using [maybe_unused] to signal to the compiler to allow it

* Remove extra blank line

* Add ABILITY_REACTIVE context

* Add context for PET_CHARM

* Remove explicit nullopt check per review

* Code Readability - Change if to if else in pet

Due to the return pattern, this doesn't change functionality in any way

* Add OnPlayer to disambiguate

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-02-10 12:25:00 -03:00
Nathan Handley
425a490a7b feat(Core/Unit): New helper HasActivePowerType and script hook OnPlayerHasActivePowerType (#18293)
* Create HasActivePower for script intercept

* Replace relevant player-related getPowerType() comparators with HasActivePowerType

* Change OnPlayerHasActivePowerType to regular bool instead of optional

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-02-09 06:27:02 -03:00
3ster
000ec142a2 Check if triggered spell has cast time (#18231)
* Check if triggered spell has cast time

* Fix client crash upon manually cancelling finished spell
2024-02-03 11:52:34 +01:00
Kitzunu
69dc8804e6 feat(Core/Spell): Add helper for TriggeredCastFlag (#18227)
* feat(Core/Spell): Add helper for TriggeredCastFlag

* Lol

* fix build
2024-01-26 13:51:42 +01:00
Kitzunu
7a859da266 fix(Script/Spell): Vanish Purge behavior (#18127) 2024-01-07 12:03:53 -03:00
Alethrion
b2fcc1babf fix(Core/Unit): Remove delay for Conflagrate aura state (#18068)
Removes ConflagrateAuraStateDelayEvent

Cherry-picked from: e27c385b48

Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>
2024-01-01 07:59:23 -03:00
Andrew
be4d90404b feat(Core/Spells): Implement SPELL_ATTR0_CU_BYPASS_MECHANIC_IMMUNITY (#18056) 2023-12-25 03:58:29 -03:00
IntelligentQuantum
258e369ee5 chore(Core): remove useless includes (#18036) 2023-12-23 12:16:27 -03:00
Angelo Venturini
10c9a2729b fix(Core/SAI/SSC): Allow Farthest target to set a min distance (#17992) 2023-12-11 19:57:44 -03:00
Angelo Venturini
36109628a9 fix(Core/Spells): Add ignore LOS to Tidal Wave (#17979) 2023-12-10 20:30:28 -03:00
Tristan 'Natrist' Cormier
ac676f87ab chore(Core/Player): remove unused AnticheatSetSkipOnePacketForASH() function (#17947) 2023-12-09 01:09:52 +01:00
Winfidonarleyan
eb1ecc38a5 feat(Core/Scripting): move all script objects to separated files (#17860)
* feat(Core/Scripts): move all script objects to separated files

* Apply 5bfeabde81

* try gcc build

* again
2023-12-02 21:13:20 +01:00
Kitzunu
5bfeabde81 chore(Core/Misc): rename spellInfo pointers (#17914)
* Rename all
2023-12-02 06:03:15 -03:00
Kitzunu
911f07c906 fix(Core/Spells): Haunted should not be right-clickable (#17864)
fix(Core/Spells): Haunted

https://github.com/azerothcore/azerothcore-wotlk/issues/16248
2023-11-26 17:50:32 +01:00
pedrohfm9
1850c974a4 fix(Core/Spells): Fix aura interruption flags for Scarlet Raven Priest Image for quest A Fall From Grace (#17828)
* Update src/server/game/Spells/SpellInfoCorrections.cpp

---------

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
2023-11-23 07:29:45 -03:00
avarishd
d5f03f0ef4 fix(Core/Spells): Spotlight having a duration (#17799) 2023-11-20 08:38:59 +01:00
Andrew
d55b6753c9 feat(Core/Scripting): Implement Unit hooks to modify damage before ca… (#17785) 2023-11-18 23:36:59 -03:00
Winfidonarleyan
e90d7a2f92 chore(Core/Misc): sort includes (#17776)
* chore(Cleanup): sort includes

* fix build

* fix build again
2023-11-18 17:51:26 +01:00
Grimgravy
c6ae678382 fix(Scripts/Quest): Improve The Force of Neltharaku (#17088)
* fix(Scripts/quest): Improve The Force of Neltharaku

* update
2023-11-18 15:28:44 +01:00
Andrew
5a4fdc7de4 fix(Core/Spells): Banish should only be dispelled by Mass Dispel (#17703)
* fix(Core/Spells): Banish should only be dispelled by Mass Dispel

* Update Unit.cpp

* Update Unit.cpp
2023-11-14 16:27:37 +01:00
Christopher Galbraith
ae5bf57dba fix(Core/Spell): Titan's Grip check if player has 2H and shield equipped (#16984)
* check if player has a 2H and shield equipped

* null check item2 for shield

* style whitespace

* removed unnecessary logic

* remove unnecessary brackets

---------

Co-authored-by: ChrisCGalbraith <chriscgalbraith@gmai.com>
2023-11-12 17:51:26 +01:00
Kitzunu
bbadc32bea Revert Visibility Notifier changes (#17682)
* Revert "fix(Core/Grid): Implement missing GridUnload setting (#17569)"

This reverts commit 79b39f9655.

* Revert "fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480)"

This reverts commit 60e27511c5.

* Revert "fix(Core): GridCleanUpDelay Log (#17436)"

This reverts commit 90b16ca065.

* Revert "feat(Core/Grids): Implement visibility notifier (#15919)"

This reverts commit 2779833768.
2023-11-12 00:48:49 +01:00
KJack
896e7c5656 (Scripts/AI) ZG20: Improvements to Thekal (Tiger Boss) (#17603)
Co-authored-by: AG <43139552+AGandrup@users.noreply.github.com>
2023-11-11 08:13:43 +01:00
Ludwig
2e5d5f2dc7 fix(Events): fix commoner spawns, auras and equips for all events (#17632)
* fix(Core/Spells): Implement Gossip NPC Appearance spells

65511 Gossip NPC Appearance - Brewfest
65522 Gossip NPC Appearance - Winter Veil
65523 Gossip NPC Appearance - Default
65524 Gossip NPC Appearance - Lunar Festival
65525 Gossip NPC Appearance - Hallow's End
65526 Gossip NPC Appearance - Midsummer
65527 Gossip NPC Appearance - Spirit of Competition
65528 Gossip NPC Appearance - Pirates' Day
65529 Gossip NPC Appearance - Day of the Dead (DotD)

* fix(DB/SAI): fix commoner spawns and auras

* equip random mug on spell 65511 Gossip NPC Appearance - Brewfest

* check if creature before equipping brewfest mug

* minor optical fixes, DELETE first, then remove duplicate spawns

* fix two displayIDs in NPC Gossip Appearance spells

* Remove whitespace at the end of the lines

* remove commoner spawns for event 7 Harvest festival from game_event_creature

* fix harvest festival event id

* Update rev_1698785311231174200.sql
2023-11-10 20:26:49 +01:00
Ludwig
cb483d124f fix(Script/Spell): fix AOE circle bug on Midsummer Torch Catching (#17654)
* fix(Spells/Midsummer): fix script for spell 46747 SPELL_FLING_TORCH_DUMMY

* SpellInfoCorrections: fix target of spell 46747 Fling torch

* DB: assign spell 46747 Fling torch to item 34833 Unlit Torches

* remove whitespaces at src/server/game/Spells/SpellInfoCorrections.cpp:4610
2023-11-09 00:19:57 +01:00
Benjamin Jackson
f898fa75cd fix(Core/Spells): Correct spell scaling formula. (#17649)
* Replace old spell scaling with revised version.

Co-Authored-By: balakethelock <111737968+balakethelock@users.noreply.github.com>

* Remove a single-use variable.

* Use funky multiply operator.

More similar to original function, if a tad less readable IMO.

---------

Co-authored-by: balakethelock <111737968+balakethelock@users.noreply.github.com>
2023-11-08 08:44:05 +01:00
avarishd
8af077bc33 fix(DB/SAI): Naberius (#17639) 2023-11-08 08:01:24 +01:00
avarishd
fb83c22dd2 fix(Core/Spells): T5 Warlock 4 Set (#17589)
* fix(Core/Spells): T5 Warlock 4 Set

* BonusMultiplier is 1 so we don't care about it
2023-11-02 12:30:03 -03:00
avarishd
11c88cb30e fix(Core/Spells): T4 Shadow Priest 4 Set (#17587)
* fix(Core/Spells): T4 Shadow Priest 4 Set

* zzz
2023-11-02 08:54:44 -03:00
Kitzunu
f757e93da5 refactor(Core/Misc): Make DeathState enum class (#17607) 2023-10-28 10:54:03 +02:00
AG
60e27511c5 fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480)
* Bug fixes

- Corrected std::chrono from seconds to milliseconds
- Got rid of leftover code that caused objects to not show up on time

* Removed logic to set gameobject as active

- More alignement with TC.
- Reduces CPU usage drastically

* Revert back to using time_t instead of std chrono

* Invoke SetNoCreate() method to reduce CPU usage drastically

* Remove setActive from static and motion transports

* Fix performance issues

* Added SetFarVisible to WG and some dungeon scripts

- Also removed setActive(true) from creatures in Wintergrasp. As for gameobjects they are set to active upon being damaged/destroyed and removed from active on rebuild (reset)

* Removed comments related to VISIBILITY_COMPENSATION

* Fix log

* Deleted unused files + corrected a check

* Added missing header

* Removed unused parameter

* Removed another unsued parameter

* Changed vector to set for i_visibleNow

- Changed vector to set for i_visibleNow in VisibleNotifer
- Adjusted HaveAtClient to accept Object*
- Adjusted SendUpdateToPlayer to send createobject packet only if not known to client
2023-10-23 05:37:11 -03:00
avarishd
8c8d459c6f fix(Core/Spells): Marked for Death affecting wrong spells. (#17406) 2023-10-21 10:28:57 -03:00
Ludwig
de6ece2462 fix(Core/Spells): interrupt midsummer ribbonpole dance on mount or sp… (#17442)
fix(Core/Spells): interrupt midsummer ribbonpole dance on mount or spell cast
2023-10-19 21:40:08 -03:00
avarishd
a39175bc3b fix(Core/Spells): Demonic Knowledge missing 1% per rank (#17495) 2023-10-18 19:21:46 -03:00
KJack
99bf49e0dd Fix (core/SpellEffects): Don't randomize summoned guardian position if target is in the DB (#17506)
* Doesn't randomize placement of guardian summons if the target position was specified in the DB

* Add `HasRadius()` check

* Add check for zero-radius effects, update IF condition style

* Accept IF condition statement suggestion

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2023-10-17 00:07:47 +02:00
avarishd
2cd4af9446 fix(Core/Spells): Allow casting ground mounts in water (#17481)
https: //github.com/TrinityCore/TrinityCore/pull/17488

Co-authored-by: SnapperRy <19622383+SnapperRy@users.noreply.github.com>
2023-10-10 20:23:45 -03:00
KJack
f127e583aa fix(core/scripting) Calculate percent-based damage before ModifyPeriodicDamageAurasTick hook (#17387)
Moved damage calculation for `SPELL_AURA_PERIODIC_DAMAGE_PERCENT` to before the hook.

Co-authored-by: KJack <kjack@electricnightowl.com>
2023-10-08 15:38:07 -03:00
avarishd
91c6bdd540 fix(Core/Spells): Script Lord Valthalak's Amulet (#17431)
* fix(Core/Spells): Script Lord Valthalak's Amulet

* cs
2023-10-07 07:34:35 -03:00