[9424] Some code/comments cleanup in EffectScriptEffect

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-02-20 19:01:05 +01:00
parent 6c44c6f5a7
commit 8bb13412e5
2 changed files with 114 additions and 114 deletions

View file

@ -5144,10 +5144,9 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
{ {
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
// Bending Shinbone case 8856: // Bending Shinbone
case 8856:
{ {
if(!itemTarget && m_caster->GetTypeId()!=TYPEID_PLAYER) if (!itemTarget && m_caster->GetTypeId()!=TYPEID_PLAYER)
return; return;
uint32 spell_id = 0; uint32 spell_id = 0;
@ -5160,36 +5159,33 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
m_caster->CastSpell(m_caster,spell_id,true,NULL); m_caster->CastSpell(m_caster,spell_id,true,NULL);
return; return;
} }
// Piccolo of the Flaming Fire case 17512: // Piccolo of the Flaming Fire
case 17512:
{ {
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return; return;
unitTarget->HandleEmoteCommand(EMOTE_STATE_DANCE); unitTarget->HandleEmoteCommand(EMOTE_STATE_DANCE);
return; return;
} }
// Escape artist case 20589: // Escape artist
case 20589:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT);
unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_DECREASE_SPEED); unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_DECREASE_SPEED);
return; return;
} }
// Brittle Armor - need remove one 24575 Brittle Armor aura case 24590: // Brittle Armor - need remove one 24575 Brittle Armor aura
case 24590:
unitTarget->RemoveSingleSpellAurasFromStack(24575); unitTarget->RemoveSingleSpellAurasFromStack(24575);
return; return;
// PX-238 Winter Wondervolt TRAP case 26275: // PX-238 Winter Wondervolt TRAP
case 26275:
{ {
uint32 spells[4] = { 26272, 26157, 26273, 26274 }; uint32 spells[4] = { 26272, 26157, 26273, 26274 };
// check presence // check presence
for(int j = 0; j < 4; ++j) for(int j = 0; j < 4; ++j)
if(unitTarget->HasAura(spells[j], EFFECT_INDEX_0)) if (unitTarget->HasAura(spells[j], EFFECT_INDEX_0))
return; return;
// select spell // select spell
@ -5199,12 +5195,10 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, iTmpSpellId, true); unitTarget->CastSpell(unitTarget, iTmpSpellId, true);
return; return;
} }
// Mercurial Shield - need remove one 26464 Mercurial Shield aura case 26465: // Mercurial Shield - need remove one 26464 Mercurial Shield aura
case 26465:
unitTarget->RemoveSingleSpellAurasFromStack(26464); unitTarget->RemoveSingleSpellAurasFromStack(26464);
return; return;
// Orb teleport spells case 25140: // Orb teleport spells
case 25140:
case 25143: case 25143:
case 25650: case 25650:
case 25652: case 25652:
@ -5213,7 +5207,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
case 35376: case 35376:
case 35727: case 35727:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
uint32 spellid; uint32 spellid;
@ -5234,9 +5228,8 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget,spellid,false); unitTarget->CastSpell(unitTarget,spellid,false);
return; return;
} }
// Shadow Flame (All script effects, not just end ones to prevent player from dodging the last triggered spell) case 22539: // Shadow Flame (All script effects, not just end ones to
case 22539: case 22972: // prevent player from dodging the last triggered spell)
case 22972:
case 22975: case 22975:
case 22976: case 22976:
case 22977: case 22977:
@ -5249,21 +5242,20 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
case 22984: case 22984:
case 22985: case 22985:
{ {
if(!unitTarget || !unitTarget->isAlive()) if (!unitTarget || !unitTarget->isAlive())
return; return;
// Onyxia Scale Cloak // Onyxia Scale Cloak
if(unitTarget->GetDummyAura(22683)) if (unitTarget->GetDummyAura(22683))
return; return;
// Shadow Flame // Shadow Flame
m_caster->CastSpell(unitTarget, 22682, true); m_caster->CastSpell(unitTarget, 22682, true);
return; return;
} }
// Summon Black Qiraji Battle Tank case 26656: // Summon Black Qiraji Battle Tank
case 26656:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
// Prevent stacking of mounts // Prevent stacking of mounts
@ -5274,10 +5266,10 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 25863, false); unitTarget->CastSpell(unitTarget, 25863, false);
else else
unitTarget->CastSpell(unitTarget, 26655, false); unitTarget->CastSpell(unitTarget, 26655, false);
return; return;
} }
// Mirren's Drinking Hat case 29830: // Mirren's Drinking Hat
case 29830:
{ {
uint32 item = 0; uint32 item = 0;
switch ( urand(1, 6) ) switch ( urand(1, 6) )
@ -5292,41 +5284,40 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
case 6: case 6:
item = 23586; break; // Aerie Peak Pale Ale item = 23586; break; // Aerie Peak Pale Ale
} }
if (item) if (item)
DoCreateItem(eff_idx,item); DoCreateItem(eff_idx,item);
break; break;
} }
// Improved Sprint case 30918: // Improved Sprint
case 30918:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
// Removes snares and roots. // Removes snares and roots.
unitTarget->RemoveAurasAtMechanicImmunity(IMMUNE_TO_ROOT_AND_SNARE_MASK,30918,true); unitTarget->RemoveAurasAtMechanicImmunity(IMMUNE_TO_ROOT_AND_SNARE_MASK,30918,true);
break; break;
} }
// Flame Crash case 41126: // Flame Crash
case 41126:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
unitTarget->CastSpell(unitTarget, 41131, true); unitTarget->CastSpell(unitTarget, 41131, true);
break; break;
} }
// Force Cast - Portal Effect: Sunwell Isle case 44876: // Force Cast - Portal Effect: Sunwell Isle
case 44876:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
unitTarget->CastSpell(unitTarget, 44870, true); unitTarget->CastSpell(unitTarget, 44870, true);
break; break;
} }
// Goblin Weather Machine case 46203: // Goblin Weather Machine
case 46203:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
uint32 spellId = 0; uint32 spellId = 0;
@ -5340,18 +5331,15 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, spellId, true); unitTarget->CastSpell(unitTarget, spellId, true);
break; break;
} }
//5,000 Gold case 46642: //5,000 Gold
case 46642:
{ {
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return; return;
((Player*)unitTarget)->ModifyMoney(50000000); ((Player*)unitTarget)->ModifyMoney(50000000);
break; break;
} }
// Surge Needle Teleporter case 47097: // Surge Needle Teleporter
case 47097:
{ {
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -5363,41 +5351,38 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
break; break;
} }
// High Executor's Branding Iron case 48603: // High Executor's Branding Iron
case 48603:
// Torture the Torturer: High Executor's Branding Iron Impact // Torture the Torturer: High Executor's Branding Iron Impact
unitTarget->CastSpell(unitTarget, 48614, true); unitTarget->CastSpell(unitTarget, 48614, true);
return; return;
// Emblazon Runeblade case 51770: // Emblazon Runeblade
case 51770:
{ {
Unit* caster = GetAffectiveCaster(); Unit* caster = GetAffectiveCaster();
if(!caster) if (!caster)
return; return;
caster->CastSpell(caster, damage, false); caster->CastSpell(caster, damage, false);
break; break;
} }
// Death Gate case 52751: // Death Gate
case 52751:
{ {
if(!unitTarget || unitTarget->getClass() != CLASS_DEATH_KNIGHT) if (!unitTarget || unitTarget->getClass() != CLASS_DEATH_KNIGHT)
return; return;
// triggered spell is stored in m_spellInfo->EffectBasePoints[0] // triggered spell is stored in m_spellInfo->EffectBasePoints[0]
unitTarget->CastSpell(unitTarget, damage, false); unitTarget->CastSpell(unitTarget, damage, false);
break; break;
} }
// Winged Steed of the Ebon Blade case 54729: // Winged Steed of the Ebon Blade
case 54729:
{ {
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return; return;
// Prevent stacking of mounts // Prevent stacking of mounts
unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED); unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
// Triggered spell id dependent of riding skill // Triggered spell id dependent of riding skill
if(uint16 skillval = ((Player*)unitTarget)->GetSkillValue(SKILL_RIDING)) if (uint16 skillval = ((Player*)unitTarget)->GetSkillValue(SKILL_RIDING))
{ {
if (skillval >= 300) if (skillval >= 300)
unitTarget->CastSpell(unitTarget, 54727, true); unitTarget->CastSpell(unitTarget, 54727, true);
@ -5406,10 +5391,9 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
} }
return; return;
} }
// Demonic Empowerment (succubus Vanish effect) case 54436: // Demonic Empowerment (succubus Vanish effect)
case 54436:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT);
@ -5419,14 +5403,17 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
return; return;
} }
case 55693: // Remove Collapsing Cave Aura case 55693: // Remove Collapsing Cave Aura
if(!unitTarget) {
if (!unitTarget)
return; return;
unitTarget->RemoveAurasDueToSpell(m_spellInfo->CalculateSimpleValue(eff_idx)); unitTarget->RemoveAurasDueToSpell(m_spellInfo->CalculateSimpleValue(eff_idx));
break; break;
}
case 58418: // Portal to Orgrimmar case 58418: // Portal to Orgrimmar
case 58420: // Portal to Stormwind case 58420: // Portal to Stormwind
{ {
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER || eff_idx != EFFECT_INDEX_0) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER || eff_idx != EFFECT_INDEX_0)
return; return;
uint32 spellID = m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_0); uint32 spellID = m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_0);
@ -5438,6 +5425,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
return; return;
} }
case 59317: // Teleporting case 59317: // Teleporting
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -5449,24 +5437,25 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 59314, true); unitTarget->CastSpell(unitTarget, 59314, true);
return; return;
// random spell learn instead placeholder } // random spell learn instead placeholder
case 60893: // Northrend Alchemy Research case 60893: // Northrend Alchemy Research
case 61177: // Northrend Inscription Research case 61177: // Northrend Inscription Research
case 61288: // Minor Inscription Research case 61288: // Minor Inscription Research
case 61756: // Northrend Inscription Research (FAST QA VERSION) case 61756: // Northrend Inscription Research (FAST QA VERSION)
case 64323: // Book of Glyph Mastery case 64323: // Book of Glyph Mastery
{ {
if(m_caster->GetTypeId() != TYPEID_PLAYER) if (m_caster->GetTypeId() != TYPEID_PLAYER)
return; return;
// learn random explicit discovery recipe (if any) // learn random explicit discovery recipe (if any)
if(uint32 discoveredSpell = GetExplicitDiscoverySpell(m_spellInfo->Id, (Player*)m_caster)) if (uint32 discoveredSpell = GetExplicitDiscoverySpell(m_spellInfo->Id, (Player*)m_caster))
((Player*)m_caster)->learnSpell(discoveredSpell, false); ((Player*)m_caster)->learnSpell(discoveredSpell, false);
return; return;
} }
case 69377: //Fortitude case 69377: //Fortitude
{ {
if(!unitTarget) if (!unitTarget)
return; return;
m_caster->CastSpell(unitTarget, 72590, true); m_caster->CastSpell(unitTarget, 72590, true);
@ -5474,7 +5463,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
} }
case 69378: //Blessing of Forgotten Kings case 69378: //Blessing of Forgotten Kings
{ {
if(!unitTarget) if (!unitTarget)
return; return;
m_caster->CastSpell(unitTarget, 72586, true); m_caster->CastSpell(unitTarget, 72586, true);
@ -5482,7 +5471,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
} }
case 69381: //Gift of the Wild case 69381: //Gift of the Wild
{ {
if(!unitTarget) if (!unitTarget)
return; return;
m_caster->CastSpell(unitTarget, 72588, true); m_caster->CastSpell(unitTarget, 72588, true);
@ -5495,8 +5484,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
{ {
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
// Healthstone creating spells case 6201: // Healthstone creating spells
case 6201:
case 6202: case 6202:
case 5699: case 5699:
case 11729: case 11729:
@ -5505,26 +5493,28 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
case 47871: case 47871:
case 47878: case 47878:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
uint32 itemtype; uint32 itemtype;
uint32 rank = 0; uint32 rank = 0;
Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i) for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
{ {
if((*i)->GetId() == 18692) if ((*i)->GetId() == 18692)
{ {
rank = 1; rank = 1;
break; break;
} }
else if((*i)->GetId() == 18693) else if ((*i)->GetId() == 18693)
{ {
rank = 2; rank = 2;
break; break;
} }
} }
static uint32 const itypes[8][3] = { static uint32 const itypes[8][3] =
{
{ 5512, 19004, 19005}, // Minor Healthstone { 5512, 19004, 19005}, // Minor Healthstone
{ 5511, 19006, 19007}, // Lesser Healthstone { 5511, 19006, 19007}, // Lesser Healthstone
{ 5509, 19008, 19009}, // Healthstone { 5509, 19008, 19009}, // Healthstone
@ -5559,11 +5549,11 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
DoCreateItem( eff_idx, itemtype ); DoCreateItem( eff_idx, itemtype );
return; return;
} }
// Demonic Empowerment case 47193: // Demonic Empowerment
case 47193:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
uint32 entry = unitTarget->GetEntry(); uint32 entry = unitTarget->GetEntry();
uint32 spellID; uint32 spellID;
switch(entry) switch(entry)
@ -5579,8 +5569,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget,spellID,true); unitTarget->CastSpell(unitTarget,spellID,true);
return; return;
} }
// Everlasting Affliction case 47422: // Everlasting Affliction
case 47422:
{ {
// Need refresh caster corruption auras on target // Need refresh caster corruption auras on target
Unit::AuraMap& suAuras = unitTarget->GetAuras(); Unit::AuraMap& suAuras = unitTarget->GetAuras();
@ -5594,12 +5583,12 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
} }
return; return;
} }
// Guarded by The Light (Paladin spell with SPELLFAMILY_WARLOCK) case 63521: // Guarded by The Light (Paladin spell with SPELLFAMILY_WARLOCK)
case 63521:
{ {
// Divine Plea, refresh on target (3 aura slots) // Divine Plea, refresh on target (3 aura slots)
if (Aura* aura = unitTarget->GetAura(54428, EFFECT_INDEX_0)) if (Aura* aura = unitTarget->GetAura(54428, EFFECT_INDEX_0))
aura->RefreshAura(); aura->RefreshAura();
return; return;
} }
} }
@ -5609,11 +5598,11 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
{ {
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
// Pain and Suffering case 47948: // Pain and Suffering
case 47948:
{ {
if (!unitTarget) if (!unitTarget)
return; return;
// Refresh Shadow Word: Pain on target // Refresh Shadow Word: Pain on target
Unit::AuraMap& auras = unitTarget->GetAuras(); Unit::AuraMap& auras = unitTarget->GetAuras();
for(Unit::AuraMap::iterator itr = auras.begin(); itr != auras.end(); ++itr) for(Unit::AuraMap::iterator itr = auras.begin(); itr != auras.end(); ++itr)
@ -5638,11 +5627,11 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
{ {
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
// Chimera Shot case 53209: // Chimera Shot
case 53209:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
uint32 spellId = 0; uint32 spellId = 0;
int32 basePoint = 0; int32 basePoint = 0;
Unit* target = unitTarget; Unit* target = unitTarget;
@ -5652,10 +5641,12 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
Aura *aura = (*i).second; Aura *aura = (*i).second;
if (aura->GetCasterGUID() != m_caster->GetGUID()) if (aura->GetCasterGUID() != m_caster->GetGUID())
continue; continue;
// Search only Serpent Sting, Viper Sting, Scorpid Sting auras // Search only Serpent Sting, Viper Sting, Scorpid Sting auras
uint64 familyFlag = aura->GetSpellProto()->SpellFamilyFlags; uint64 familyFlag = aura->GetSpellProto()->SpellFamilyFlags;
if (!(familyFlag & UI64LIT(0x000000800000C000))) if (!(familyFlag & UI64LIT(0x000000800000C000)))
continue; continue;
// Refresh aura duration // Refresh aura duration
aura->RefreshAura(); aura->RefreshAura();
@ -5666,6 +5657,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
basePoint = aura->GetModifier()->m_amount * 5 * 40 / 100; basePoint = aura->GetModifier()->m_amount * 5 * 40 / 100;
spellId = 53353; // Chimera Shot - Serpent spellId = 53353; // Chimera Shot - Serpent
} }
// Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting.
if ((familyFlag & UI64LIT(0x0000008000000000)) && aura->GetEffIndex() == EFFECT_INDEX_0) if ((familyFlag & UI64LIT(0x0000008000000000)) && aura->GetEffIndex() == EFFECT_INDEX_0)
{ {
@ -5688,6 +5680,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
spellId = 53358; // Chimera Shot - Viper spellId = 53358; // Chimera Shot - Viper
target = m_caster; target = m_caster;
} }
// Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute. // Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute.
if (familyFlag & UI64LIT(0x0000000000008000)) if (familyFlag & UI64LIT(0x0000000000008000))
spellId = 53359; // Chimera Shot - Scorpid spellId = 53359; // Chimera Shot - Scorpid
@ -5698,8 +5691,10 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
// spellId = 53366; // 53366 Chimera Shot - Wyvern // spellId = 53366; // 53366 Chimera Shot - Wyvern
//} //}
} }
if (spellId) if (spellId)
m_caster->CastCustomSpell(target, spellId, &basePoint, 0, 0, false); m_caster->CastCustomSpell(target, spellId, &basePoint, 0, 0, false);
return; return;
} }
case 53412: // Invigoration (pet triggered script, master targeted) case 53412: // Invigoration (pet triggered script, master targeted)
@ -5722,8 +5717,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
} }
return; return;
} }
// Master's Call case 53271: // Master's Call
case 53271:
{ {
if (!unitTarget) if (!unitTarget)
return; return;
@ -5742,8 +5736,9 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
// Judgement (seal trigger) // Judgement (seal trigger)
if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT) if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT)
{ {
if(!unitTarget || !unitTarget->isAlive()) if (!unitTarget || !unitTarget->isAlive())
return; return;
uint32 spellId1 = 0; uint32 spellId1 = 0;
uint32 spellId2 = 0; uint32 spellId2 = 0;
@ -5758,6 +5753,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
sLog.outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id); sLog.outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id);
return; return;
} }
// offensive seals have aura dummy in 2 effect // offensive seals have aura dummy in 2 effect
Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr) for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr)
@ -5771,6 +5767,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
continue; continue;
break; break;
} }
// if there were no offensive seals than there is seal with proc trigger aura // if there were no offensive seals than there is seal with proc trigger aura
if (!spellId2) if (!spellId2)
{ {
@ -5783,10 +5780,13 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
break; break;
} }
} }
if (spellId1) if (spellId1)
m_caster->CastSpell(unitTarget, spellId1, true); m_caster->CastSpell(unitTarget, spellId1, true);
if (spellId2) if (spellId2)
m_caster->CastSpell(unitTarget, spellId2, true); m_caster->CastSpell(unitTarget, spellId2, true);
return; return;
} }
} }
@ -5794,21 +5794,21 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
{ {
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
// Dreaming Glory case 28698: // Dreaming Glory
case 28698:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
unitTarget->CastSpell(unitTarget, 28694, true); unitTarget->CastSpell(unitTarget, 28694, true);
break; break;
} }
// Netherbloom case 28702: // Netherbloom
case 28702:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
// 25% chance of casting a random buff // 25% chance of casting a random buff
if(roll_chance_i(75)) if (roll_chance_i(75))
return; return;
// triggered spells are 28703 to 28707 // triggered spells are 28703 to 28707
@ -5820,18 +5820,19 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
for(uint8 i = 0; i < 5; ++i) for(uint8 i = 0; i < 5; ++i)
if (unitTarget->HasAura(spellid + i, EFFECT_INDEX_0)) if (unitTarget->HasAura(spellid + i, EFFECT_INDEX_0))
return; return;
unitTarget->CastSpell(unitTarget, spellid+urand(0, 4), true); unitTarget->CastSpell(unitTarget, spellid+urand(0, 4), true);
break; break;
} }
case 28720: // Nightmare Vine
// Nightmare Vine
case 28720:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
// 25% chance of casting Nightmare Pollen // 25% chance of casting Nightmare Pollen
if(roll_chance_i(75)) if (roll_chance_i(75))
return; return;
unitTarget->CastSpell(unitTarget, 28721, true); unitTarget->CastSpell(unitTarget, 28721, true);
break; break;
} }
@ -5842,26 +5843,25 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
{ {
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
// Pestilence case 50842: // Pestilence
case 50842:
{ {
if(!unitTarget) if (!unitTarget)
return; return;
Unit* mainTarget = m_targets.getUnitTarget(); Unit* mainTarget = m_targets.getUnitTarget();
if(!mainTarget) if (!mainTarget)
return; return;
// do only refresh diseases on main target if caster has Glyph of Disease // do only refresh diseases on main target if caster has Glyph of Disease
if(mainTarget == unitTarget && !m_caster->HasAura(63334)) if (mainTarget == unitTarget && !m_caster->HasAura(63334))
return; return;
// Blood Plague // Blood Plague
if(mainTarget->HasAura(55078)) if (mainTarget->HasAura(55078))
m_caster->CastSpell(unitTarget, 55078, true); m_caster->CastSpell(unitTarget, 55078, true);
// Frost Fever // Frost Fever
if(mainTarget->HasAura(55095)) if (mainTarget->HasAura(55095))
m_caster->CastSpell(unitTarget, 55095, true); m_caster->CastSpell(unitTarget, 55095, true);
break; break;
@ -5872,7 +5872,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
} }
// normal DB scripted effect // normal DB scripted effect
if(!unitTarget) if (!unitTarget)
return; return;
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id); sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9423" #define REVISION_NR "9424"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__