diff options
| author | megamage <none@none> | 2009-02-01 16:26:31 -0600 | 
|---|---|---|
| committer | megamage <none@none> | 2009-02-01 16:26:31 -0600 | 
| commit | 6a85ed6b875276d1c0a6158ebe8b01a0658bb304 (patch) | |
| tree | 088c044f37844faba9368e20f2091a0da529bf26 /src/game/Unit.cpp | |
| parent | 20b8efd93244c0257d49e4d0a9c44b9df95a5946 (diff) | |
    [7210] Implement shaman 51505 and ranks crit, and work 55447 glyph
    Signed-off-by: DiSlord <dislord@nomail.com>
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 36 | 
1 files changed, 28 insertions, 8 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index fff71e8dced..bc3df2c0468 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8186,14 +8186,34 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM                              break;                      }                  } -                 -                // Sacred Shield -                if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN && -                    spellProto->SpellFamilyFlags & 0x0000000040000000LL) -                { -                    Aura *aura = pVictim->GetDummyAura(58597); -                    if (aura && aura->GetCasterGUID() == GetGUID()) -                        crit_chance+=aura->GetModifier()->m_amount; +                // Custom crit by class +                switch(spellProto->SpellFamilyName) +                { +                    case SPELLFAMILY_PALADIN: +                        // Sacred Shield +                        if (spellProto->SpellFamilyFlags & 0x0000000040000000LL) +                        { +                            Aura *aura = pVictim->GetDummyAura(58597); +                            if (aura && aura->GetCasterGUID() == GetGUID()) +                            crit_chance+=aura->GetModifier()->m_amount; +                            break; +                        } +                    break; +                    case SPELLFAMILY_SHAMAN: +                        // Lava Burst +                        if (spellProto->SpellFamilyFlags & 0x0000100000000000LL) +                        { +                            if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x0000000010000000LL, 0, GetGUID())) +                            { +                                // Consume shock aura if not have Glyph of Flame Shock +                                if (!GetAura(55447, 0)) +                                    pVictim->RemoveAurasByCasterSpell(flameShock->GetId(), GetGUID()); +                                return true; +                            } +                            break; +                        } +                    break; +                  }              }              break;  | 
