Merge pull request #2303 from leka1986/master

Fix Line 77390: attempt to index local 'zonecoord' (a nil value)
This commit is contained in:
Thomas 2025-05-12 07:00:19 +02:00 committed by GitHub
commit 5b8b8a5566
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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