Commit Graph

430 Commits

Author SHA1 Message Date
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
Anton Popovichenko
92ec34753f fix(Core/Creature): Add support for CREATURE_FLAG_EXTRA_NO_PARRY_HAST… (#19927) 2024-09-13 16:23:05 -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
Grimdhex
56d2cc7b4c refactor(Cote/Unit): cleanup - part2 (#19821)
* fix(Core/AI): remove an unused variable

* Move variables at the end of each sections

* reorder several methods

* remove few inline defintions

* few codestyle fixes
2024-09-11 11:50:24 -03:00
Benjamin Jackson
cdc00b42bd fix(Core/AI): Add back leash update. (#19916)
Init.
2024-09-08 20:49:28 +02:00
天鹿
dd2167b00b fix(Core/AI): Creature SetInCombatState Leashing. (#19889)
* Update Unit.cpp

* Update pit_of_saron.cpp

* Update Unit.cpp
2024-09-07 01:03:19 -03:00
Benjamin Jackson
632d7f5f9e fix(Core/Unit): Add leash extension with damage dealt. (#19880)
Init.
2024-09-06 17:02:53 -03:00
Benjamin Jackson
bf18b9bdfb fix(Core/AI): Improve creature leashing behavior. (#19751)
* Init.

https: //github.com/vmangos/core/commit/7d2f1e2923734ea1b983eeaa0208cfd158d4af02
Co-Authored-By: ratkosrb <35845488+ratkosrb@users.noreply.github.com>

* Hackfix for pets.

* Whoops.

* Correct evade uses.

* Conflict.

* Actually fix grace timer.

* Add visibility distance check.

Creatures should always fail combat checks in the open world if they're outside of visibility distance, might not be the case for worldbosses.

---------

Co-authored-by: ratkosrb <35845488+ratkosrb@users.noreply.github.com>
2024-09-03 21:08:56 +02: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
Grimdhex
221dbd3fdb chore(Apps/Codestyle): add new codestyle checks for pointers and range loops (#19841)
* chore(Apps/Codestyle): add new codestyle checks for pointers and range loops

* revert a typo
2024-09-03 13:02:38 -03:00
Kitzunu
9af86553c5 chore(Core/Misc): update floor and ceil to std (#19837) 2024-09-03 08:01:00 -03:00
Andrew
0954e314a0 fix(Scripts/BlackTemple): Fix Zerevor not casting Dampen Magic OOC (#19768)
* fix(Scripts/BlackTemple): Fix Zerevor not casting Dampen Magic OOC

* Update boss_illidari_council.cpp

* recast every 1min

* implement the recast checks

* Update CreatureAI.h

* Update boss_illidari_council.cpp

* Update boss_illidari_council.cpp

* fix ooc cast

* Update boss_illidari_council.cpp

* always respect the 60s lock

* Update boss_illidari_council.cpp

* Update boss_illidari_council.cpp
2024-09-02 20:44:34 -03:00
Benjamin Jackson
f88812443d refactor(Core): Correct typo. (#19830)
Init.
2024-08-31 17:38:03 -03:00
Grimdhex
2f85097413 docs(Core): improve several functions documentation (#19677)
* initial release

* fix reviews

* fix some typo and add new documetations for MotionMaster

* new update and fix the cli-codestyle

* fix typo

* fix reviews
2024-08-28 08:17:24 -03:00
Tereneckla
f2ed6f791b fix (Core/Unit): add AutoRpeatSpell delay to Auto Shot as well (#19603)
Update Unit.cpp
2024-08-26 07:20:23 -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
Andrew
c0b6eae0e1 fix(Core/Spells): Fix movement impairment auras not being removed (#19684) 2024-08-22 15:09:43 -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
Grimdhex
7457aef78d refactor(Core/Entities): Cleanup Unit header file (#19622)
* move several enum definitions in a new files

* move more things

* remove the include comment

* move the related code to CharmInfo in this own file

*original idea of Ovahlord

Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com>

* fix clang build errors and few blank lines

* missing forward declaration

* new tentative to fix gcc/clang build

* add several include could be necessary for gcc/clang compilation

* .

* revert some include since the last AC update

* fix some loop inconsistencies

* align all enums in UnitDefine.h

---------

Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
2024-08-15 05:12:44 -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
Francesco Borzì
54fadbda67 refactor(src/server/game/Entities): remove unused imports (#19507) 2024-07-28 16:39:39 -03:00
avarishd
3c9dc6ed78 fix(Core/Unit): Split Damage auras should ignore LOS (#19357) 2024-07-27 07:31:22 -03:00
avarishd
618f97bee6 feat(Core/Unit): Enable/Disable Daze config (#19454)
* daze

* bruh

* bruhx2
2024-07-20 15:53:00 -03:00
Benjamin Jackson
94d3caaf1b fix(Core): Further adjust packet structure for attack stop opcode. (#19438)
* Init.

* Fixy fix.
2024-07-19 06:58:58 -03:00
Benjamin Jackson
295e4dd3c6 fix(Core): Correct packet structure for combat stop messages. (#19434)
* Init.

* Reviewed changes.
2024-07-18 21:19:36 -03:00
Jelle Meeus
9f5b01ab37 fix(Core/Unit): add melee spell breaking for spells with cast time (#19376)
melee spells breaking
2024-07-17 12:49:43 +02:00
Jelle Meeus
e8af1aaffc fix(Scripts/Spells): warlock seed of corruption (#19322)
* remove seed of corruption handling in unit.cpp

* add generic and warlock aurascript

add warlock  aurascript

add enum

add generic aurascript

add OnRemove

2ff855054f (diff-ea612aafadff90005e88b243eb000369be9e5cb6f8dc85a008d31e42b156e0ec)

detonation threshold scaling added in: df5afca278

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

* add LoS check to generic damage

* refactor 2 scripts to 1 with args

refactor const_cast to GetAura()->GetEffect(

refactor reduce a line

* fix detonation threshold scaling

changed SPELL_DIRECT_DAMAGE to DOT

* remove not needed IsExpired() check

removal upon expiration is notified by AURA_REMOVE_BY_EXPIRE

* update comment

* refactor script with args to single spellscript, fix detonate by evade

* refactor

detonation to Detonate()
rename amount to remainingDamage
remove no tneeded HealthBelowPctDamaged

* refactor to 2 spell scripts again

* rename detonation spell from seed_of_corruption to seed_of_corruption_damage

avoids confusion with seed of corruption (with dot effect)

---------

Co-authored-by: ariel- <ariel-@users.noreply.github.com>
2024-07-17 01:50:38 +02:00
Benjamin Jackson
05f4fa1a35 fix(Core/Unit): Adjust melee attack stop logic. (#19397)
Init.
2024-07-14 12:31:40 -03:00
Jelle Meeus
a69d02e513 fix(Scripts/Spells): warlock demonic pact (#19386)
* add Demonic Pact Aura script

2ff855054f (diff-ea612aafadff90005e88b243eb000369be9e5cb6f8dc85a008d31e42b156e0ec)

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

* spell_warlock aura:spell_warl_demonic_pact_aura

* fixup! spell_warlock aura:spell_warl_demonic_pact_aura

* remove not needed spell correction, flag is already set

* subtract current proc bonus before calculating new bonus

* also increase healing done

* remove Demonic Pact handling in Unit

* refactor indent, remove bonus from spell group effects e.g. totem of wrath

* Revert "refactor indent, remove bonus from spell group effects e.g. totem of wrath"

This reverts commit 104041172d34f542cc934e9f468407c36912cc7f.

* refactor indent

* manually set proc cooldown

---------

Co-authored-by: ariel- <ariel-@users.noreply.github.com>
2024-07-13 12:38:59 -03:00
Benjamin Jackson
70eb920b10 feat(Core/Unit): Implement munching as a configurable option. (#19188)
* Init.

* Correct description.

* Adjust boolean to integer in config.
2024-07-10 12:26:53 -03:00
Anton Popovichenko
04acfd96a0 fix(Core/Unit): Invalidate update object cache when changing health in the same world update tick. (#19287)
* fix(Core/Unit): Invalidate update object cache when changing health in the same world update tick.

Should fix an issue when the client sees dead NPCs when they are not.

* Fix styling

* Another codestyle fix
2024-07-05 15:42:22 -03:00
Kitzunu
bd29e9e1b3 fix(Core/Spell): Implement SPELL_ATTR1_AURA_STAYS_AFTER_COMBAT (#19254)
feat(Core/Spell): Implement SPELL_ATTR1_AURA_STAYS_AFTER_COMBAT

* closes https://github.com/azerothcore/azerothcore-wotlk/issues/19248
2024-07-04 14:30:59 -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
Benjamin Jackson
8ea13ca778 fix(Scripts/Spells): Implement damage scaling based off DoT stack count for Seal of Vengeance and Corruption. (#19073)
* Init.

* Whoops.

* Move comment.

Someone should fix this darn CI.

* Logic adjustment.

* Revert logic adjustment.

This reverts commit ee09ee55df47c9a66ecf536be58a4a040f384b72.

* Requested changes?
2024-06-19 00:45:02 +02:00
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
Jelle Meeus
0793a979bb fix(Unit/ProcessTerrainStatusUpdate): prevent removal swimming auras if swimming (#18902)
* do not remove swimming auras if we are swimming

* refactor to isSwimming()

* Update src/server/game/Entities/Unit/Unit.cpp

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>

---------

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
2024-05-29 20:17:25 +02:00
Jelle Meeus
ac203da3d3 fix(Core/Unit): SPELLMOD_RESIST_MISS_CHANCE should decrease miss chance (#18849)
fix: hitchance should decrease misschance
2024-05-11 13:51:17 +01:00
Anton Popovichenko
1f640c9872 feat(Core/Optimization): Optimize build of units update object by leveraging cache (#18637)
* feat(Core/Optimization): Optimize build of units update object by leveraging cache.

* Remove whitespaces.

* Add alternative hooks to handle transmog and other similar things.

* Fix build on some compilers.

* Fix codestyle

* Fix build again.

* Take into account updateType.
2024-04-05 08:03:11 +02:00
Anton Popovichenko
73340b94e3 feat(Core/Compression): Move packets compression from map to network thread (#18602)
* feat(Code/Compression): Move packets compression from map to network thread.

* Code style fix

* Remove unicode letter
2024-03-28 08:57:29 -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
Tereneckla
4cfad0ffac fix (Core/Unit) Apply Capacitor cooldown on trigger proc instead of on stack add (#18189)
fix capacitor cooldown
2024-01-20 08:51:49 -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
IntelligentQuantum
9f1abf1214 chore(Core/Entities): remove useless includes (#17994) 2023-12-12 01:36:35 -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
Tristan 'Natrist' Cormier
4c94f62144 chore(Core/Account): move AccountMgr::IsGMAccount() to class WorldSession (#17845) 2023-11-28 21:44:48 +01:00