aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-06-19 22:57:44 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-06-19 22:57:44 +0200
commit910f32d48ddbae2ec8f2e85b678ade60ff04c8fa (patch)
tree6f3a8732e335240bb26c9b5fdca0a9733090657a /src
parent34572492dd1394dbeaf19bb697a7af8cbf0b6ef7 (diff)
parent57069b393d7698bc0f860ad1b2d0b16785f9e8e0 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f2fd90bb964..6ece5f249ba 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -3125,7 +3125,7 @@ void Unit::_ApplyAuraEffect(Aura* aura, uint8 effIndex)
AuraApplication * aurApp = aura->GetApplicationOfTarget(GetGUID());
ASSERT(aurApp);
if (!aurApp->GetEffectMask())
- _ApplyAura(aurApp, 1<<effIndex);
+ _ApplyAura(aurApp, 1 << effIndex);
else
aurApp->_HandleEffect(effIndex, true);
}
@@ -3163,7 +3163,7 @@ void Unit::_ApplyAura(AuraApplication * aurApp, uint8 effMask)
// apply effects of the aura
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
- if (effMask & 1<<i && (!aurApp->GetRemoveMode()))
+ if (effMask & 1 << i && (!aurApp->GetRemoveMode()))
aurApp->_HandleEffect(i, true);
}
}
@@ -3618,6 +3618,8 @@ void Unit::RemoveAurasByType(AuraType auraType, uint64 casterGUID, Aura* except,
{
Aura* aura = (*iter)->GetBase();
AuraApplication * aurApp = aura->GetApplicationOfTarget(GetGUID());
+ if (!aurApp)
+ continue;
++iter;
if (aura != except && (!casterGUID || aura->GetCasterGUID() == casterGUID)
@@ -8953,9 +8955,8 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
{
// Shatter
case 911:
- if (!victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
- break;
- AddPct(crit_chance, (*i)->GetAmount()*20);
+ if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
+ AddPct(crit_chance, (*i)->GetAmount()*20);
break;
case 7917: // Glyph of Shadowburn
if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
@@ -8976,7 +8977,7 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
case SPELLFAMILY_MAGE:
// Glyph of Fire Blast
if (spellProto->SpellFamilyFlags[0] == 0x2 && spellProto->SpellIconID == 12)
- if (victim->HasAuraWithMechanic((1<<MECHANIC_STUN) | (1<<MECHANIC_KNOCKOUT)))
+ if (victim->HasAuraWithMechanic((1 << MECHANIC_STUN) | (1 << MECHANIC_KNOCKOUT)))
if (AuraEffect const* aurEff = GetAuraEffect(56369, EFFECT_0))
crit_chance += aurEff->GetAmount();
break;
@@ -8997,7 +8998,7 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
crit_chance += aurEff->GetAmount();
break;
}
- break;
+ break;
case SPELLFAMILY_ROGUE:
// Shiv-applied poisons can't crit
if (FindCurrentSpellBySpellId(5938))
@@ -9019,7 +9020,7 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
return 100.0f;
break;
}
- break;
+ break;
case SPELLFAMILY_SHAMAN:
// Lava Burst
if (spellProto->SpellFamilyFlags[1] & 0x00001000)
@@ -9029,7 +9030,7 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
return 100.0f;
break;
}
- break;
+ break;
}
}
break;
@@ -9050,7 +9051,7 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
crit_chance += rendAndTear->GetAmount();
break;
}
- break;
+ break;
}
}
/// Intentional fallback. Calculate critical strike chance for both Ranged and Melee spells