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
This commit is contained in:
Vincent-Michael
2014-06-19 22:57:44 +02:00
14 changed files with 83 additions and 38 deletions

View File

@@ -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