aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-11-22 00:46:38 -0800
committermaximius <none@none>2009-11-22 00:46:38 -0800
commitda5c1bca546028d310bbf12340ca721146dc02f0 (patch)
tree141914dc48555e4fce0dac2376e78636a7b44968 /src/game/SpellEffects.cpp
parent461e8d134f9ca432349e65d96fb038269fa4127f (diff)
*Cleanup, fix a few warnings, and make the SD2 grid searchers just pass through to the standard Trinity grid searchers, as they have identical functionality. Thanks thmarth. Closes #387, #388
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index fb4c36ced1a..538a945ee26 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4637,10 +4637,10 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
}
bool normalized = false;
- float weaponDamagePercentMod = 1.0;
- for (int j = 0; j < 3; ++j)
+ float weaponDamagePercentMod = 1.0f;
+ for (uint8 j = 0; j < 3; ++j)
{
- switch(m_spellInfo->Effect[j])
+ switch (m_spellInfo->Effect[j])
{
case SPELL_EFFECT_WEAPON_DAMAGE:
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
@@ -4659,10 +4659,10 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
}
// apply to non-weapon bonus weapon total pct effect, weapon total flat effect included in weapon damage
- if(fixed_bonus || spell_bonus)
+ if (fixed_bonus || spell_bonus)
{
UnitMods unitMod;
- switch(m_attackType)
+ switch (m_attackType)
{
default:
case BASE_ATTACK: unitMod = UNIT_MOD_DAMAGE_MAINHAND; break;
@@ -4671,23 +4671,23 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
}
float weapon_total_pct = 1.0f;
- if ( m_spellInfo->SchoolMask & SPELL_SCHOOL_MASK_NORMAL )
+ if (m_spellInfo->SchoolMask & SPELL_SCHOOL_MASK_NORMAL)
weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
- if(fixed_bonus)
+ if (fixed_bonus)
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
- if(spell_bonus)
+ if (spell_bonus)
spell_bonus = int32(spell_bonus * weapon_total_pct);
}
int32 weaponDamage = m_caster->CalculateDamage(m_attackType, normalized, true);
// Sequence is important
- for (int j = 0; j < 3; ++j)
+ for (uint8 j = 0; j < 3; ++j)
{
// We assume that a spell have at most one fixed_bonus
// and at most one weaponDamagePercentMod
- switch(m_spellInfo->Effect[j])
+ switch (m_spellInfo->Effect[j])
{
case SPELL_EFFECT_WEAPON_DAMAGE:
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
@@ -4714,7 +4714,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
// Add melee damage bonuses (also check for negative)
m_caster->MeleeDamageBonus(unitTarget, &eff_damage, m_attackType, m_spellInfo);
- m_damage+= eff_damage;
+ m_damage += eff_damage;
}
void Spell::EffectThreat(uint32 /*i*/)