Commit Graph

129 Commits

Author SHA1 Message Date
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
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
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
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
Andrew
d55b6753c9 feat(Core/Scripting): Implement Unit hooks to modify damage before ca… (#17785) 2023-11-18 23:36:59 -03: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
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
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
a39175bc3b fix(Core/Spells): Demonic Knowledge missing 1% per rank (#17495) 2023-10-18 19:21:46 -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
AG
2779833768 feat(Core/Grids): Implement visibility notifier (#15919)
* Cherry-picked from TrinityCore (unable to find author)
2023-09-28 22:28:28 +02:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
UltraNix
c3acf75618 fix(Core/Spells): Taunt always set proper target while channelling sp… (#13948)
* fix(Core/Spells): Taunt always set proper target while channelling spells.

Fixes #13841

* Update.

* Update.
2023-08-06 03:16:05 +02:00
The GhostRider
2176435938 fix(Core/Spell): Net-o-Matic (#16482) 2023-06-08 22:33:31 -03:00
Gultask
64c7c99bda revert(Core/Player): Revert Delayed Damage System (#16246)
* Revert "fix(Core/Spells): Delayed Damage system (#16183)"

This reverts commit d282cce4af.

* Revert "fix: Crash on ProcessDelayedDamages (#16166)"

This reverts commit 3dbdea5e28.

* Revert "fix(core\player): Missing combat animation (#14199)"

This reverts commit a238e5e27b.
2023-05-13 13:50:27 -03:00
M'Dic
7e58650cf5 revert(Core): ChrRace.dbc full implementation (#16114)
* revert (core): ChrRace.dbc full implementation

we revert this due to several issues arrising. Although the dbc reading is done in full and correctly. Azerothcore relied on the original handling (althought not propper) for so long that  there is

* revert

* Update remove_charrace_dbc.sql

* Update remove_charrace_dbc.sql

* Update remove_charrace_dbc.sql
2023-04-29 08:23:11 -03:00
M'Dic
a238e5e27b fix(core\player): Missing combat animation (#14199) 2023-04-29 12:27:13 +02:00
M'Dic
3eae4c5713 fix(core/dbc): improve ChrRace DBC handling (#14843)
Cherry pick of https://github.com/TrinityCore/TrinityCore/pull/24508

Co-authored-by: HelloKitty <5829095+HelloKitty@users.noreply.github.com>
2023-04-28 01:29:33 +02:00
M'Dic
8aa2a2ac0f chore (core): Clean up (#15977)
* chore (core): Clean up

* Update SmartScript.cpp

* more clean up

* Update boss_xt002.cpp
2023-04-16 21:04:56 -04:00
UltraNix
1acbb9ee53 fix(Core/Spells): Fixed Spiritual Attunement not working with partial… (#15767)
fix(Core/Spells): Fixed Spiritual Attunement not working with partial overheals.

Fixes #14430
2023-04-02 10:13:16 -03:00
Gultask
0b04c7f3b6 fix(Core/Spells): Un-hack Spellcloth trigger spell (#15284)
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2023-03-05 16:29:41 -03:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
UltraNix
7f7a2f5a92 fix(Core/Creatures): Critters should start fleeing upon entering comb… (#14253) 2023-01-28 11:01:43 +01:00
UltraNix
44226e4754 fix(Core/Spells): Update crit chance on shapeshifting to/from feral f… (#14683) 2023-01-28 10:57:38 +01:00
UltraNix
7a03130b94 fix(Core/Spells): Regen auras should not be removed by Rapid Recupera… (#14269)
fix(Core/Spells): Regen auras should not be removed by Rapid Recuperation.

Fixes #14263
2023-01-06 00:53:10 +01:00
Angelo Venturini
9e18b86311 fix(Core/Auras): SPELL_AURA_MOD_SCALE should scale additively instead… (#14425)
...multiplicatively

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-01-02 20:43:20 -03:00
Kitzunu
4870b14b1f refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
2022-12-31 17:39:23 +01:00
Skjalf
a73d4173df feat(Core/Scripting): Pass SpellInfo through the ModifyPeriodicDamage… (#14360)
feat(Core/Scripting): Pass SpellInfo through the ModifyPeriodicDamageAurasTick() hook
2022-12-24 11:38:21 -03:00
Angelo Venturini
4992940453 fix(Core/Auras): Implement Roc form (#13959)
Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>

Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>
2022-12-11 10:58:20 -03:00
Skjalf
ab3548e2e4 feat(Core/Scripting): Expand ModifyHealReceived() to also include hea… (#13655)
feat(Core/Scripting): Expand ModifyHealReceived() to also include healing over time
2022-11-02 19:19:17 -03:00
Angelo Venturini
ad4ce0895f fix: Qaston revert (#13320)
* Revert "fix(Core/QAston): fixed shields oneshotting (#13271)"

This reverts commit e05f61d1b3.

* Revert "fix(Core): Crash (#13292)"

This reverts commit a818bcf3e2.

* Revert "fix: Crash (#13241)"

This reverts commit be423a91b5.

* delete sql

* Revert "refactor(Core/Spells): Implement QAston Proc System (#11079)"

This reverts commit cbd3fd0967.

* add sql revert

* fix sql

* remove update from world.updates
2022-10-05 21:53:20 +02:00
Angelo Venturini
e05f61d1b3 fix(Core/QAston): fixed shields oneshotting (#13271)
* fix(Core/QAston): fixed shields oneshotting

* fix build
2022-10-04 19:37:48 +02:00
IntelligentQuantum
cbd3fd0967 refactor(Core/Spells): Implement QAston Proc System (#11079)
* .

* sql

* .

* .

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* 8

* 9

* 10

* 11

* 12

* 13

* 14

* 15

* Update spell_item.cpp

* Update Unit.cpp

* 16

* 17

* 18

* 19

* 20

* 21

* Update Unit.cpp

* REVERT UltraNIX Commit

* 22

* 23

* .

* .

* .

* warrior

* warlock

* shaman rogue priest paladin mage

* spell item

* hunter

* druid

* dk

* war

* error style

* Update rev_1647677899565690722.sql

* Update rev_1647677899565690722.sql

* Update rev_1647677899565690722.sql

* .

* DOND DEL ME WAD DO DO

* error 2

* .

* .

* .

* FIX

* Update SpellInfoCorrections.cpp

* Update SpellInfoCorrections.cpp

* .

* ja genau

* Update .gitignore

* .

* .

* .,

* .

* .

* .

* .

* Update Unit.cpp
2022-10-02 19:39:34 +02:00
ZhengPeiRu21
1ddd884d6a feat(Core): Implement SP Bonus Coefficients from DBC (#12562)
* cherry-pick commit (1826437c09)

* Co-authored by: ariel- <ariel-@users.noreply.github.com>

* feat(Core): Implement SP Bonus Coefficients from DBC

* Several coefficient corrections

* Fix spell_dru_lifebloom
2022-09-17 11:09:04 +02:00
UltraNix
31892275b0 fix(Core/Spells): Resistance auras should affect creatures. (#12946)
Fixes #12867
2022-09-03 10:32:30 -03:00
M'Dic
5fe01e2d19 update (core): Additional anticheat helper (#12692)
update (core): Addition anticheat helper
2022-08-09 14:27:09 -04:00
Nefertumm
c806c62c62 fix(Core/Spells): Crashfix (#12609) 2022-08-03 09:05:24 -03:00
Kitzunu
969cb68c35 fix(Core/Auras): INVISIBILITY_UNK10 also applies the flag PLAYER_FIELD_BYTE… (#11588)
* ore/Auras: INVISIBILITY_UNK10 also applies the flag PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW

* cherry-pick commit (230f40f359)

Co-Authored-By: Meji <2695278+meji46@users.noreply.github.com>

* Update Object.h

* Update Object.h

Co-authored-by: Meji <2695278+meji46@users.noreply.github.com>
2022-05-08 23:10:10 +02:00
UltraNix
34c8f9a020 fix(Core/Spells): Fixed some damage overflows during resilience calculations. (#11497) 2022-04-24 00:39:21 -03:00
Kitzunu
1501445b0a chore(Core/Misc): nullptr cleanup (#11467) 2022-04-21 19:17:20 +02:00
Kitzunu
b709a22ddc feat(Core/Players): PlayerFlag helpers (#11294)
* feat(Core/Players): PlayerFlag helpers

* Update Player.h

* fix build
2022-04-05 18:53:50 +02:00
Kitzunu
535c7451a2 feat(Core/Unit): New helpers for DynamicFlags (#11230)
* feat(Core/Unit): New helpers for DynamicFlags

* cherry-pick commit (d611925dc7)

Co-Authored-By: Shauren <shauren.trinity@gmail.com>

* oopsie

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-04-01 07:14:29 -03:00
Kitzunu
856aed6fc6 feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227) 2022-03-30 07:59:42 -03:00
UltraNix
b025ec999e fix(Core/Spells): Periodic ticks number should not exceed the max one. (#10999)
Fixes #10876
2022-03-16 03:33:44 +07:00
UltraNix
77bab657e5 fix(Core/Spells): Base spell resistances from auras should apply to pets. (#10562)
- Closes #10555
2022-02-15 17:49:13 +01:00
UltraNix
0fea133f09 fix(Scripts/BlackwingLair): Chromaggus should cast the same affliction spell among players. (#10644)
Brood Affliction: Bronze should stun players in random intervals.
- CLoses #10584

Co-authored-by: temperrr <temperrr@users.noreply.github.com>
2022-02-15 01:07:46 +01:00