fix (core): Build Fix (#11723)

* Update Spell.cpp
This commit is contained in:
天鹿
2022-05-12 22:43:07 +08:00
committed by GitHub
parent 47c0dcd833
commit 0c0a2eac3b

View File

@@ -1412,7 +1412,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
uint32 mapid = m_caster->GetMapId();
uint32 phasemask = m_caster->GetPhaseMask();
float collisionHeight = m_caster->GetCollisionHeight();
float destx, desty, destz, ground, startx, starty, startz, starto;
float destx = 0.0f, desty = 0.0f, destz = 0.0f, ground = 0.0f, startx = 0.0f, starty = 0.0f, startz = 0.0f, starto = 0.0f;
Position pos;
Position lastpos;
@@ -1426,8 +1426,8 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
bool isCasterInWater = m_caster->IsInWater();
if (!m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING) || (pos.GetPositionZ() - ground < distance))
{
float tstX, tstY, tstZ, prevX, prevY, prevZ;
float tstZ1, tstZ2, tstZ3, destz1, destz2, destz3, srange, srange1, srange2, srange3;
float tstX = 0.0f, tstY = 0.0f, tstZ = 0.0f, prevX = 0.0f, prevY = 0.0f, prevZ = 0.0f;
float tstZ1 = 0.0f, tstZ2 = 0.0f, tstZ3 = 0.0f, destz1 = 0.0f, destz2 = 0.0f, destz3 = 0.0f, srange = 0.0f, srange1 = 0.0f, srange2 = 0.0f, srange3 = 0.0f;
float maxtravelDistZ = 2.65f;
float overdistance = 0.0f;
float totalpath = 0.0f;