*Merge TC1 r1737 and r1754 by BroodWyrn, fixes spells 45151, 45141, 46394 (Brutallus Burn), closes #179

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-19 19:55:24 -08:00
parent d7ed79825c
commit f4808f3ff5
2 changed files with 34 additions and 16 deletions

View File

@@ -5807,22 +5807,22 @@ void AuraEffect::PeriodicTick()
return;
// Consecrate ticks can miss and will not show up in the combat log
if( GetSpellProto()->Effect[GetEffIndex()]==SPELL_EFFECT_PERSISTENT_AREA_AURA &&
pCaster->SpellHitResult(m_target,GetSpellProto(),false)!=SPELL_MISS_NONE)
if (GetSpellProto()->Effect[GetEffIndex()] == SPELL_EFFECT_PERSISTENT_AREA_AURA &&
pCaster->SpellHitResult(m_target,GetSpellProto(),false) != SPELL_MISS_NONE)
return;
// Check for immune (not use charges)
if(m_target->IsImmunedToDamage(GetSpellProto()))
if (m_target->IsImmunedToDamage(GetSpellProto()))
return;
// some auras remove at specific health level or more
if(m_auraName==SPELL_AURA_PERIODIC_DAMAGE)
if (m_auraName == SPELL_AURA_PERIODIC_DAMAGE)
{
switch(GetId())
switch (GetId())
{
case 43093: case 31956: case 38801: // Grievous Wound
case 35321: case 38363: case 39215: // Gushing Wound
if(m_target->GetHealth() == m_target->GetMaxHealth() )
if(m_target->GetHealth() == m_target->GetMaxHealth())
{
m_target->RemoveAurasDueToSpell(GetId());
return;
@@ -5834,14 +5834,14 @@ void AuraEffect::PeriodicTick()
GetEffIndex() < 2 && GetSpellProto()->Effect[GetEffIndex()]==SPELL_EFFECT_DUMMY ?
pCaster->CalculateSpellDamage(GetSpellProto(),GetEffIndex()+1,GetSpellProto()->EffectBasePoints[GetEffIndex()+1],m_target) :
100;
if(m_target->GetHealth()*100 >= m_target->GetMaxHealth()*percent )
if(m_target->GetHealth()*100 >= m_target->GetMaxHealth()*percent)
{
m_target->RemoveAurasDueToSpell(GetId());
return;
}
break;
}
case 41337:// Aura of Anger
case 41337: // Aura of Anger
{
if (AuraEffect * aurEff = GetParentAura()->GetPartAura(1))
{
@@ -5852,6 +5852,13 @@ void AuraEffect::PeriodicTick()
m_amount = 100 * m_tickNumber;
break;
}
// Brutallus Burn
case 46394:
{
if (m_tickNumber % 11 == 0)
m_amount *= 2;
break;
}
default:
break;
}

View File

@@ -5216,19 +5216,19 @@ void Spell::EffectScriptEffect(uint32 effIndex)
if(m_caster->GetTypeId() != TYPEID_PLAYER)
return;
int bag=19;
int slot=0;
Item* item = NULL;
uint8 bag = 19;
uint8 slot = 0;
Item *item = NULL;
while (bag < 256)
{
item = ((Player*)m_caster)->GetItemByPos(bag,slot);
item = ((Player*)m_caster)->GetItemByPos(bag, slot);
if (item && item->GetEntry() == 38587) break;
slot++;
++slot;
if (slot == 39)
{
slot = 0;
bag++;
++bag;
}
}
if (bag < 256)
@@ -5236,7 +5236,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
if (((Player*)m_caster)->GetItemByPos(bag,slot)->GetCount() == 1) ((Player*)m_caster)->RemoveItem(bag,slot,true);
else ((Player*)m_caster)->GetItemByPos(bag,slot)->SetCount(((Player*)m_caster)->GetItemByPos(bag,slot)->GetCount()-1);
// Spell 42518 (Braufest - Gratisprobe des Braufest herstellen)
m_caster->CastSpell(m_caster,42518,true);
m_caster->CastSpell(m_caster, 42518, true);
return;
}
break;
@@ -5244,12 +5244,23 @@ void Spell::EffectScriptEffect(uint32 effIndex)
// Force Cast - Portal Effect: Sunwell Isle
case 44876:
{
if(!unitTarget)
if (!unitTarget)
return;
unitTarget->CastSpell(unitTarget, 44870, true);
break;
}
// Brutallus - Burn
case 45141:
case 45151:
{
//Workaround for Range ... should be global for every ScriptEffect
float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[effIndex]));
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->GetDistance(m_caster) >= radius && !unitTarget->HasAura(46394) && unitTarget != m_caster)
unitTarget->CastSpell(unitTarget, 46394, true);
break;
}
// spell of Brutallus - Stomp
case 45185:
{