Commit Graph

216 Commits

Author SHA1 Message Date
Benjamin Jackson
cc5c582b4d fix(Core/Spell): Include damaging spells for starting combat. (#20154)
Init.
2024-10-07 08:55:28 -03:00
Andrew
ee870ff3b3 fix(Core/Spells): Restricted aura application prevention when immune to banish effects (e.g cyclone) (#20060) 2024-10-01 11:47:44 +02:00
Francesco Borzì
484e19d21b refactor(src/server/game/Spells): remove unused imports (#20092) 2024-10-01 08:05:15 +02:00
Jelle Meeus
6e4a9bbb14 fix(Core/Unit): fix Dual Wield for more creatures, CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK, creature disarm damage (#20015)
* enable CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK

* sql set CREATURE_FLAG_EXTRA_USE_OFFHAND

* use new HasOffHandWeaponForAttack instead of haveOffhandWeapon

no longer requires m_CanDualwield set to use Offhand attack
requires non-disarmed weapon in Offhand OR creature_flag_extra enabled

Co-authored-by: Ovah <dreadkiller@gmx.de>
Co-authored-by: Warlockbugs <warlockbugs@outlook.com>

* Make shapeshift forms which dont override attack speed use weapon damage

Co-authored-by: killerwife <killerwife@gmail.com>

* SetEquipmentSlots turning off damage update when using template default

Co-authored-by: killerwife <killerwife@gmail.com>

* Setup DualWield & Damage On Equipment Updates, implement Set and GetVirtualItem

Co-authored-by: Yatzii <47720837+Yatzii93@users.noreply.github.com>

* creature disarm damage

set disarm to reduce minmax damage by 50% instead of setting to 0

Co-authored-by: Warlockbugs <warlockbugs@outlook.com>

---------

Co-authored-by: Ovah <dreadkiller@gmx.de>
Co-authored-by: Warlockbugs <warlockbugs@outlook.com>
Co-authored-by: killerwife <killerwife@gmail.com>
Co-authored-by: Yatzii <47720837+Yatzii93@users.noreply.github.com>
2024-09-25 16:53:39 +02:00
Andrew
dea3d44b46 fix(Core/Spells): Prevent aura application if the target is immune (#20031) 2024-09-24 15:17:22 -03:00
Kitzunu
386aea03ee chore(Core/Misc): Some cleanup (#19970)
* remove weird blanks

* update if

* ) ) to ))

* missed some ) )

* now switch

* .
2024-09-21 19:34:31 +02:00
Benjamin Jackson
a0057b9e90 fix(Core/Spells): Resolve a case of triggered spells prolonging combat. (#19991)
* Revert "fix(Core/Spells): Revert triggered spell logic change. (#19983)"

This reverts commit 3bb5ec779d.

* Add aura effect check.

Co-Authored-By: Anton Popovichenko <walkline.ua@gmail.com>

* Add comment, use target instead of owner.

* Adjust comment terminology.

---------

Co-authored-by: Anton Popovichenko <walkline.ua@gmail.com>
2024-09-19 09:49:56 -03:00
Benjamin Jackson
3bb5ec779d fix(Core/Spells): Revert triggered spell logic change. (#19983)
Revert "fix(Core/Spells): Resolve a case of triggered spells prolonging comba…"

This reverts commit edd7e10dfc.
2024-09-16 11:15:50 -03:00
Benjamin Jackson
edd7e10dfc fix(Core/Spells): Resolve a case of triggered spells prolonging combat. (#19819)
* Init.

* Expand trigger info check.

* Enclose evaluation in parentheses.

Maybe workflow will be happy?
2024-09-11 11:52:15 -03:00
Benjamin Jackson
1edac37ac3 refactor(Core): Make more use of helpers. (#19835)
* Init.

* Reword.

* Update codestyle script.

Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Add gameobject type ID check, reorder checks.

* Add helper/codestyle check for unit type.

* `IsUnit()` -> `IsCreature()`

* Add `IsUnit()` method.

* Use type mask.

https: //github.com/TrinityCore/TrinityCore/commit/cc71da35b5dc74abf71f8691161525a23d870bb5
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com>

* Replace instances of `isType` with `IsUnit`.

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
2024-09-03 14:41:31 -03:00
Kitzunu
9af86553c5 chore(Core/Misc): update floor and ceil to std (#19837) 2024-09-03 08:01:00 -03:00
Kitzunu
5d31b9f98f refactor(Core/Item): Add helpers (#19828) 2024-08-31 19:38:50 -03:00
Saqra1
68402b6d91 fix(Core/Spell): Reset cd on some channeled spells (#19696)
If a spell is both channeled and has SPELL_ATTR0_COOLDOWN_ON_EVENT
attribute (only rituals) is channeled for its full duration, it goes on
an infinite cooldown. The client needs to be notified when the ritual
ends without being completed.
2024-08-25 23:43:01 -03:00
Grimdhex
643362d697 refactor(Core/Object): adds consistency in the use of type object check (#19671) 2024-08-25 09:57:37 -03:00
Tereneckla
3419f0246b fix (Core/Spells) partially revert #19529 (#19703)
Update Spell.cpp
2024-08-22 20:36:39 -03:00
Tereneckla
79a653b13e fix (Core/Spells): remove object size for hit calculation of aoe aura spells that target enemies (#19529)
remove object size for aoe on enemy spells
2024-08-18 20:34:56 -03:00
sudlud
adc9f4e7ab fix(Core/Spell): check for player before dereferencing (#19666) 2024-08-18 05:57:02 -03:00
Grimdhex
9dc20bc261 fix(Core/Entities): crash fix cause by a pointer change in #19622 (#19633)
* fix(Core/Entities): crash fix cause by a pointer change in #19622

* fix blank space for codestyle check
2024-08-15 16:28:50 -03:00
Andrew
1565758da4 Revert "chore(Script/Misc): cleanup" (#19627)
Revert "chore(Script/Misc): cleanup (#19619)"

This reverts commit 7ff8f72397.
2024-08-15 05:43:11 +02:00
Kitzunu
7ff8f72397 chore(Script/Misc): cleanup (#19619)
* chore(Script/Misc): cleanup

* more cleanup

* cleanup
2024-08-14 16:29:50 -03:00
Benjamin Jackson
67010623a0 fix(Core): Adjustments to summoning ritual object handling. (#19600)
* Init.

* Allow self-summoning.

* Revert unintended change.

Self-summoning still works fine without this being removed, I see no harm in putting it back.
2024-08-13 12:12:05 -03:00
Saqra1
ad411b49b7 fix(Core/Spell) Ritual spells cooldown on cancel (#19604)
762f78b313

Co-authored-by: killerwife <killerwife@gmail.com>
2024-08-13 12:05:12 -03:00
Saqra1
ed824de7b8 fix(Core): Ritual animations (#19602)
Channel the same spell as the original caster when clicking on a ritual
portal, but ignore the effects of the spell.

Co-authored-by: killerwife <killerwife@gmail.com>
2024-08-13 11:54:17 -03:00
Francesco Borzì
02a05fbd4c refactor(src/common): remove unused imports (#19506)
* refactor(src/common): remove unused imports

* fix: build

* chore: fix build

* chore: size_t -> std::size_t

* chore: fix fuckup from previous commit

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build with std::size_t

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build
2024-07-30 20:06:46 -03:00
avarishd
ade4c2527f fix(Core/Spells): Restore sending SMSG_CAST_FAILED for spells in SPEL… (#19102)
* fix(Core/Spells): Restore sending SMSG_CAST_FAILED for spells in SPELL_STATE_PREPARING state (cast bar in progress) unintentionally removed

https: //github.com/TrinityCore/TrinityCore/commit/844efbfca84580f7b2bd700f40209515f2aaa959
Co-Authored-By: Shauren <shauren.trinity@gmail.com>

* ocd

* correct animation and castbar staying

---------

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2024-07-17 09:14:06 -03:00
avarishd
cf7c015ea4 fix(Core/Spell): Implement SPELL_ATTR6_NO_PUSHBACK (#19292)
fix(Core/Spell): ImplementSPELL_ATTR6_NO_PUSHBACK
2024-07-17 09:09:34 -03:00
Kitzunu
385d7fd515 chore(Core/DBC): define unused unknown dbc fields (#19262)
* chore(Core/DBC): define unused unknown dbc fields

* Name unused unknown dbc fields using WDBX and wowdev.wiki

* rename SpellShapeshiftEntry to SpellShapeshiftFormEntry to properly match the DBC used

* rename sSpellShapeshiftStore to sSpellShapeshiftFormStore to properly match the DBC used

* Comment out unused field for GlyphPropertiesEntry

* Comment out unused field for MapEntry

* forgot one

* SpellShapeshiftfmt to SpellShapeshiftFormfmt

* SpellShapeshiftFormEntryfmt
2024-07-04 14:23:25 -03:00
Kitzunu
f96d4c8670 Revert "Add (core\db): Support for Homebind Orientation (#13389)" (#19257)
* Revert "Add (core\db): Support for Homebind Orientation (#13389)"

This reverts commit 2e6f6e26da.

 Changes to be committed:
	modified:   src/server/database/Database/Implementation/CharacterDatabase.cpp
	modified:   src/server/game/DungeonFinding/LFGScripts.cpp
	modified:   src/server/game/Entities/Player/Player.cpp
	modified:   src/server/game/Entities/Player/Player.h
	modified:   src/server/game/Entities/Player/PlayerStorage.cpp
	modified:   src/server/game/Entities/Player/PlayerUpdates.cpp
	modified:   src/server/game/Handlers/CharacterHandler.cpp
	modified:   src/server/game/Handlers/MiscHandler.cpp
	modified:   src/server/game/Handlers/MovementHandler.cpp
	modified:   src/server/game/Maps/Map.cpp
	modified:   src/server/game/Spells/Spell.cpp
	modified:   src/server/scripts/Commands/cs_misc.cpp
	modified:   src/server/scripts/Commands/cs_tele.cpp
	modified:   src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp

 Untracked files:
	data/sql/updates/pending_db_world/rev_1719945200692175000.sql

* Revert "Add (core\db): Support for Homebind Orientation (#13389)"

* whoops
2024-07-02 22:02:15 +02:00
Jelle Meeus
75582eb34b fix(Core/Spell): implement taunt DR CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS (#19128)
* skip other effects in case of taunt DR

* set flags_extra creature_template

fe38b78c87

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

* update query to only entries found in acore_world.creature_template

* add name as comment

* fix ci codestyle

---------

Co-authored-by: offl <offl@users.noreply.github.com>
2024-06-29 11:59:16 -03:00
Jelle Meeus
77d3eb52df fix(Core/Spell): Bladestorm remove reset swing and allow meleeSwingSpell during (#19093)
* remove reset swing

* allow meleeswingspell on PLAYER_ALLOW_ONLY_ABILITY
2024-06-26 22:23:09 +02:00
Benjamin Jackson
af722d4e88 fix(Core/Spells): Partially revert spell cancel behavior change. (#19101)
Init.
2024-06-20 14:16:21 -03:00
avarishd
2cf95ca6cb fix(Core/Spells): Don't send SMSG_CAST_FAILED for interrupted spells … (#19082)
fix(Core/Spells): Don't send SMSG_CAST_FAILED for interrupted spells after they were launched or channelling was started (this clears cooldown on client)

https: //github.com/TrinityCore/TrinityCore/commit/63bc405faeb7afcf99de6f7531e4ea59065165f4

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2024-06-17 21:26:18 -03: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
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
Kitzunu
f757e93da5 refactor(Core/Misc): Make DeathState enum class (#17607) 2023-10-28 10:54:03 +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
Kitzunu
b84596fcab chore(Scripts/DK): Move CheckCast to spell_dk_raise_ally script (#17221)
* chore(Scripts/Spell): Move CheckCast to spell_dk_raise_ally script

* Update spell_dk.cpp

* Update spell_dk.cpp
2023-09-17 03:05:10 +02:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
Synful-Syn
6b583089f3 fix(Core/Spell): Stop Blink from the falling player to move upward by 1y and stop moving backward when facing a wall (#16657)
* blink-bad-warps

* Change formatting of an if
2023-08-25 09:14:27 -03:00
M'Dic
ab2c062f03 feat(core\dbc): item.dbc, sItemStore, item_dbc, item enforcement conf, subclass fix (#14675)
feat (core\log\db): item.dbc and enforcement

dbc enforcement partial pick from tc: 0c44bd33ee

Custom Item for testing by menevia16a (SPP DEV VEIL)

feat (core\log\db): item.dbc and enforcement

Update Item.sql

Update DBCStores.cpp

Update World.cpp

Update ObjectMgr.cpp

further replacement from template to dbc lookup

further logging and implementation

cherry pick tc fd26c3c87c

replace with db lookup

update (sql): Murder all the backticks

line break fixit

fix (item_template): fix incorrect subclass

fix incorrect subclass matching with dbc enforcement

update: log correction for sub class

update log correction for sub class

add subclass to dbc enforcement

add subclass dbc enforcement since it is part of the item.dbc item_dbc

update (log): additional log

Co-authored-by: blub <trinity.michael_vincent@gmx.eu>
Co-authored-by: Shocker <511388+shocker@users.noreply.github.com>
Co-authored-by: Veil <1913466+menevia16a@users.noreply.github.com>
Co-authored-by: Shocker <43253032+shockerqt@users.noreply.github.com>
2023-04-28 01:26:44 +02:00
Kitzunu
422db05290 fix(Core/Spell): Removed gathering failure chance from herbalism and … (#15423)
fix(Core/Spell): Removed gathering failure chance from herbalism and mining nodes

* cherry-pick commit (052dfe27fc)

Co-authored-by: Tony Konzel <saxxonpike@gmail.com>
2023-03-17 10:24:36 +01:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
UltraNix
3fee40be7d fix(Core/Creatures): Spells casted by player should tap the creature … (#14725)
…only if in combat with it.
2023-01-26 04:38:16 -03:00
UltraNix
0e1e8f27de fix(Core/Spells): Every spell casted by player should tap the creature. (#14037)
Fixes #11888
2023-01-06 00:51:54 +01: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
UltraNix
4ef1010f37 fix(Core/Spells): Maelstrom Weapon should not reset attack timers. (#13504)
Fixes #13179
2022-10-29 07:13:09 -03:00