Spell class - Fix for inaccessible class data
Accessor functions created for protected member, m_selfContainer
This commit is contained in:
parent
f78f1e612a
commit
51ba36d565
@ -3068,7 +3068,9 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
|
|||||||
m_currentSpells[CSpellType] = pSpell;
|
m_currentSpells[CSpellType] = pSpell;
|
||||||
pSpell->SetReferencedFromCurrent(true);
|
pSpell->SetReferencedFromCurrent(true);
|
||||||
|
|
||||||
pSpell->m_selfContainer = &(m_currentSpells[pSpell->GetCurrentContainer()]);
|
pSpell->SetSelfContainer(&(m_currentSpells[pSpell->GetCurrentContainer()]));
|
||||||
|
// previous and faulty version of the following code. If the above proves to work, then delete this instruction
|
||||||
|
// pSpell->m_selfContainer = &(m_currentSpells[pSpell->GetCurrentContainer()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed)
|
void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed)
|
||||||
|
@ -439,6 +439,9 @@ class Spell
|
|||||||
|
|
||||||
typedef std::list<Unit*> UnitList;
|
typedef std::list<Unit*> UnitList;
|
||||||
|
|
||||||
|
void SetSelfContainer(Spell** pCurrentContainer) { m_selfContainer = pCurrentContainer; }
|
||||||
|
Spell** GetSelfContainer() { return m_selfContainer; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool HasGlobalCooldown();
|
bool HasGlobalCooldown();
|
||||||
void TriggerGlobalCooldown();
|
void TriggerGlobalCooldown();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user