MoneyEvent = {};
MoneyEvent_mt = Class(MoneyEvent, Event);

InitEventClass(MoneyEvent, "MoneyEvent");

function MoneyEvent:emptyNew()
    local self = Event:new(MoneyEvent_mt);
    return self;
end;

function MoneyEvent:new(money)
    local self = MoneyEvent:emptyNew();
	self.money = money;
    return self;
end;

function MoneyEvent:readStreamAll(streamId, connection)
	g_currentMission.missionStats.money = streamReadInt32(streamId);
	self:run(connection);
end;
function MoneyEvent:writeStreamAll(streamId, connection)
	streamWriteInt32(streamId, self.money);
end;
function MoneyEvent:readStream(streamId, connection)
	self:readStreamAll(streamId, connection);	
end;
function MoneyEvent:readUpdateStream(streamId, connection)
	self:readStreamAll(streamId, connection);
end;
function MoneyEvent:writeStream(streamId, connection)
	self:writeStreamAll(streamId, connection);	
end;
function MoneyEvent:writeUpdateStream(streamId, connection)
	self:writeStreamAll(streamId, connection);	
end; 

function MoneyEvent:sendEvent(money)
	g_client:getServerConnection():sendEvent(MoneyEvent:new(money));
end;

function MoneyEvent:run(connection)
	
end;

