*Fix Divine Storm (original author Nevan[?]), thanks AniRB

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-16 04:01:40 -07:00
parent 2ef49e55b5
commit 8d6defa7ee
+12 -10
View File
@@ -1642,8 +1642,8 @@ void Spell::EffectDummy(uint32 i)
// Divine Storm // Divine Storm
if (m_spellInfo->SpellFamilyFlags[1] & 0x20000 && i == 1) if (m_spellInfo->SpellFamilyFlags[1] & 0x20000 && i == 1)
{ {
int32 dmg= m_damage * damage /100; int32 dmg = m_damage * damage / 100;
m_caster->CastCustomSpell(unitTarget, 54172, &dmg , 0, 0, true); m_caster->CastCustomSpell(unitTarget, 54171, &dmg , 0, 0, true);
return; return;
} }
switch(m_spellInfo->SpellIconID) switch(m_spellInfo->SpellIconID)
@@ -1681,6 +1681,10 @@ void Spell::EffectDummy(uint32 i)
switch(m_spellInfo->Id) switch(m_spellInfo->Id)
{ {
case 54171: //Divine Storm
{
m_caster->CastCustomSpell(unitTarget, 54172, damage , 0, 0, true);
}
case 20425: // Judgement of command case 20425: // Judgement of command
{ {
if(!unitTarget) if(!unitTarget)
@@ -1708,15 +1712,15 @@ void Spell::EffectDummy(uint32 i)
// Righteous Defense (step 2) (in old version 31980 dummy effect) // Righteous Defense (step 2) (in old version 31980 dummy effect)
// Clear targets for eff 1 // Clear targets for eff 1
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit) for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
ihit->effectMask &= ~(1<<1); ihit->effectMask &= ~(1<<1);
// not empty (checked) // not empty (checked)
Unit::AttackerSet const& attackers = unitTarget->getAttackers(); Unit::AttackerSet const& attackers = unitTarget->getAttackers();
// chance to be selected from list // chance to be selected from list
float chance = 100.0f/attackers.size(); float chance = 100.0f / attackers.size();
uint32 count=0; uint32 count = 0;
for(Unit::AttackerSet::const_iterator aItr = attackers.begin(); aItr != attackers.end() && count < 3; ++aItr) for(Unit::AttackerSet::const_iterator aItr = attackers.begin(); aItr != attackers.end() && count < 3; ++aItr)
{ {
if(!roll_chance_f(chance)) if(!roll_chance_f(chance))
@@ -1827,7 +1831,7 @@ void Spell::EffectDummy(uint32 i)
// Glyph of Mana Tide // Glyph of Mana Tide
if(Unit *owner = m_caster->GetOwner()) if(Unit *owner = m_caster->GetOwner())
if (AuraEffect *dummy = owner->GetAuraEffect(55441, 0)) if (AuraEffect *dummy = owner->GetAuraEffect(55441, 0))
damage+=dummy->GetAmount(); damage += dummy->GetAmount();
// Regenerate 6% of Total Mana Every 3 secs // Regenerate 6% of Total Mana Every 3 secs
int32 EffectBasePoints0 = unitTarget->GetMaxPower(POWER_MANA) * damage / 100; int32 EffectBasePoints0 = unitTarget->GetMaxPower(POWER_MANA) * damage / 100;
m_caster->CastCustomSpell(unitTarget, 39609, &EffectBasePoints0, NULL, NULL, true, NULL, NULL, m_originalCasterGUID); m_caster->CastCustomSpell(unitTarget, 39609, &EffectBasePoints0, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
@@ -1838,15 +1842,13 @@ void Spell::EffectDummy(uint32 i)
{ {
if (m_caster->GetTypeId()!=TYPEID_PLAYER) if (m_caster->GetTypeId()!=TYPEID_PLAYER)
return; return;
Item *item = ((Player*)m_caster)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
if (item) if (Item *item = ((Player*)m_caster)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
{ {
// Damage is increased by 25% if your off-hand weapon is enchanted with Flametongue. // Damage is increased by 25% if your off-hand weapon is enchanted with Flametongue.
if (m_caster->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x200000)) if (m_caster->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x200000))
{
m_damage += m_damage * damage / 100; m_damage += m_damage * damage / 100;
} }
}
return; return;
} }
break; break;