aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-16 15:53:34 -0600
committermegamage <none@none>2009-01-16 15:53:34 -0600
commitd8b20be962fb60a56c69e8f5919b83708aa7abbd (patch)
tree64c2479f6e4c479f94508319c5396ba121588eca /src/game/SpellMgr.cpp
parent80263de422ad4e1cdb103eaec3a2acf74631f884 (diff)
*Fix build.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r--src/game/SpellMgr.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 3bfc6503cb3..79942a2d38e 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1342,6 +1342,20 @@ bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
return IsProfessionOrRidingSkill(skill);
}
+bool SpellMgr::IsProfessionSpell(uint32 spellId)
+{
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
+ if(!spellInfo)
+ return false;
+
+ if(spellInfo->Effect[1] != SPELL_EFFECT_SKILL)
+ return false;
+
+ uint32 skill = spellInfo->EffectMiscValue[1];
+
+ return IsProfessionSkill(skill);
+}
+
bool SpellMgr::IsPrimaryProfessionSpell(uint32 spellId)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);