Commit Graph

418 Commits

Author SHA1 Message Date
ianmeesters
a83cd03bfb feat(Core/Player): add OnCalculateTalentsPoints hook (#19749)
* playerTalentsHook

* oeps :#

* :#

* does this work?

* make reference

---------

Co-authored-by: Amy Fang <amy@cavemail.ddns.net>
2024-08-30 09:06:07 -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
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
Kitzunu
3fbded8f6b refactor(Core/Chat): PSendSysMessage to fmt (#19449)
* refactor(Core/Chat): PSendSysMessage to `fmt`
2024-07-23 23:48:46 +02:00
Kitzunu
3c50b1a135 fix(Core/Player): Vertical Message distance (#19302)
* cherry-pick commit (297541e9c9)

* Get rid of unused param

* Merge SendMessageToSetInRange_OwnTeam into SendMessageToSetInRange

Co-authored-by: Badgersson <83663557+dekz120@users.noreply.github.com>
2024-07-06 10:05: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
Kitzunu
744067b389 fix(Core/Player): Delete by group (#19015)
* fix(Core/Player): Delete by group

* closes https://github.com/azerothcore/azerothcore-wotlk/issues/19014

Co-Authored-By: trickerer <onlysuffering@gmail.com>

* Update Player.cpp

* fix build

---------

Co-authored-by: trickerer <onlysuffering@gmail.com>
2024-06-06 20:58:43 +02:00
Andrew
2a1d23e520 fix(Scripts/Hyjal): Implement Eternal Silence spell when going into t… (#18960)
fix(Scripts/Hyjal): Implement Eternal Silence spell when going into the Well of Eternity
2024-05-28 01:24:10 +02:00
silviu20092
3988e9581d feat(core): add hooks for applying item mods (#18760) 2024-05-18 10:02:57 +02:00
Anton Popovichenko
f7f1952f4b fix(Core/Player): Fix memory leak. (#18671) 2024-04-05 07:04:55 -03: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
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
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
sudlud
1785df7117 fix(Core/Player): Fix Player not starting at full health (#18136)
* fix(Core/Player): Fix Player not starting at full health

* remove first call to UpdateMaxHealth() and SetFullHealth()
2024-01-14 11:07:52 -03:00
Kitzunu
bceb6173c2 fix(Core/Player): Sometimes Player whisper is sent as boss whisper (#18128)
* fix(Core/Player): Sometimes Player emot is sent as boss whisper

* actually change it to whisper as it is boss whisper

* Update Player.cpp
2024-01-07 12:14:20 -03:00
Kitzunu
6202835cff fix(Core/LFG): Hide XP from max players (#18103)
* Cherry-pick Player::IsMaxLevel from TrinityCore
* Correctly hide XP reward for max level players in LFG
* Closes #18101
2024-01-03 19:47:26 +01:00
Andrew
f9f71fff36 fix(Core/Player): Check if the player can summon the warlock pet on B… (#18064)
fix(Core/Player): Check if the player can summon the warlock pet on BG ress
2024-01-01 14:56:32 +01:00
IntelligentQuantum
9f1abf1214 chore(Core/Entities): remove useless includes (#17994) 2023-12-12 01:36:35 -03:00
avarishd
f476c8a6c9 feat(Core/Hooks): Add OnPlayerJustDied hook (#17973)
feat(Core/Hooks): Add OnPlayerJustDied
2023-12-10 19:06:23 -03:00
Tristan 'Natrist' Cormier
ac676f87ab chore(Core/Player): remove unused AnticheatSetSkipOnePacketForASH() function (#17947) 2023-12-09 01:09:52 +01:00
Tristan 'Natrist' Cormier
4c94f62144 chore(Core/Account): move AccountMgr::IsGMAccount() to class WorldSession (#17845) 2023-11-28 21:44:48 +01:00
Kitzunu
f440a7479f fix(Core/Groups): Create the group at first invite (#17869)
* cherry-pick commit (132538db1d)
* cherry-pick commit (250e8d998b)
* part https://github.com/azerothcore/azerothcore-wotlk/issues/11070

Co-authored-by: Treeston <14020072+Treeston@users.noreply.github.com>
2023-11-26 20:34:45 +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
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
f417a166bc feat(Core/Scripts): added OnAfterSpecSlotChanged hook (#17637) 2023-11-07 23:46:08 +07: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
Hasn
5bf64a164a fix(Core/Player) Stop small durability loss from still occuring when DurabilityLoss options in worldserver.conf are set to 0 (#17407)
Fix durability loss even when "DurabilityLoss"-settings in
worldserver.conf are zeroed
2023-10-21 08:10:34 -03:00
Kitzunu
a4e4d6ddb2 feat(Core/Player): Implement commentator tag (#17449)
* feat(Core/Player): Implement commentator tag

* remove redundant session check
2023-10-08 09:07:17 +02:00
Ludwig
f633eb8592 fix(Core/Achivement): Implement ACHIEVEMENT_FLAG_AVERAGE (#17263) 2023-09-21 18:56:28 +02:00
Tralenor
0796df57ac feat(Core/Player): Addition of a Hook in CanFlyInZone check (#16590)
---------

Co-authored-by: tmoos <tmoos@meteomatics.com>
Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2023-09-20 22:40:08 +02:00
Ludwig
8ba8f0fe9e fix(Core/Achievement): Implement ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK (#17180)
* fix(Core): Implement ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK

* fix(Core): LoadAchievementCriteriaData(): Add ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK

- fixes minor oversight of ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK implementation
- this enables DB achievement_criteria_data check for ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK
2023-09-14 22:27:39 +02:00
Skjalf
8d08a861aa feat(Core/Scripting): Implement OnAllowedToLootContainerCheck() hook (#17209)
* chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up

* Revert "chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up"

This reverts commit f841ef9da313976179fb788d9573ff8ced05ecb9.

* feat(Core/Scripting): Implement OnAllowedToLootContainerCheck() hook

* Update GlobalScript.cpp
2023-09-08 01:52:02 -03:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
Angelo Venturini
dbc39a2817 fix(Core/Spells): Implement ENCHANT_PROC_ATTR_WHITE_HIT (#16771)
Co-authored-by: Ariel Silva<ariel-@users.noreply.github.com>
2023-07-17 08:19:24 -03:00
Tereneckla
e78ff51336 fix(Core/Player): don't dismiss warlock pets on logout (#16766)
Update Player.cpp
2023-07-15 17:12:28 -03:00
Tereneckla
718b0000ba fix(Core/Reputation): remove reputation splitting for being partied (#16660)
remove rate for party
2023-07-02 15:02:14 -03:00
Walter Pagani
7f9cdda17b chore(Core/ScriptMgr): Hooks used in mod-aoe-loot (#16589)
* Creating the necessary hooks for the loot aoe

* update hook

* Typing error

* Method name and add documentation

* codestyle

* Misc. fixes
2023-06-24 08:23:23 -03:00
Tereneckla
acc68ef1e2 fix(Core/Player): Double health regen from spirit (#15955)
Update Player.cpp
2023-05-13 15:26:43 -03:00
NinjaPleezAC
dfa5da00b1 fix(Core/Player): Apply equip effect auras with -1 duration (#14809)
Enforces a -1 duration value to auras applied from equip effects.
Current reliance on the DurationEntry of the auras causes at least one aura to incorrectly expire.

Closes AzerothCore issue #5649
Closes https://github.com/chromiecraft/chromiecraft/issues/531
2023-05-13 14:50:07 -03:00
AnchyDev
444793346d feat(Core/Hooks): Add parameter to detect XP origin for OnGiveXP hook. (#16109)
Added enum parameter to detect where XP originated from.
2023-05-05 22:39:36 -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
e5665c32f8 update (core\store): sLFGDungeonStore update (#15325)
* update (core\store): sLFGDungeonStore update

update (core\store): sLFGDungeonStore update

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

* update (core\store): sLFGDungeonStore update

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

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2023-04-29 12:25:49 +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
ZhengPeiRu21
1e26cdbee9 fix(Core): Save bonus talent points to DB (#14099)
* fix(Core): Save bonus talent points to DB

* fix(Core): Save bonus talent points to DB

* Oxford comma in comment
2023-04-22 10:09:18 -03:00