aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-19 16:52:51 -0500
committermegamage <none@none>2009-08-19 16:52:51 -0500
commit012d6fa865fb8083dcbeae9b04926527b3c19f4e (patch)
tree46b2b2c30d751888d2dd91fc31c9bd0457790b7f /src/bindings/scripts
parent618162052007b3e9003db858ea33eed11f5af4df (diff)
[8381] Some refactoring work in Unit::m_currentSpells code. Author: VladimirMangos
* Restrict access, use enum args, move some repeated code parts to function. * Make m_selfContainer set only part of Unit::SetCurrentCastedSpell --HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
index aa81259e451..c46f5479ae3 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
@@ -486,11 +486,11 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
void SpellHit(Unit *caster, const SpellEntry *spell)
{
- if (m_creature->m_currentSpells[CURRENT_GENERIC_SPELL])
+ if (m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL))
for(uint8 i = 0; i < 3; ++i)
if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
- if (m_creature->m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id == SPELL_SOUL_SHOCK
- || m_creature->m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id == SPELL_DEADEN)
+ if (m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_SOUL_SHOCK
+ || m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_DEADEN)
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL, false);
}
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
index e43afc2926f..02a88b214db 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
@@ -686,7 +686,7 @@ struct TRINITY_DLL_DECL mob_greyheart_spellbinderAI : public ScriptedAI
void CastChanneling()
{
- if (!m_creature->isInCombat() && !m_creature->m_currentSpells[CURRENT_CHANNELED_SPELL])
+ if (!m_creature->isInCombat() && !m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
{
if (leotherasGUID)
{
@@ -745,7 +745,7 @@ struct TRINITY_DLL_DECL mob_greyheart_spellbinderAI : public ScriptedAI
{
bool isCasting = false;
for(uint8 i = 0; i < CURRENT_MAX_SPELL; ++i)
- if (i_pl->m_currentSpells[i])
+ if (i_pl->GetCurrentSpell(i))
isCasting = true;
if (isCasting)