Fix Line 77390: attempt to index local 'zonecoord' (a nil value)

This commit is contained in:
leka1986 2025-05-11 21:15:31 +02:00
parent 7eba1349ae
commit 0468bacc0b

View File

@ -5981,6 +5981,7 @@ function CTLD:SmokeZoneNearBy(Unit, Flare)
end
end
local zonecoord = zone:GetCoordinate()
if zonecoord then
local active = CZone.active
local color = CZone.color
local distance = self:_GetDistance(zonecoord,unitcoord)
@ -5999,6 +6000,7 @@ function CTLD:SmokeZoneNearBy(Unit, Flare)
end
end
end
end
if not smoked then
local distance = UTILS.MetersToNM(self.smokedistance)
self:_SendMessage(string.format("Negative, need to be closer than %dnm to a zone!",distance), 10, false, Group)