Core: Codestyle cleanup
This commit is contained in:
1 parent
9ef8bd3072
commit
158966dc79
410 files changed
+1790
-1790
No files matched your search
@@ -606,7 +606,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
|
||||
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00000001)
|
||||
{
|
||||
// Improved Insect Swarm
|
||||
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
|
||||
if (unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00200000, 0, 0))
|
||||
AddPctN(damage, aurEff->GetAmount());
|
||||
}
|
||||
@@ -621,7 +621,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
|
||||
if (uint32 combo = m_caster->ToPlayer()->GetComboPoints())
|
||||
{
|
||||
// Lookup for Deadly poison (only attacker applied)
|
||||
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0, 0, m_caster->GetGUID()))
|
||||
if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0, 0, m_caster->GetGUID()))
|
||||
{
|
||||
// count consumed deadly poison doses at target
|
||||
bool needConsume = true;
|
||||
@@ -1321,14 +1321,14 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
unitTarget->ModifyHealth(-damage);
|
||||
|
||||
// Improved Life Tap mod
|
||||
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 208, 0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 208, 0))
|
||||
AddPctN(mana, aurEff->GetAmount());
|
||||
|
||||
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
|
||||
|
||||
// Mana Feed
|
||||
int32 manaFeedVal = 0;
|
||||
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 1982, 0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 1982, 0))
|
||||
manaFeedVal = aurEff->GetAmount();
|
||||
|
||||
if (manaFeedVal > 0)
|
||||
@@ -1459,7 +1459,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
uint32 count = unitTarget->GetDiseasesByCaster(m_caster->GetGUID());
|
||||
int32 bp = int32(count * m_caster->CountPctFromMaxHealth(int32(m_spellInfo->EffectDamageMultiplier[0])));
|
||||
// Improved Death Strike
|
||||
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
|
||||
AddPctN(bp, m_caster->CalculateSpellDamage(m_caster, aurEff->GetSpellProto(), 2));
|
||||
m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, false);
|
||||
return;
|
||||
@@ -1576,7 +1576,7 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
int32 bp = damage;
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
caster->CastCustomSpell(unitTarget, triggered_spell_id, &bp, &bp, &bp, true);
|
||||
}
|
||||
@@ -1635,7 +1635,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
}
|
||||
}
|
||||
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
caster->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID);
|
||||
}
|
||||
@@ -1656,7 +1656,7 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
int32 bp = damage;
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
caster->CastCustomSpell(unitTarget, spellInfo->Id, &bp, &bp, &bp, true, NULL, NULL, m_originalCasterGUID);
|
||||
}
|
||||
@@ -1808,7 +1808,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
|
||||
// Note: not exist spells with weapon req. and IsSpellHaveCasterSourceTargets == true
|
||||
// so this just for speedup places in else
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
caster->CastSpell(unitTarget, spellInfo, true, 0, 0, (originalCaster ? originalCaster->GetGUID() : 0));
|
||||
}
|
||||
@@ -2219,7 +2219,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
// Amount of heal - depends from stacked Holy Energy
|
||||
int damageAmount = 0;
|
||||
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(45062, 0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(45062, 0))
|
||||
{
|
||||
damageAmount+= aurEff->GetAmount();
|
||||
m_caster->RemoveAurasDueToSpell(45062);
|
||||
@@ -3279,7 +3279,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
|
||||
int32 heal_amount = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1);
|
||||
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true);
|
||||
// Glyph of Felhunter
|
||||
if (Unit * pOwner = m_caster->GetOwner())
|
||||
if (Unit* pOwner = m_caster->GetOwner())
|
||||
if (pOwner->GetAura(56249))
|
||||
pOwner->CastCustomSpell(pOwner, 19658, &heal_amount, NULL, NULL, true);
|
||||
}
|
||||
@@ -4041,7 +4041,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->SpellFamilyFlags[EFFECT_0] & 0x1)
|
||||
{
|
||||
// Glyph of Plague Strike
|
||||
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(58657, EFFECT_0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(58657, EFFECT_0))
|
||||
AddPctN(totalDamagePercentMod, aurEff->GetAmount());
|
||||
break;
|
||||
}
|
||||
@@ -4060,7 +4060,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->SpellFamilyFlags[EFFECT_0] & 0x10)
|
||||
{
|
||||
// Glyph of Death Strike
|
||||
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(59336, EFFECT_0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(59336, EFFECT_0))
|
||||
if (uint32 runic = std::min<uint32>(m_caster->GetPower(POWER_RUNIC_POWER), SpellMgr::CalculateSpellEffectAmount(aurEff->GetSpellProto(), EFFECT_1)))
|
||||
AddPctN(totalDamagePercentMod, runic);
|
||||
break;
|
||||
@@ -4070,7 +4070,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
|
||||
{
|
||||
bool consumeDiseases = true;
|
||||
// Annihilation
|
||||
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 2710, EFFECT_0))
|
||||
if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 2710, EFFECT_0))
|
||||
// Do not consume diseases if roll sucesses
|
||||
if (roll_chance_i(aurEff->GetAmount()))
|
||||
consumeDiseases = false;
|
||||
@@ -4341,7 +4341,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
// Glyph of Backstab
|
||||
case 63975:
|
||||
{
|
||||
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID()))
|
||||
if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID()))
|
||||
{
|
||||
uint32 countMin = aurEff->GetBase()->GetMaxDuration();
|
||||
uint32 countMax = 12000;
|
||||
@@ -5885,7 +5885,7 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
|
||||
if (!factionEntry)
|
||||
return;
|
||||
|
||||
if (RepRewardRate const * repData = sObjectMgr->GetRepRewardRate(faction_id))
|
||||
if (RepRewardRate const* repData = sObjectMgr->GetRepRewardRate(faction_id))
|
||||
{
|
||||
rep_change = int32((float)rep_change * repData->spell_rate);
|
||||
}
|
||||
@@ -6649,7 +6649,7 @@ void Spell::EffectQuestStart(SpellEffIndex effIndex)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player * player = unitTarget->ToPlayer();
|
||||
Player* player = unitTarget->ToPlayer();
|
||||
if (Quest const* qInfo = sObjectMgr->GetQuestTemplate(m_spellInfo->EffectMiscValue[effIndex]))
|
||||
{
|
||||
if (player->CanTakeQuest(qInfo, false) && player->CanAddQuest(qInfo, false))
|
||||
|
||||
Reference in new issue
Block a user