Updates to missile

main
jeffi 9 months ago
parent 40f77a11e4
commit cb4c49b1b3
  1. 8
      src/MissileManager/MissileManager.lua

@ -84,8 +84,8 @@ function MissileManager:EnumTrackingParams(missileObj)
for i, trackingParam in ipairs(self.trackingParams) do for i, trackingParam in ipairs(self.trackingParams) do
if (not trackingParam.source or missileObj:GetSourceUnit():IsUnit(trackingParam.source)) and if (not trackingParam.source or missileObj:GetSourceUnit():IsUnit(trackingParam.source)) and
(not trackingParam.target or missileObj:GetTargetUnit():IsUnit(trackingParam.target)) and (not trackingParam.target or missileObj:GetTargetUnit():IsUnit(trackingParam.target)) and
(not trackingParam.spellId or missileObj._missile.spellId == trackingParam.spellId) and (not trackingParam.spellId or missileObj.spellId == trackingParam.spellId) and
(not trackingParam.spellVisualId or missileObj._missile.spellVisualId == trackingParam.spellVisualId) (not trackingParam.spellVisualId or missileObj.spellVisualId == trackingParam.spellVisualId)
then then
tracked = true tracked = true
trackingParam.callback(missileObj) trackingParam.callback(missileObj)
@ -125,8 +125,8 @@ function MissileManager:GetMissiles(params)
for _, missile in ipairs(self.trackedMissiles) do for _, missile in ipairs(self.trackedMissiles) do
if (not params.source or missile:GetSourceUnit():IsUnit(params.source)) and if (not params.source or missile:GetSourceUnit():IsUnit(params.source)) and
(not params.target or missile:GetTargetUnit():IsUnit(params.target)) and (not params.target or missile:GetTargetUnit():IsUnit(params.target)) and
(not params.spellId or missile._missile.spellId == params.spellId) and (not params.spellId or missile.spellId == params.spellId) and
(not params.spellVisualId or missile._missile.spellVisualId == params.spellVisualId) (not params.spellVisualId or missile.spellVisualId == params.spellVisualId)
then then
table.insert(missiles, missile) table.insert(missiles, missile)
end end

Loading…
Cancel
Save