#1 Liberação de modo extremo Sáb Jan 26, 2013 2:19 pm
KaiqueTexx
Novato
- Código:
USE [PS_GameData]
GO
ALTER Proc usp_Read_User_MaxGrow_R
@ServerID tinyint,
@UserUID int
AS
SET NOCOUNT ON
IF NOT EXISTS(SELECT GROW FROM CHARS WHERE ServerID=@ServerID AND UserUID=@UserUID AND GROW <= 3 )
BEGIN
UPDATE UserMaxGrow SET MaxGrow = 3 WHERE ServerID=@ServerID AND UserUID=@UserUID AND Country <= 1
END
IF EXISTS(SELECT GROW FROM CHARS WHERE ServerID=@ServerID AND UserUID=@UserUID AND GROW = 3 AND LEVEL >= 0)
BEGIN
UPDATE UserMaxGrow SET MaxGrow = 3 WHERE ServerID=@ServerID AND UserUID=@UserUID
END
IF EXISTS(SELECT GROW FROM CHARS WHERE ServerID=@ServerID AND UserUID=@UserUID AND GROW = 3 AND LEVEL >= 0)
BEGIN
UPDATE UserMaxGrow SET MaxGrow = 3 WHERE ServerID=@ServerID AND UserUID=@UserUID
END
SELECT Country,MaxGrow FROM UserMaxGrow WHERE ServerID=@ServerID AND UserUID=@UserUID
SET NOCOUNT OFF
GO