Commit Graph

451 Commits

Author SHA1 Message Date
Vincent Vanclef
ffe03f6e14 feat(Core/Entities): add OnPlayerCanGiveLevel script hook (#21666) 2025-03-10 08:44:33 +01:00
p-tkachuk
544878c048 fix (Core/Wintergrasp) Fix map and battle icon (#21622) 2025-03-02 05:46:49 +01:00
Jelle Meeus
4c4b04f07b refactor(Core/Packet): use WorldPackets::WorldState::InitWorldStates definition (#20475)
Co-authored-by: ccrs <ccrs@users.noreply.github.com>
2025-02-19 07:55:09 -03:00
Exitare
98ceb1c067 fix(Core/PlayerScript) Align player script function names (#21020)
Co-authored-by: sudlud <sudlud@users.noreply.github.com>
2025-02-16 14:59:41 +01:00
Takenbacon
edcfaeb845 refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400) 2025-02-13 07:04:38 +01:00
Anton Popovichenko
f6a0433297 feat(Core/Arena): Add support for arena seasons completion with progression in runtime. (#19858)
Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
2025-02-12 07:09:31 -03:00
Andrew
79cbb00075 feat(Core/Creature): Implement HasFlagsExtra() helper to creature (#21362) 2025-02-08 14:07:04 -03:00
iThorgrim
c53112d820 Feat(Core/Scripting): Add new hook CanPlayerResurrect to simplify HardCore mod etc. (#21272) 2025-02-03 18:28:19 +01:00
Kitzunu
17412174be feat(Core/SAI): implement SMART_ACTION_DISABLE_REWARD (#21105) 2025-02-01 22:49:41 +01:00
Kitzunu
47c5ff904f refactor(Core/Disables): Convert from Namespace to Class Structure (#21109) 2025-02-01 22:48:52 +01:00
Jelle Meeus
00b8a3f419 feat(Core/WorldState): implement Battle for Sun's Reach Event (#21219)
Co-authored-by: killerwife <killerwife@gmail.com>
Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
Co-authored-by: MantisLord <sabinprosper@gmail.com>
2025-01-31 13:19:12 +01:00
Kitzunu
0733c30471 refactor(Core/Player): Improve Channel.RestrictedLfg handling (#21145) 2025-01-21 19:09:31 +01:00
Kitzunu
847d2156fc refactor(Core/Loot): Simplify GetFishLoot with for loop and merge Get… (#21217) 2025-01-20 14:09:27 +01:00
Kitzunu
bff594c4f5 feat(Unit/Misc): HasAnyAuras() HasAllAuras() HasAuras() (#21040) 2024-12-26 05:51:54 -03:00
Exitare
98b426bf3a feat(Core/Player) Option to adjust max rest bonus via config (#20836) 2024-12-14 20:51:28 +01:00
Jelle Meeus
993bdcb84e feat(Core/Player): implement Spell Queue (#20797) 2024-12-12 11:59:52 +01:00
IntelligentQuantum
9f37794f5c Fix(Core/Player): Energy regen rate bonuses (#20321) 2024-12-12 06:53:39 +01:00
Tereneckla
8e080f1e60 fix(Core/Pet): Remove unnecessary Pet Class reassignments (#20614)
remove unnecessary class assignment
2024-12-01 17:16:13 -03:00
gontrannopier
cf7959238a fix(Core/Players): don't set full heath/mana/rage while Dead (#20723)
fix level up while dead -> check if player is not dead, then update health/mana/rage/..

Co-authored-by: gontrannopier <gontrannopier@gontrannopier.com>
2024-12-01 17:09:26 -03:00
Kitzunu
ed008a8780 refactor(Core/Spells): Add helpers for HasAuraType (#20802) 2024-12-01 08:50:59 -03:00
FingerKnoten
593ca4dae1 fix(Core/Player): properly update m_usedTalentCount (#20232) 2024-11-16 22:31:24 +01:00
silviu20092
87fbdb7967 feat(Core/Scripting): Add hook for applying weapon damage (#20350)
Add hook for applying weapon damage
2024-11-14 05:35:26 -03:00
manstfu
21c5575d1a fix(Core/Player): Nerfing Heirloom Weapons Damage (#20357)
Fixing heirloom damage

Co-authored-by: ariel- <ariel-@users.noreply.github.com>
2024-11-13 21:53:03 +01:00
Jelle Meeus
3565e4a9eb feat(Core/WorldState): improved WorldState scripting (#20141)
* implement world state script

based on
0b87ca9d9e

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

* refactor to use onleave and onenter instead of spell_area

allows players to right click remove adal's buff

* add MapMgr.h

* refactor: use condition enum instead of uint32, prefix WORLD_STATE where needed

* remove lock from WorldState::Update

sWorldState->Update() is only called from World::Update

* remove unsafe SmartAI action of setWorldState

---------

Co-authored-by: killerwife <killerwife@gmail.com>
2024-11-12 12:15:27 -03:00
Angelo Venturini
47c61b2576 fix(Core/BG): Fix double method call on removing a player (#20156) 2024-10-24 09:12:29 -03:00
Stefano Borzì
f6de601ddd new BattlegroundDesertionTypes for hook OnBattlegroundDesertion (#20039)
* new BattlegroundDesertionTypes for hook OnBattlegroundDesertion

* chore: minor improvements

---------

Co-authored-by: laasker <79991768+laasker@users.noreply.github.com>
2024-09-27 22:19:56 +02:00
IntelligentQuantum
985410f184 feat(Core/Items): Delete old item id from recovery item (#18332) 2024-09-22 08:32:16 +02: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
Jelle Meeus
8d7463c670 fix(Core/PlayerStorage): Equip OH, 2H, Titan's Grip weapon swapping (#19884)
titan's grip, unequip with full bags
2024-09-13 16:15:25 -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
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
Kitzunu
5d31b9f98f refactor(Core/Item): Add helpers (#19828) 2024-08-31 19:38:50 -03:00
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