Core/Misc: Fix issues reported by static analysis

(cherry picked from commit 33dace231c)
This commit is contained in:
jackpoz
2021-06-20 13:11:53 +02:00
committed by Shauren
parent 7d01ad8b8f
commit d0fe16b787
9 changed files with 11 additions and 11 deletions

View File

@@ -802,6 +802,7 @@ void Spell::EffectTriggerRitualOfSummoning()
void Spell::CalculateJumpSpeeds(SpellEffectInfo const* effInfo, float dist, float& speedXY, float& speedZ)
{
Unit* unitCaster = GetUnitCasterForEffectHandlers();
ASSERT(unitCaster);
float runSpeed = unitCaster->IsControlledByPlayer() ? playerBaseMoveSpeed[MOVE_RUN] : baseMoveSpeed[MOVE_RUN];
if (Creature* creature = unitCaster->ToCreature())
runSpeed *= creature->GetCreatureTemplate()->speed_run;