diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-01-20 22:49:52 +0100 |
|---|---|---|
| committer | Ovahlord <dreadkiller@gmx.de> | 2025-01-21 18:28:54 +0100 |
| commit | 1c04f09609f09bed912e68e9a6d50074ec53861b (patch) | |
| tree | 1f1d7e51f44e9eb073729c4041c404124e144fe7 /src/server/scripts/Spells | |
| parent | d36d2e1fcc89258ca962fdf7c359a0e3a573258e (diff) | |
Scripts/Spells: Use Spell::GetPowerTypeCostAmount where possible instead of iterating Spell::GetPowerCost
(cherry picked from commit 26376d89e165aece42e58213632ef43ecb0d81b3)
# Conflicts:
# src/server/scripts/Spells/spell_druid.cpp
# src/server/scripts/Spells/spell_rogue.cpp
# src/server/scripts/Spells/spell_shaman.cpp
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 6959a574ed6..9aeef617da6 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1658,12 +1658,8 @@ class spell_item_pendant_of_the_violet_eye : public AuraScript bool CheckProc(ProcEventInfo& eventInfo) { if (Spell const* spell = eventInfo.GetProcSpell()) - { - std::vector<SpellPowerCost> const& costs = spell->GetPowerCost(); - auto m = std::find_if(costs.begin(), costs.end(), [](SpellPowerCost const& cost) { return cost.Power == POWER_MANA && cost.Amount > 0; }); - if (m != costs.end()) + if (spell->GetPowerTypeCostAmount(POWER_MANA) > 0) return true; - } return false; } |
