EverWrath/src/server/scripts/EasternKingdoms
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
..
AlteracValley fix(Scripts/AlteracValley): Balinda Stoneheart (#17933) 2023-12-03 10:35:44 -03:00
BlackrockMountain feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243) 2024-02-10 12:25:00 -03:00
Deadmines refactor(Core/GameObject): Move the GameObject state save handling to… (#18080) 2024-01-01 01:51:33 -03:00
Gnomeregan refactor(Core/GameObject): Move the GameObject state save handling to… (#18080) 2024-01-01 01:51:33 -03:00
Karazhan fix(Scripts/Karazhan): Add cleave and threat resets to Nightbane (#18133) 2024-01-14 11:09:50 -03:00
MagistersTerrace feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
ScarletEnclave chore(Scripts/EK): remove useless includes (#18075) 2023-12-28 16:15:16 -03:00
ScarletMonastery fix(Scripts/ScarletMonastery): Prevent Whitemane from dying before resurrecting Mograine (#18082) 2023-12-30 12:47:02 -03:00
Scholomance refactor(Core/GameObject): Move the GameObject state save handling to… (#18080) 2024-01-01 01:51:33 -03:00
ShadowfangKeep feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
Stratholme refactor(Core/GameObject): Move the GameObject state save handling to… (#18080) 2024-01-01 01:51:33 -03:00
SunkenTemple feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
SunwellPlateau feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
TheStockade feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
Uldaman feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
ZulAman feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243) 2024-02-10 12:25:00 -03:00
ZulGurub chore(Scripts/EK): remove useless includes (#18075) 2023-12-28 16:15:16 -03:00
eastern_kingdoms_script_loader.cpp fix(DB/SAI): Yenniku (#16631) 2023-06-29 19:22:11 -03:00
zone_arathi_highlands.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_blasted_lands.cpp chore(Scripts/EK): remove useless includes (#18075) 2023-12-28 16:15:16 -03:00
zone_burning_steppes.cpp chore(Scripts/EK): remove useless includes (#18075) 2023-12-28 16:15:16 -03:00
zone_duskwood.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_eastern_plaguelands.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_elwynn_forest.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_eversong_woods.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_ghostlands.cpp chore(Scripts/EK): remove useless includes (#18075) 2023-12-28 16:15:16 -03:00
zone_hinterlands.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_isle_of_queldanas.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_redridge_mountains.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_silverpine_forest.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_stormwind_city.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_tirisfal_glades.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_undercity.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_western_plaguelands.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_westfall.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_wetlands.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00