Update CTLD.lua

update
This commit is contained in:
Thomas 2025-01-27 13:27:13 +01:00 committed by GitHub
parent 4d24eb82be
commit bfb60b318e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6041,8 +6041,8 @@ end
self:T({From, Event, To}) self:T({From, Event, To})
if Unit and Unit:IsPlayer() and self.PlayerTaskQueue then if Unit and Unit:IsPlayer() and self.PlayerTaskQueue then
local playername = Unit:GetPlayerName() local playername = Unit:GetPlayerName()
local dropcoord = Troops:GetCoordinate() or COORDINATE:New(0,0,0) --local dropcoord = Troops:GetCoordinate() or COORDINATE:New(0,0,0)
local dropvec2 = dropcoord:GetVec2() --local dropvec2 = dropcoord:GetVec2()
self.PlayerTaskQueue:ForEach( self.PlayerTaskQueue:ForEach(
function (Task) function (Task)
local task = Task -- Ops.PlayerTask#PLAYERTASK local task = Task -- Ops.PlayerTask#PLAYERTASK
@ -6050,7 +6050,7 @@ end
-- right subtype? -- right subtype?
if Event == subtype and not task:IsDone() then if Event == subtype and not task:IsDone() then
local targetzone = task.Target:GetObject() -- Core.Zone#ZONE should be a zone in this case .... local targetzone = task.Target:GetObject() -- Core.Zone#ZONE should be a zone in this case ....
if targetzone and targetzone.ClassName and string.match(targetzone.ClassName,"ZONE") and targetzone:IsVec2InZone(dropvec2) then if targetzone and targetzone.ClassName and string.match(targetzone.ClassName,"ZONE") and targetzone:GetProperty("Extractname") == Groupname then
if task.Clients:HasUniqueID(playername) then if task.Clients:HasUniqueID(playername) then
-- success -- success
task:__Success(-1) task:__Success(-1)