EverWrath/src/server/scripts/Kalimdor
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
..
BlackfathomDeeps feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
CavernsOfTime chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
DireMaul feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
Maraudon feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
OnyxiasLair feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
RagefireChasm chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
RazorfenDowns chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
RazorfenKraul chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
RuinsOfAhnQiraj chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
TempleOfAhnQiraj chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
WailingCaverns feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
ZulFarrak chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
boss_azuregos.cpp chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
kalimdor_script_loader.cpp fix(Scripts/AhnQiraj): Anubisath Defender. (#12725) 2022-08-21 11:01:16 -03:00
zone_ashenvale.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_azshara.cpp fix(Core/Creature): hardcoded gossip in zone_azshara (#18289) 2024-02-08 07:41:23 +01:00
zone_azuremyst_isle.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_bloodmyst_isle.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_darkshore.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_desolace.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_durotar.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_dustwallow_marsh.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_felwood.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_feralas.cpp chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
zone_moonglade.cpp feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243) 2024-02-10 12:25:00 -03:00
zone_orgrimmar.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_silithus.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_stonetalon_mountains.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_tanaris.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_the_barrens.cpp chore(Scripts/Kalimdor): remove useless includes (#18065) 2023-12-26 06:08:37 -03:00
zone_thousand_needles.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_thunder_bluff.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_ungoro_crater.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00
zone_winterspring.cpp feat(Core/Scripting): move all script objects to separated files (#17860) 2023-12-02 21:13:20 +01:00