Core/Misc: Fix issues reported by static analysis

(cherry picked from commit 33dace231c5a169375523ffa89a2cc3fa48737bd)
This commit is contained in:
jackpoz
2022-03-11 11:48:18 +01:00
committed by Shauren
parent 7d01ad8b8f
commit d0fe16b787
9 changed files with 11 additions and 11 deletions
+1
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;