aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorRat <gmstreetrat@gmail.com>2014-11-28 14:00:50 +0100
committerRat <gmstreetrat@gmail.com>2014-11-28 14:00:50 +0100
commitce5b683a073dd62988dc0c0a18798513252dabe6 (patch)
treec3520ffa5c26285b3f35dfdcc846f773f5665f86 /src/server/scripts/World
parent60e377bd3e6f456cf82b19bb54a5c4c6edbce602 (diff)
Core/Spells: fixed Script project building
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/npc_professions.cpp7
-rw-r--r--src/server/scripts/World/npcs_special.cpp4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 17c37c7eba0..3e89041a9e9 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -234,9 +234,12 @@ bool EquippedOk(Player* player, uint32 spellId)
if (!spell)
return false;
- for (uint8 i = 0; i < 3; ++i)
+ for (SpellEffectInfo const* effect : spell->GetEffectsForDifficulty(DIFFICULTY_NONE))
{
- uint32 reqSpell = spell->Effects[i].TriggerSpell;
+ if (!effect)
+ continue;
+
+ uint32 reqSpell = effect->TriggerSpell;
if (!reqSpell)
continue;
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 57c0ddf066e..34699c19648 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2159,8 +2159,8 @@ public:
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
- if (spellInfo && spellInfo->Effects[0].Effect == SPELL_EFFECT_SUMMON_OBJECT_WILD)
- return spellInfo->Effects[0].MiscValue;
+ if (spellInfo && spellInfo->GetEffect(EFFECT_0)->Effect == SPELL_EFFECT_SUMMON_OBJECT_WILD)
+ return spellInfo->GetEffect(EFFECT_0)->MiscValue;
return 0;
}