From a3d06f2f329a6d21b9a79aed8b39f1d56fa933e6 Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 25 Dec 2021 22:25:54 +0200 Subject: Scripts/Spells: Implemented various rogue spells (#26319) * Ruthlessness * Mastery: Main Gauche * Venomous Wounds * Symbols of Death * Backstab * Premeditation * Grand Melee * True Bearing * Slice and Dice * Roll the Bones --- src/server/game/Spells/SpellScript.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/server/game/Spells/SpellScript.cpp') diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 73452dca696..6313668eed6 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -35,20 +35,14 @@ bool _SpellScript::_Validate(SpellInfo const* entry) return true; } -bool _SpellScript::_ValidateSpellInfo(uint32 const* begin, uint32 const* end) +bool _SpellScript::_ValidateSpellInfo(uint32 spellId) { - bool allValid = true; - while (begin != end) + if (!sSpellMgr->GetSpellInfo(spellId, DIFFICULTY_NONE)) { - if (!sSpellMgr->GetSpellInfo(*begin, DIFFICULTY_NONE)) - { - TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", *begin); - allValid = false; - } - - ++begin; + TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", spellId); + return false; } - return allValid; + return true; } void _SpellScript::_Register() -- cgit v1.2.3