35 lines
		
	
	
		
			808 B
		
	
	
	
		
			Lua
		
	
			
		
		
	
	
			35 lines
		
	
	
		
			808 B
		
	
	
	
		
			Lua
		
	
PlayerSetTitleRideSkinManager = {};
 | 
						|
local this = PlayerSetTitleRideSkinManager
 | 
						|
 | 
						|
function this.Initialize()
 | 
						|
    this.NewRide = {}
 | 
						|
end
 | 
						|
 | 
						|
-- 设置刚刚获取到的坐骑是新的,
 | 
						|
function this.SetNewRide(rideId)
 | 
						|
    this.NewRide[rideId] = 1
 | 
						|
end
 | 
						|
-- 查看后设置为旧的
 | 
						|
function this.SetOldRide(rideId)
 | 
						|
    this.NewRide[rideId] = 0
 | 
						|
end
 | 
						|
-- 查看后设置为旧的
 | 
						|
function this.SetAllOldRide()
 | 
						|
    for rideId, isNew in pairs(this.NewRide) do
 | 
						|
        this.NewRide[rideId] = 0
 | 
						|
    end
 | 
						|
end
 | 
						|
-- 获取一个新坐骑
 | 
						|
function this.GetNewRide()
 | 
						|
    local newRideId = nil
 | 
						|
    for rideId, isNew in pairs(this.NewRide) do
 | 
						|
        if isNew == 1 then
 | 
						|
            if not newRideId or newRideId > rideId then
 | 
						|
                newRideId = rideId
 | 
						|
            end
 | 
						|
        end
 | 
						|
    end
 | 
						|
    return newRideId
 | 
						|
end
 | 
						|
 | 
						|
return this |