-- Copyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved. TransportIngameMissionSetupEndPointEvent = {}; TransportIngameMissionSetupEndPointEvent_mt = Class(TransportIngameMissionSetupEndPointEvent, Event); InitStaticEventClass(TransportIngameMissionSetupEndPointEvent, "TransportIngameMissionSetupEndPointEvent", EventIds.EVENT_TRANSPORT_INGAME_MISSION_SETUP_END_POINT); function TransportIngameMissionSetupEndPointEvent:emptyNew() local self = Event:new(TransportIngameMissionSetupEndPointEvent_mt); return self; end; function TransportIngameMissionSetupEndPointEvent:new(mission) local self = TransportIngameMissionSetupEndPointEvent:emptyNew() self.mission = mission; self.missionIndex = g_currentMission.ingameMissionManager:getIngameMissionIndex(mission); assert(self.missionIndex ~= nil); return self; end; function TransportIngameMissionSetupEndPointEvent:readStream(streamId, connection) if connection:getIsServer() then local missionIndex = streamReadUInt16(streamId); local mission = g_currentMission.ingameMissionManager:getIngameMissionByIndex(missionIndex); mission:setupEndPoint(); end end; function TransportIngameMissionSetupEndPointEvent:writeStream(streamId, connection) if not connection:getIsServer() then streamWriteUInt16(streamId, self.missionIndex); end end; function TransportIngameMissionSetupEndPointEvent:run(connection) print("Error: TransportIngameMissionSetupEndPointEvent is not allowed to be executed on a local client"); end;