Merge pull request #69 from Chuck5ta/develop21

[Core] Spell class - Fix for inaccessible class data
This commit is contained in:
Antz 2016-02-04 22:54:42 +00:00
commit 497fa5236f
2 changed files with 6 additions and 1 deletions

View File

@ -3068,7 +3068,9 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
m_currentSpells[CSpellType] = pSpell;
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)

View File

@ -439,6 +439,9 @@ class Spell
typedef std::list<Unit*> UnitList;
void SetSelfContainer(Spell** pCurrentContainer) { m_selfContainer = pCurrentContainer; }
Spell** GetSelfContainer() { return m_selfContainer; }
protected:
bool HasGlobalCooldown();
void TriggerGlobalCooldown();