From 769e883d18d2a63ba0f08c5ac5d9cd586c8d400d Mon Sep 17 00:00:00 2001 From: Barbz Date: Mon, 9 Mar 2020 23:53:06 +0100 Subject: [PATCH] fix(cpp): Compilation missing headers + Wrong vars (#8) --- src/mod_learnspells.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod_learnspells.cpp b/src/mod_learnspells.cpp index d35dc75..476ce08 100644 --- a/src/mod_learnspells.cpp +++ b/src/mod_learnspells.cpp @@ -1,4 +1,6 @@ +#include "Chat.h" #include "ScriptMgr.h" +#include "SpellInfo.h" #include "DisableMgr.h" #include "Config.h" #include "Player.h" @@ -135,7 +137,7 @@ public: continue; if (DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, spellInfo->Id, player)) continue; - if ((spellInfo->AttributesEx7 & SPELL_ATTR7_ALLIANCE_ONLY && player->GetTeamId() != ALLIANCE) || (spellInfo->AttributesEx7 & SPELL_ATTR7_HORDE_ONLY && player->GetTeamId() != HORDE)) + if ((spellInfo->AttributesEx7 & SPELL_ATTR7_ALLIANCE_ONLY && player->GetTeamId() != TEAM_ALLIANCE) || (spellInfo->AttributesEx7 & SPELL_ATTR7_HORDE_ONLY && player->GetTeamId() != TEAM_HORDE)) continue; if (spellInfo->BaseLevel != level && sSpellMgr->IsSpellValid(spellInfo)) continue;