mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: fix static analysis issues
CID 1373466 CID 1373481 CID 1373482
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user