EverWrath/src/server/scripts/Northrend
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
..
AzjolNerub chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
ChamberOfAspects chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
CrusadersColiseum chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
DraktharonKeep feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
FrozenHalls chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
Gundrak chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
IcecrownCitadel feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243) 2024-02-10 12:25:00 -03:00
Naxxramas feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
Nexus chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
Ulduar feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
UtgardeKeep chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
VaultOfArchavon feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
VioletHold feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
isle_of_conquest.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
northrend_script_loader.cpp fix(Scripts/UtgardPinnacle): Implement Beast's Mark (#11298) 2022-04-07 15:55:01 -03:00
zone_borean_tundra.cpp chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
zone_crystalsong_forest.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_dalaran.cpp fix(Scripts/Dalaran): Update Toy Shop Toy Plane behaviour based on sniffs (#18239) 2024-02-03 15:11:36 +01:00
zone_dragonblight.cpp chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
zone_grizzly_hills.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_howling_fjord.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_icecrown.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_sholazar_basin.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_storm_peaks.cpp chore(Scripts/Northrend): remove useless includes (#18061) 2023-12-25 02:15:56 -03:00
zone_wintergrasp.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_zuldrak.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00