Commit Graph

189 Commits

Author SHA1 Message Date
killerwife
0767b2edf5 fix(Core/Movement): Add safeguards against root freezes (#23117) 2025-10-05 14:45:07 -03:00
Andrew
2fb9c01c20 fix(Core/Unit): Fix thorns/retribution aura only dealing damage on white hits (#23041) 2025-10-04 05:03:02 -03:00
killerwife
b80353d288 fix(Core/Movement): Implement order counters (#23015) 2025-10-03 21:52:38 -03:00
sogladev
19f1ede216 fix(Core/Unit): add Dual Wield 'auto' to improve scripting (#23078) 2025-10-03 08:26:31 +02:00
killerwife
8e6d35c9b2 fix(Core/SAI): idle casters (#23005) 2025-09-23 20:45:48 -03:00
Takenbacon
73317b2706 feat(Core/Grids): Remove WorldObject separation in grid containers (#22595) 2025-08-09 06:36:24 +02:00
Jelle Meeus
2e1f848f09 fix(Core/Unit): Add melee leeway for auto attacks (#22566) 2025-07-29 09:58:30 -03:00
Anton Popovichenko
67aa022dbf fix(Core/Leash): Improve leashing behavior and timer handling (#22525) 2025-07-29 09:55:56 -03:00
Jelle Meeus
40c58123b1 fix(Core/Player): allow attacking target within boundary radius when… (#22500)
Co-authored-by: Kito <kito@vortexirc.com>
2025-07-29 09:38:49 -03:00
Takenbacon
f31643c72c feat(Core/Unit): Optimize AuraEffectList container (#22584) 2025-07-29 09:10:13 -03:00
Jelle Meeus
603249c046 fix(Core/Unit): wrong behavior of HasUnitMovementFlag (#22529) 2025-07-24 10:09:01 -03:00
avarishd
7c171ae4dc fix(Scripts/ScarletEnclave): City guards should throw stuff at new DKs (#22317) 2025-06-21 20:44:01 +02:00
Benjamin Jackson
2a93e7d410 chore(Core/Unit): Correct typo of Controlled. (#22260) 2025-06-03 08:56:44 +02:00
Benjamin Jackson
db18d5b035 refactor(Core): Use database tables for Shaman totems and Druid shapeshift forms. (#22104)
Co-authored-by: DoctorKraft <25483209+doctorkraft@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
2025-05-27 14:40:57 +01:00
Benjamin Jackson
5686f1e87a fix(Core/Creature): Implement respond to call for help faction flag. (#21959) 2025-04-30 02:19:58 +01:00
Jelle Meeus
094c15a323 fix(Core/Spells): implement SPELL_ATTR7_TREAT_AS_NPC_AOE (#21787)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2025-03-28 11:18:40 +01:00
iThorgrim
054018232c feat(Core/Scripting): Add new hook OnUnitSetShapeshiftForm (#21235) 2025-02-04 07:41:29 +01:00
Andrew
8f16de2084 feat(Core/Unit): Implement SetEmoteState() and ClearEmoteState() helpers (#21279) 2025-01-27 06:35:12 -03:00
Grimdhex
edf2959a26 feat(Core/Creatures): implement a sparring system (#19824) 2025-01-26 09:40:37 +01:00
Kitzunu
bff594c4f5 feat(Unit/Misc): HasAnyAuras() HasAllAuras() HasAuras() (#21040) 2024-12-26 05:51:54 -03:00
Grimdhex
a4e2b1d743 feat(Core/WorldObjects): implement Heartbeat timers (#20872) 2024-12-13 08:50:45 +01:00
Andrew
02cacd2341 feat(Core/Unit): Implement GetCompanionPet() helper (#20819) 2024-12-02 16:34:24 -03:00
Kitzunu
ed008a8780 refactor(Core/Spells): Add helpers for HasAuraType (#20802) 2024-12-01 08:50:59 -03:00
Grimdhex
261ca4408f refactor(Core/Unit): cleanup header file - part 3 (#20072)
* refactor: cleanup unit header file - part3

* Update Unit.h

* Update Unit.h

* fnish to reorder the header file

* Update Unit.h
2024-10-23 12:54:03 -03:00
Jelle Meeus
01b86ec7a6 fix(Core/Unit): update death state before handling RemoveAllAurasOnDeath() (#20124)
fix setDeathState

[PATCH] Don't allow units to enter combat upon death
91ebea4a77.patch
Co-authored-by: trickerer <onlysuffering@gmail.com>
2024-10-04 11:01:36 -03:00
Jelle Meeus
8a0604479a fix(Core/Unit): fix Dual Wield for more creatures... (#20047)
* non-weapons should return true

* remove shapeshift check
2024-09-26 07:13:47 -03: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
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
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
Kitzunu
337135bf9e refactor(Core/Misc): Use NpcFlag helpers (#19676)
* chore(Core/Misc): Use HasNpcFlag instead of HasFlag

* extend to all npcflag helpers
2024-08-19 10:17:02 +02: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ì
54fadbda67 refactor(src/server/game/Entities): remove unused imports (#19507) 2024-07-28 16:39:39 -03:00
Kitzunu
21f86d1c3c chore(Core/Misc): Remove deprecated code (#19413)
* Config - Deprecated for 3 years
* ChatCommand - Deprecated for 2 years
* getLevel() - Deprecated for 2 years
* SendGlobalText - Deprecated for 8 years +
2024-07-20 09:11:01 +03:30
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
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
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
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
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
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
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
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
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
ef09d4b63f fix(Core/Unit): Implement GetDisplayRace() (#17609) 2023-11-08 19:19:38 +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
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
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
Angelo Venturini
d282cce4af fix(Core/Spells): Delayed Damage system (#16183) 2023-05-07 08:58:38 -03:00