Backed out changeset 835660b317dc
--HG-- branch : trunk
This commit is contained in:
+5
-13
@@ -286,11 +286,6 @@ bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool cu
|
|||||||
m_charmInfo->GetActionBarEntry(index)->Type = atol((*iter).c_str());
|
m_charmInfo->GetActionBarEntry(index)->Type = atol((*iter).c_str());
|
||||||
++iter;
|
++iter;
|
||||||
m_charmInfo->GetActionBarEntry(index)->SpellOrAction = atol((*iter).c_str());
|
m_charmInfo->GetActionBarEntry(index)->SpellOrAction = atol((*iter).c_str());
|
||||||
// patch for old data where some spells have ACT_DECIDE but should have ACT_CAST
|
|
||||||
// so overwrite old state
|
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_charmInfo->GetActionBarEntry(index)->SpellOrAction);
|
|
||||||
if (spellInfo && spellInfo->AttributesEx & SPELL_ATTR_EX_PET_NOT_AUTOCAST)
|
|
||||||
m_charmInfo->GetActionBarEntry(index)->Type = ACT_CAST;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//init teach spells
|
//init teach spells
|
||||||
@@ -1291,7 +1286,7 @@ void Pet::_LoadSpells()
|
|||||||
{
|
{
|
||||||
Field *fields = result->Fetch();
|
Field *fields = result->Fetch();
|
||||||
|
|
||||||
addSpell(fields[0].GetUInt16(), (ActiveStates)fields[2].GetUInt16(), PETSPELL_UNCHANGED, fields[1].GetUInt16());
|
addSpell(fields[0].GetUInt16(), fields[2].GetUInt16(), PETSPELL_UNCHANGED, fields[1].GetUInt16());
|
||||||
}
|
}
|
||||||
while( result->NextRow() );
|
while( result->NextRow() );
|
||||||
|
|
||||||
@@ -1422,7 +1417,7 @@ void Pet::_SaveAuras()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Pet::addSpell(uint16 spell_id, ActiveStates active, PetSpellState state, uint16 slot_id, PetSpellType type)
|
bool Pet::addSpell(uint16 spell_id, uint16 active, PetSpellState state, uint16 slot_id, PetSpellType type)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
@@ -1438,9 +1433,6 @@ bool Pet::addSpell(uint16 spell_id, ActiveStates active, PetSpellState state, ui
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// same spells don't have autocast option
|
|
||||||
if (spellInfo->AttributesEx & SPELL_ATTR_EX_PET_NOT_AUTOCAST)
|
|
||||||
active = ACT_CAST;
|
|
||||||
|
|
||||||
PetSpellMap::iterator itr = m_spells.find(spell_id);
|
PetSpellMap::iterator itr = m_spells.find(spell_id);
|
||||||
if (itr != m_spells.end())
|
if (itr != m_spells.end())
|
||||||
@@ -1516,7 +1508,7 @@ bool Pet::addSpell(uint16 spell_id, ActiveStates active, PetSpellState state, ui
|
|||||||
if (IsPassiveSpell(spell_id))
|
if (IsPassiveSpell(spell_id))
|
||||||
CastSpell(this, spell_id, true);
|
CastSpell(this, spell_id, true);
|
||||||
else if(state == PETSPELL_NEW)
|
else if(state == PETSPELL_NEW)
|
||||||
m_charmInfo->AddSpellToAB(oldspell_id, spell_id, active);
|
m_charmInfo->AddSpellToAB(oldspell_id, spell_id);
|
||||||
|
|
||||||
if(newspell->active == ACT_ENABLED)
|
if(newspell->active == ACT_ENABLED)
|
||||||
ToggleAutocast(spell_id, true);
|
ToggleAutocast(spell_id, true);
|
||||||
@@ -1666,10 +1658,10 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)
|
|||||||
if(IsPassiveSpell(spellid))
|
if(IsPassiveSpell(spellid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*if(const SpellEntry *tempSpell = GetSpellStore()->LookupEntry(spellid))
|
if(const SpellEntry *tempSpell = GetSpellStore()->LookupEntry(spellid))
|
||||||
if(tempSpell->EffectImplicitTargetA[0] != TARGET_ALL_AROUND_CASTER
|
if(tempSpell->EffectImplicitTargetA[0] != TARGET_ALL_AROUND_CASTER
|
||||||
&& tempSpell->EffectImplicitTargetA[0] != TARGET_CHAIN_DAMAGE)
|
&& tempSpell->EffectImplicitTargetA[0] != TARGET_CHAIN_DAMAGE)
|
||||||
return; */
|
return;
|
||||||
|
|
||||||
PetSpellMap::const_iterator itr = m_spells.find((uint16)spellid);
|
PetSpellMap::const_iterator itr = m_spells.find((uint16)spellid);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -212,7 +212,7 @@ class Pet : public Creature
|
|||||||
void _LoadSpells();
|
void _LoadSpells();
|
||||||
void _SaveSpells();
|
void _SaveSpells();
|
||||||
|
|
||||||
bool addSpell(uint16 spell_id, ActiveStates active = ACT_DECIDE, PetSpellState state = PETSPELL_NEW, uint16 slot_id=0xffff, PetSpellType type = PETSPELL_NORMAL);
|
bool addSpell(uint16 spell_id,uint16 active = ACT_DECIDE, PetSpellState state = PETSPELL_NEW, uint16 slot_id=0xffff, PetSpellType type = PETSPELL_NORMAL);
|
||||||
bool learnSpell(uint16 spell_id);
|
bool learnSpell(uint16 spell_id);
|
||||||
void removeSpell(uint16 spell_id);
|
void removeSpell(uint16 spell_id);
|
||||||
bool _removeSpell(uint16 spell_id);
|
bool _removeSpell(uint16 spell_id);
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ enum ItemQualities
|
|||||||
#define SPELL_ATTR_EX_UNK14 0x00004000 // 14
|
#define SPELL_ATTR_EX_UNK14 0x00004000 // 14
|
||||||
#define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity
|
#define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity
|
||||||
#define SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE 0x00010000 // 16 unaffected by school immunity
|
#define SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE 0x00010000 // 16 unaffected by school immunity
|
||||||
#define SPELL_ATTR_EX_PET_NOT_AUTOCAST 0x00020000 // 17
|
#define SPELL_ATTR_EX_UNK17 0x00020000 // 17
|
||||||
#define SPELL_ATTR_EX_UNK18 0x00040000 // 18
|
#define SPELL_ATTR_EX_UNK18 0x00040000 // 18
|
||||||
#define SPELL_ATTR_EX_UNK19 0x00080000 // 19
|
#define SPELL_ATTR_EX_UNK19 0x00080000 // 19
|
||||||
#define SPELL_ATTR_EX_REQ_COMBO_POINTS1 0x00100000 // 20 Req combo points on target
|
#define SPELL_ATTR_EX_REQ_COMBO_POINTS1 0x00100000 // 20 Req combo points on target
|
||||||
|
|||||||
+13
-56
@@ -98,7 +98,7 @@ bool IsPassiveSpell(uint32 spellId)
|
|||||||
return false;
|
return false;
|
||||||
return (spellInfo->Attributes & SPELL_ATTR_PASSIVE) != 0;
|
return (spellInfo->Attributes & SPELL_ATTR_PASSIVE) != 0;
|
||||||
}
|
}
|
||||||
/*not used for now so commented out
|
|
||||||
bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2)
|
bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1);
|
SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1);
|
||||||
@@ -107,12 +107,13 @@ bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_
|
|||||||
if(spellInfo_1->Id == spellId_2) return false;
|
if(spellInfo_1->Id == spellId_2) return false;
|
||||||
|
|
||||||
if (spellInfo_1->Effect[effIndex_1] != spellInfo_2->Effect[effIndex_2] ||
|
if (spellInfo_1->Effect[effIndex_1] != spellInfo_2->Effect[effIndex_2] ||
|
||||||
|
spellInfo_1->EffectItemType[effIndex_1] != spellInfo_2->EffectItemType[effIndex_2] ||
|
||||||
spellInfo_1->EffectMiscValue[effIndex_1] != spellInfo_2->EffectMiscValue[effIndex_2] ||
|
spellInfo_1->EffectMiscValue[effIndex_1] != spellInfo_2->EffectMiscValue[effIndex_2] ||
|
||||||
spellInfo_1->EffectApplyAuraName[effIndex_1] != spellInfo_2->EffectApplyAuraName[effIndex_2])
|
spellInfo_1->EffectApplyAuraName[effIndex_1] != spellInfo_2->EffectApplyAuraName[effIndex_2])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2)
|
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2)
|
||||||
{
|
{
|
||||||
@@ -243,24 +244,14 @@ bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2)
|
|||||||
case SPELL_STING:
|
case SPELL_STING:
|
||||||
case SPELL_CURSE:
|
case SPELL_CURSE:
|
||||||
case SPELL_ASPECT:
|
case SPELL_ASPECT:
|
||||||
case SPELL_POSITIVE_SHOUT:
|
|
||||||
case SPELL_JUDGEMENT:
|
|
||||||
case SPELL_WARLOCK_CORRUPTION:
|
|
||||||
return spellSpec1==spellSpec2;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2)
|
|
||||||
{
|
|
||||||
switch(spellSpec1)
|
|
||||||
{
|
|
||||||
case SPELL_TRACKER:
|
case SPELL_TRACKER:
|
||||||
case SPELL_WARLOCK_ARMOR:
|
case SPELL_WARLOCK_ARMOR:
|
||||||
case SPELL_MAGE_ARMOR:
|
case SPELL_MAGE_ARMOR:
|
||||||
case SPELL_ELEMENTAL_SHIELD:
|
case SPELL_ELEMENTAL_SHIELD:
|
||||||
case SPELL_MAGE_POLYMORPH:
|
case SPELL_MAGE_POLYMORPH:
|
||||||
|
case SPELL_POSITIVE_SHOUT:
|
||||||
|
case SPELL_JUDGEMENT:
|
||||||
|
case SPELL_WARLOCK_CORRUPTION:
|
||||||
return spellSpec1==spellSpec2;
|
return spellSpec1==spellSpec2;
|
||||||
case SPELL_BATTLE_ELIXIR:
|
case SPELL_BATTLE_ELIXIR:
|
||||||
return spellSpec2==SPELL_BATTLE_ELIXIR
|
return spellSpec2==SPELL_BATTLE_ELIXIR
|
||||||
@@ -1039,21 +1030,17 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool isFromTheSameCaster ) const
|
bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) const
|
||||||
{
|
{
|
||||||
|
if(spellId_1 == spellId_2) // auras due to the same spell
|
||||||
|
return false;
|
||||||
|
|
||||||
SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1);
|
SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1);
|
||||||
SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
|
SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
|
||||||
|
|
||||||
if(!spellInfo_1 || !spellInfo_2)
|
if(!spellInfo_1 || !spellInfo_2)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
SpellSpecific spellId_spec_1 = GetSpellSpecific(spellId_1);
|
|
||||||
SpellSpecific spellId_spec_2 = GetSpellSpecific(spellId_2);
|
|
||||||
if (spellId_spec_1 && spellId_spec_2)
|
|
||||||
if (IsSingleFromSpellSpecificPerTarget(spellId_spec_1,spellId_spec_2)
|
|
||||||
|| (IsSingleFromSpellSpecificPerCaster(spellId_spec_1,spellId_spec_2) && isFromTheSameCaster))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if(spellInfo_1->SpellFamilyName != spellInfo_2->SpellFamilyName)
|
if(spellInfo_1->SpellFamilyName != spellInfo_2->SpellFamilyName)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -1063,44 +1050,14 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
|||||||
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
|
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if both elixirs are not battle/guardian/potions/flasks then always stack
|
|
||||||
else if ((spellInfo_1->SpellFamilyName == SPELLFAMILY_POTION)
|
|
||||||
&&(spellId_spec_1 || spellId_spec_2))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
else if (spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags)
|
else if (spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for(uint32 i = 0; i < 3; ++i)
|
for(uint32 i = 0; i < 3; ++i)
|
||||||
{
|
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i]
|
||||||
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i])
|
|| spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i])
|
||||||
return false;
|
return false;
|
||||||
if (spellInfo_1->EffectApplyAuraName[i] || spellInfo_2->EffectApplyAuraName[i])
|
|
||||||
{
|
|
||||||
if(spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]
|
|
||||||
|| spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i])
|
|
||||||
// need itemtype check? need to find an example
|
|
||||||
return false;
|
|
||||||
else if (!isFromTheSameCaster)
|
|
||||||
switch(spellInfo_1->EffectApplyAuraName[i])
|
|
||||||
{
|
|
||||||
//spells with these auras from different casters will stack
|
|
||||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
|
||||||
case SPELL_AURA_PERIODIC_HEAL:
|
|
||||||
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
|
|
||||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
|
||||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
|
||||||
case SPELL_AURA_PERIODIC_LEECH:
|
|
||||||
//exception for shaman positive totems with these auras
|
|
||||||
if ((spellInfo_1->SpellFamilyName != SPELLFAMILY_SHAMAN)
|
|
||||||
||(spellInfo_1->Effect[i]!=SPELL_AURA_MOD_INCREASE_ENERGY))
|
|
||||||
return false;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -284,7 +284,7 @@ inline bool IsSpellHaveEffect(SpellEntry const *spellInfo, SpellEffects effect)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
|
bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
|
||||||
|
|
||||||
inline bool IsSealSpell(SpellEntry const *spellInfo)
|
inline bool IsSealSpell(SpellEntry const *spellInfo)
|
||||||
{
|
{
|
||||||
@@ -301,7 +301,6 @@ inline bool IsElementalShield(SpellEntry const *spellInfo)
|
|||||||
|
|
||||||
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
|
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
|
||||||
bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2);
|
bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2);
|
||||||
bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2);
|
|
||||||
bool IsPassiveSpell(uint32 spellId);
|
bool IsPassiveSpell(uint32 spellId);
|
||||||
|
|
||||||
inline bool IsDeathPersistentSpell(SpellEntry const *spellInfo)
|
inline bool IsDeathPersistentSpell(SpellEntry const *spellInfo)
|
||||||
@@ -769,7 +768,7 @@ class SpellMgr
|
|||||||
|
|
||||||
bool IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const;
|
bool IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const;
|
||||||
static bool canStackSpellRanks(SpellEntry const *spellInfo);
|
static bool canStackSpellRanks(SpellEntry const *spellInfo);
|
||||||
bool IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool isFromTheSameCaster ) const;
|
bool IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) const;
|
||||||
|
|
||||||
SpellEntry const* SelectAuraRankForPlayerLevel(SpellEntry const* spellInfo, uint32 playerLevel) const;
|
SpellEntry const* SelectAuraRankForPlayerLevel(SpellEntry const* spellInfo, uint32 playerLevel) const;
|
||||||
|
|
||||||
|
|||||||
+42
-9
@@ -3897,18 +3897,18 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||||||
|
|
||||||
if(!is_triggered_by_spell)
|
if(!is_triggered_by_spell)
|
||||||
{
|
{
|
||||||
bool isFromSameCaster = Aur->GetCasterGUID() == (*i).second->GetCasterGUID();
|
SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId);
|
||||||
if( spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId, isFromSameCaster) )
|
|
||||||
|
bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec);
|
||||||
|
|
||||||
|
if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() )
|
||||||
{
|
{
|
||||||
//some spells should be not removed by lower rank of them
|
// cannot remove higher rank
|
||||||
if (!isFromSameCaster
|
if (spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
||||||
&&(spellProto->Effect[effIndex]==SPELL_AURA_MOD_INCREASE_ENERGY)
|
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||||
&&(spellProto->DurationIndex==21)
|
|
||||||
&&(spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId))
|
|
||||||
&&(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//Its a parent aura (create this aura in ApplyModifier)
|
// Its a parent aura (create this aura in ApplyModifier)
|
||||||
if ((*i).second->IsInUse())
|
if ((*i).second->IsInUse())
|
||||||
{
|
{
|
||||||
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
||||||
@@ -3921,6 +3921,39 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||||||
else
|
else
|
||||||
next = m_Auras.begin();
|
next = m_Auras.begin();
|
||||||
}
|
}
|
||||||
|
else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
|
||||||
|
{
|
||||||
|
// Its a parent aura (create this aura in ApplyModifier)
|
||||||
|
if ((*i).second->IsInUse())
|
||||||
|
{
|
||||||
|
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RemoveAurasDueToSpell(i_spellId);
|
||||||
|
|
||||||
|
if( m_Auras.empty() )
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
next = m_Auras.begin();
|
||||||
|
}
|
||||||
|
// Potions stack aura by aura (elixirs/flask already checked)
|
||||||
|
else if( spellProto->SpellFamilyName == SPELLFAMILY_POTION && i_spellProto->SpellFamilyName == SPELLFAMILY_POTION )
|
||||||
|
{
|
||||||
|
if (IsNoStackAuraDueToAura(spellId, effIndex, i_spellId, i_effIndex))
|
||||||
|
{
|
||||||
|
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||||
|
return false; // cannot remove higher rank
|
||||||
|
|
||||||
|
// Its a parent aura (create this aura in ApplyModifier)
|
||||||
|
if ((*i).second->IsInUse())
|
||||||
|
{
|
||||||
|
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RemoveAura(i);
|
||||||
|
next = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user