*Fix dispel resistance apply on some effect.

*Fix Sanctified Wrath.
*Fix Summon Type 429-by aerione_alt.
*Fix some spell procs-by Sephiroth1983 and oc_redfox.
*Fix demonic sacriface spell_bonus-by aerione_alt.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-06 22:57:45 +01:00
parent 2e0af6e37b
commit ab4b55f351
5 changed files with 65 additions and 22 deletions
+1
View File
@@ -2166,6 +2166,7 @@ enum SummonType
SUMMON_TYPE_UNKNOWN5 = 409,
SUMMON_TYPE_POSESSED3 = 427,
SUMMON_TYPE_POSESSED2 = 428,
SUMMON_TYPE_WILD2 = 429,
SUMMON_TYPE_FORCE_OF_NATURE = 669,
SUMMON_TYPE_GUARDIAN2 = 1161
};
+13 -10
View File
@@ -3295,20 +3295,23 @@ void Aura::HandleModStealth(bool apply, bool Real)
}
}
// Master of Subtlety
Unit::AuraList const& mDummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
if (Real)
{
if ((*i)->GetSpellProto()->SpellIconID == 2114 && Real)
// Master of Subtlety
Unit::AuraList const& mDummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
{
if (apply)
if ((*i)->GetSpellProto()->SpellIconID == 2114)
{
int32 bp = (*i)->GetModifier()->m_amount;
m_target->CastCustomSpell(m_target,31665,&bp,NULL,NULL,true);
if (apply)
{
int32 bp = (*i)->GetModifier()->m_amount;
m_target->CastCustomSpell(m_target,31665,&bp,NULL,NULL,true);
}
else
m_target->CastSpell(m_target,31666,true);
break;
}
else
m_target->CastSpell(m_target,31666,true);
break;
}
}
}
+11 -12
View File
@@ -3331,6 +3331,7 @@ void Spell::EffectSummonType(uint32 i)
EffectSummonGuardian(i);
break;
case SUMMON_TYPE_WILD:
case SUMMON_TYPE_WILD2:
EffectSummonWild(i);
break;
case SUMMON_TYPE_DEMON:
@@ -6242,24 +6243,22 @@ void Spell::EffectDispelMechanic(uint32 i)
uint32 mechanic = m_spellInfo->EffectMiscValue[i];
std::deque <Aura *> dispel_list;
Unit::AuraMap& Auras = unitTarget->GetAuras();
for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end(); iter = next)
for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end(); iter++)
{
next = iter;
++next;
SpellEntry const *spell = sSpellStore.LookupEntry(iter->second->GetSpellProto()->Id);
if (!iter->second->GetDispelChance(this))
continue;
SpellEntry const *spell = iter->second->GetSpellProto();
if(spell->Mechanic == mechanic || spell->EffectMechanic[iter->second->GetEffIndex()] == mechanic)
{
unitTarget->RemoveAurasDueToSpell(spell->Id);
if(Auras.empty())
break;
else
next = Auras.begin();
}
dispel_list.push_back(iter->second);
}
for(;!dispel_list.empty();)
{
unitTarget->RemoveAurasDueToSpell(dispel_list.front()->GetId());
dispel_list.pop_front();
}
return;
}
void Spell::EffectSummonDeadPet(uint32 /*i*/)
+24
View File
@@ -496,6 +496,21 @@ void Unit::RemoveSpellsCausingAuraWithDispel(AuraType auraType, Spell * spell)
return;
}
}
std::deque <Aura *> dispel_list;
AuraList const& dispelAuras = GetAurasByType(auraType);
for(AuraList::const_iterator itr = dispelAuras.begin(); itr != dispelAuras.end(); ++itr)
{
if (!(*iter)->GetDispelChance( spell))
continue;
dispel_list.push_back(*iter);
}
for(;!dispel_list.empty();)
{
RemoveAurasDueToSpell(dispel_list.front()->GetId());
dispel_list.pop_front();
}
}
void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
@@ -5768,6 +5783,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
basepoints0 = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000;
break;
}
// Sanctified Wrath
if (dummySpell->SpellIconID == 3029)
{
triggered_spell_id = 57318;
target = this;
basepoints0 = triggerAmount;
CastCustomSpell(target,triggered_spell_id,&basepoints0,&basepoints0,NULL,true,castItem,triggeredByAura);
return true;
}
// Sacred Shield
if (dummySpell->SpellFamilyFlags[1]&0x00080000)
{