aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.cpp
diff options
context:
space:
mode:
authorMatan Shukry <matanshukry@gmail.com>2021-12-25 22:25:54 +0200
committerGitHub <noreply@github.com>2021-12-25 21:25:54 +0100
commita3d06f2f329a6d21b9a79aed8b39f1d56fa933e6 (patch)
treec45cb5cb06c1ced9e6a425b999da30ffe106e8b8 /src/server/game/Spells/SpellScript.cpp
parentb221f4b37251db2206dd14d46c00f1b6f1f16480 (diff)
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
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r--src/server/game/Spells/SpellScript.cpp16
1 files changed, 5 insertions, 11 deletions
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()