-- # Today Ladder Rank Start # --
UPDATE USERDATA SET LoyaltyTodayNow = LoyaltyMonthly FROM USERDATA WHERE strUserId = @id
UPDATE USERDATA SET LoyaltyToday = 0 FROM USERDATA WHERE strUserId = @id
-- # Today Ladder Rank End # --
-- # Automatic Today Loyalty Restarter Stat # --
DECLARE @HourForLT tinyint
DECLARE @MinuteForLT tinyint
SET @HourForLT = DATEPART(HOUR,GETDATE())
SET @MinuteForLT = DATEPART(MINUTE,GETDATE())
IF (@HourForLT = 0) AND (@MinuteForLT = 0)
BEGIN
UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0
END
ELSE IF (@HourForLT = 0) AND (@MinuteForLT = 5)
BEGIN
UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0
END
ELSE IF (@HourForLT = 0) AND (@MinuteForLT = 10)
BEGIN
UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0
END
ELSE IF (@HourForLT = 12) AND (@MinuteForLT = 0)
BEGIN
UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0
END
ELSE IF (@HourForLT = 12) AND (@MinuteForLT = 5)
BEGIN
UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0
END
ELSE IF (@HourForLT = 12) AND (@MinuteForLT = 10)
BEGIN
UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0
END
-- # Automatic Today Loyalty Restarter End # --