Many cmangos commits applied

Many cmangos commits applied
This commit is contained in:
Charles A Edwards 2016-09-11 10:26:49 +01:00 committed by Antz
parent cba86c231e
commit 8431568536
38 changed files with 173 additions and 83 deletions

View file

@ -491,9 +491,10 @@ void GlobalCooldownMgr::CancelGlobalCooldown(SpellEntry const* spellInfo)
Unit::Unit() :
movespline(new Movement::MoveSpline()),
m_charmInfo(NULL),
m_charmInfo(nullptr),
i_motionMaster(this),
m_vehicleInfo(NULL),
m_regenTimer(0),
m_vehicleInfo(nullptr),
m_ThreatManager(this),
m_HostileRefManager(this)
{
@ -6454,6 +6455,14 @@ void Unit::Uncharm()
charm->RemoveSpellsCausingAura(SPELL_AURA_MOD_CHARM);
charm->RemoveSpellsCausingAura(SPELL_AURA_MOD_POSSESS);
charm->RemoveSpellsCausingAura(SPELL_AURA_MOD_POSSESS_PET);
// TODO:: find a way to get rid of this bad hack to remove Raise ally aura
if (charm->GetTypeId() == TYPEID_UNIT)
{
uint32 createdBySpellId = charm->GetUInt32Value(UNIT_CREATED_BY_SPELL);
if (static_cast<Creature*>(charm)->IsTemporarySummon() && createdBySpellId)
RemoveAurasDueToSpell(createdBySpellId);
}
}
}