Core/Misc: fix static analysis issues

CID 1373466
CID 1373481
CID 1373482
This commit is contained in:
ariel-
2017-04-09 19:18:22 -03:00
parent 214b8e53c5
commit e478434146
3 changed files with 4 additions and 10 deletions

View File

@@ -1712,7 +1712,7 @@ uint32 Unit::CalcSpellResistedDamage(Unit* victim, uint32 damage, SpellSchoolMas
while (r >= probabilitySum && resistance < 10)
probabilitySum += discreteResistProbability[++resistance];
float damageResisted = float(damage * resistance / 10);
float damageResisted = damage * resistance / 10.f;
if (damageResisted > 0.0f) // if any damage was resisted
{
int32 ignoredResistance = 0;

View File

@@ -1988,8 +1988,8 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
uint32 title_alliance = it->first;
uint32 title_horde = it->second;
CharTitlesEntry const* atitleInfo = sCharTitlesStore.LookupEntry(title_alliance);
CharTitlesEntry const* htitleInfo = sCharTitlesStore.LookupEntry(title_horde);
CharTitlesEntry const* atitleInfo = sCharTitlesStore.AssertEntry(title_alliance);
CharTitlesEntry const* htitleInfo = sCharTitlesStore.AssertEntry(title_horde);
// new team
if (newTeam == ALLIANCE)
{

View File

@@ -553,12 +553,6 @@ class spell_collecting_fallout : public SpellScriptLoader
{
PrepareSpellScript(spell_collecting_fallout_SpellScript);
bool Load() override
{
_spellFail = true;
return true;
}
void OnLaunch(SpellEffIndex effIndex)
{
// estimated 25% chance of success
@@ -580,7 +574,7 @@ class spell_collecting_fallout : public SpellScriptLoader
OnEffectLaunch += SpellEffectFn(spell_collecting_fallout_SpellScript::HandleFail, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
}
bool _spellFail;
bool _spellFail = true;
};
SpellScript* GetSpellScript() const override