<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -457,7 +457,7 @@ void BattleGroundAB::Reset()
     //call parent's class reset
     BattleGround::Reset();
 
-    for (uint8 i = 0; i &lt;= BG_TEAMS_COUNT; ++i)
+    for (uint8 i = 0; i &lt; BG_TEAMS_COUNT; ++i)
     {
         m_TeamScores[i]          = 0;
         m_lastTick[i]            = 0;</diff>
      <filename>src/game/BattleGroundAB.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1898,19 +1898,21 @@ void Spell::EffectDummy(uint32 i)
             // Cleansing Totem
             if ((m_spellInfo-&gt;SpellFamilyFlags &amp; UI64LIT(0x0000000004000000)) &amp;&amp; m_spellInfo-&gt;SpellIconID==1673)
             {
-                m_caster-&gt;CastSpell(unitTarget, 52025, true);
+                if (unitTarget)
+                    m_caster-&gt;CastSpell(unitTarget, 52025, true);
                 return;
             }
             // Healing Stream Totem
             if (m_spellInfo-&gt;SpellFamilyFlags &amp; UI64LIT(0x0000000000002000))
             {
-                m_caster-&gt;CastCustomSpell(unitTarget, 52042, &amp;damage, 0, 0, true, 0, 0, m_originalCasterGUID);
+                if (unitTarget)
+                    m_caster-&gt;CastCustomSpell(unitTarget, 52042, &amp;damage, 0, 0, true, 0, 0, m_originalCasterGUID);
                 return;
             }
             // Mana Spring Totem
             if (m_spellInfo-&gt;SpellFamilyFlags &amp; UI64LIT(0x0000000000004000))
             {
-                if (unitTarget-&gt;getPowerType()!=POWER_MANA)
+                if (!unitTarget || unitTarget-&gt;getPowerType()!=POWER_MANA)
                     return;
                 m_caster-&gt;CastCustomSpell(unitTarget, 52032, &amp;damage, 0, 0, true, 0, 0, m_originalCasterGUID);
                 return;</diff>
      <filename>src/game/SpellEffects.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -100,21 +100,19 @@ uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo)
     if(DotDuration &gt; 30000)
         DotDuration = 30000;
 
-    int j = 0;
-    for( ; j &lt; 3; j++)
+    for (int j = 0; j &lt; 3; ++j)
     {
-        if( spellInfo-&gt;Effect[j] == SPELL_EFFECT_APPLY_AURA &amp;&amp; (
+        if (spellInfo-&gt;Effect[j] == SPELL_EFFECT_APPLY_AURA &amp;&amp; (
             spellInfo-&gt;EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_DAMAGE ||
             spellInfo-&gt;EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_HEAL ||
             spellInfo-&gt;EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH) )
         {
+            if (spellInfo-&gt;EffectAmplitude[j] != 0)
+                return DotDuration / spellInfo-&gt;EffectAmplitude[j];
             break;
         }
     }
 
-    if(spellInfo-&gt;EffectAmplitude[j] != 0)
-        return DotDuration / spellInfo-&gt;EffectAmplitude[j];
-
     return 6;
 }
 </diff>
      <filename>src/game/SpellMgr.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1570,17 +1570,17 @@ void Unit::HandleEmoteCommand(uint32 anim_id)
 uint32 Unit::CalcNotIgnoreAbsorbDamage( uint32 damage, SpellSchoolMask damageSchoolMask, SpellEntry const* spellInfo /*= NULL*/)
 {
     float absorb_affected_rate = 1.0f;
-    Unit::AuraList const&amp; ignoreAbsorb = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL);
-    for(Unit::AuraList::const_iterator i = ignoreAbsorb.begin(); i != ignoreAbsorb.end(); ++i)
+    Unit::AuraList const&amp; ignoreAbsorbSchool = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL);
+    for(Unit::AuraList::const_iterator i = ignoreAbsorbSchool.begin(); i != ignoreAbsorbSchool.end(); ++i)
         if ((*i)-&gt;GetMiscValue() &amp; damageSchoolMask)
             absorb_affected_rate *= (100.0f - (*i)-&gt;GetModifier()-&gt;m_amount)/100.0f;
 
     if(spellInfo)
     {
-        Unit::AuraList const&amp; ignoreAbsorb = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL);
-        for(Unit::AuraList::const_iterator i = ignoreAbsorb.begin(); i != ignoreAbsorb.end(); ++i)
-            if ((*i)-&gt;isAffectedOnSpell(spellInfo))
-                absorb_affected_rate *= (100.0f - (*i)-&gt;GetModifier()-&gt;m_amount)/100.0f;
+        Unit::AuraList const&amp; ignoreAbsorbForSpell = GetAurasByType(SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL);
+        for(Unit::AuraList::const_iterator citr = ignoreAbsorbForSpell.begin(); citr != ignoreAbsorbForSpell.end(); ++citr)
+            if ((*citr)-&gt;isAffectedOnSpell(spellInfo))
+                absorb_affected_rate *= (100.0f - (*citr)-&gt;GetModifier()-&gt;m_amount)/100.0f;
     }
 
     return absorb_affected_rate &lt;= 0.0f ? 0 : (absorb_affected_rate &lt; 1.0f  ? uint32(damage * absorb_affected_rate) : damage);</diff>
      <filename>src/game/Unit.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 #ifndef __REVISION_NR_H__
 #define __REVISION_NR_H__
- #define REVISION_NR &quot;8714&quot;
+ #define REVISION_NR &quot;8715&quot;
 #endif // __REVISION_NR_H__</diff>
      <filename>src/shared/revision_nr.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a384aa97bb7346bb278dfe9a28dc7708dee02c87</id>
    </parent>
  </parents>
  <author>
    <name>AlexDereka</name>
    <email>dereka.alex@gmail.com</email>
  </author>
  <url>http://github.com/apoc/mangos/commit/062604c03571e6bb3ba29db8dcf3246c14cb8a13</url>
  <id>062604c03571e6bb3ba29db8dcf3246c14cb8a13</id>
  <committed-date>2009-10-24T08:44:23-07:00</committed-date>
  <authored-date>2009-10-23T06:07:13-07:00</authored-date>
  <message>[8715] Fixed possible crashes and some typos</message>
  <tree>f6d0b87244f7ab2649d8ef9b9f6ed242b3b7842a</tree>
  <committer>
    <name>ApoC</name>
    <email>apoc@nymfe.net</email>
  </committer>
</commit>
