Merge pull request #13154 from Unholychick/casts

Core/Spells: Fix some -Wconversion warnings
This commit is contained in:
Duarte Duarte committed 2014-09-17 16:09:18 +01:00
commit 048e043d0d
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -8156,9 +8156,9 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
float averageDmg = 0;
// now compute approximate weapon damage by formula from wowwiki.com
if (procFlags & PROC_FLAG_DONE_OFFHAND_ATTACK)
averageDmg = (GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE) + GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)) / 2;
averageDmg = (GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE) + GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)) / 2.f;
else
averageDmg = (GetFloatValue(UNIT_FIELD_MINDAMAGE) + GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
averageDmg = (GetFloatValue(UNIT_FIELD_MINDAMAGE) + GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2.f;
basepoints0 = int32(averageDmg);
break;
+3 -3
View File
@@ -271,13 +271,13 @@ class spell_warr_deep_wounds : public SpellScriptLoader
ApplyPct(damage, 16 * GetSpellInfo()->GetRank());
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC);
uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude;
uint32 ticks = uint32(spellInfo->GetDuration()) / spellInfo->Effects[EFFECT_0].Amplitude;
// Add remaining ticks to damage done
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, EFFECT_0, caster->GetGUID()))
damage += aurEff->GetDamage() * (ticks - aurEff->GetTickNumber());
damage += aurEff->GetDamage() * int32(ticks - aurEff->GetTickNumber());
damage /= ticks;
damage /= int32(ticks);
caster->CastCustomSpell(target, SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, &damage, NULL, NULL, true);
}